Repository navigation
Conversation
Merging this PR will not alter performance2 warnings
Comparing Footnotes
|
dfa887b to
aac7b1e
Compare
2d72f0c to
2847d23
Compare
2847d23 to
e7979f2
Compare
aac7b1e to
08a9966
Compare
08a9966 to
65ea32a
Compare
e7979f2 to
583e699
Compare
65ea32a to
65117ce
Compare
3a6a18a to
d1994a2
Compare
|
@claude review |
|
Claude finished @danking's task in 1m 57s —— View job Review of #11507: per-expression converters
The design works well. Issues1. IN-list deduplication removed (performance regression on hash-join filters). // The list of a hash join filter holds every build-side key, which repeat. Each element
// converts through Arrow, so equal values with equal metadata are converted once.
.unique_by(|element| element.downcast_ref::<df_expr::Literal>().cloned())
2. The IN-list fallback path is effectively dead.
Both cases end as 3. Likely clippy 4. The files do not look rustfmt-clean. Several lines are over 100 columns: 5. The public API is not quite enough to compose a custom dispatch chain. The PR description says the goal is to let callers compose converters, but:
Consider making Smaller points
VerificationI did not run clippy, fmt or tests; per |
813cef5 to
1bac715
Compare
65117ce to
cd0142b
Compare
Expose per-expression Convertible implementations with typed DataFusion matching, fixed-arity construction, and caller-owned recursion. Use MustConvert and MayConvert to distinguish unsupported expressions from conversion errors, with shared schema, session, and scope supplied through ConvertibleCtx. Return Scoped::Same and Scoped::With inputs to the recursion callback and convert array_transform through the same protocol. Provide both concrete and boxed construction paths while preserving the established ExpressionConverter interface. Signed-off-by: Daniel King <dan@spiraldb.com>
cd0142b to
2ec7528
Compare
1bac715 to
7fceb7d
Compare
I basically introduce two result type aliases: MayConvert and MustConvert. They have different
?semantics: May is, effectively,Result<Unsupported, Result<T, Err>>so it bails out on the first successful conversion. Must is, effectively,Result<T, Result<Unsupported, Err>>so it bails out when something is unsupported or error.That lets me write conversions like:
And the first one that converts successfully returns.
Those types are also exposed so you can either use
default_convertwhich tries all Vortex defaults in Vortex order or you can build your conversion function yourself directly from the individual conversions.The conversions are just some state plus a
convert(which checks for a convertible DF type) and aconstruct(which consumes the state and the converted children to produce the Vortex expression).