feat(datafusion): allow configuring ExpressionConvertor on VortexFormat and VortexFormatFactory - #9185
Merged
AdamGS merged 2 commits intoAug 5, 2026
Conversation
Merging this PR will degrade performance by 31.44%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Contributor
|
Thank you for your contribution! definitely a missing piece. |
AdamGS
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
VortexSource::with_expression_convertoralready allows swapping in a customExpressionConvertor, but there was no way to configure one when the source is created throughVortexFormat/VortexFormatFactory— the path used byListingTableandCREATE EXTERNAL TABLE. Engine integrations that need a custom expression conversion or pushdown strategy could not use it through those entry points.This PR plumbs an optional
ExpressionConvertorthroughVortexFormatFactoryandVortexFormatso that everyVortexSourcethey create picks it up. This makes the workaround suggested in #8763 (rejecting unsupported pushdowns via a custom convertor) usable from theListingTablepath, where the source is created by the format rather than constructed directly.VortexSourceisn't consistent, and might cause runtime errors or other issues. #8763What changes are included in this PR?
VortexFormatFactory::with_expression_convertorandVortexFormat::with_expression_convertorbuilder methods; the convertor is forwarded throughFileFormatFactory::create/default()andFileFormat::file_sourceinto theVortexSource.ProcessedProjectionfromvortex_datafusion::convert. TheExpressionConvertortrait was already public, butsplit_projectionreturned a type that downstream crates could not name. The trait documentation now includes a compiling downstream implementation example.Debugimpls forVortexFormat/VortexFormatFactorythat report whether a custom convertor is set (the trait object itself is notDebug).How was this tested?
VortexFormatdirectly and bothVortexFormatFactoryentry points (createanddefault). A rejecting test convertor verifies thatcan_be_pushed_downis consulted, the filter is reported asPushedDown::No, andconvertis not called for rejected filters.CREATE EXTERNAL TABLEtest registers a factory with a custom convertor, inserts data, executes a filtered query, verifies bothcan_be_pushed_downandconvertare called, and validates the result.ExpressionConvertorthrough the publicvortex_datafusion::convertAPI, proving downstream crates can nameProcessedProjection.Validation:
cargo nextest run -p vortex-datafusioncargo test --doc -p vortex-datafusioncargo clippy -p vortex-datafusion --all-targets --all-features -- -D warningscargo +nightly fmt --all -- --checkWhat APIs are changed? Are there any user-facing changes?
VortexFormatFactory::with_expression_convertor,VortexFormat::with_expression_convertor.vortex_datafusion::convert::ProcessedProjection.DefaultExpressionConvertoras before.This PR was developed with AI assistance; all changes were reviewed by the haohuaijin.