Skip to content

datafusion: support SQL execution options - #996

Merged
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:feat/sql-context-sql-with-options
Oct 2, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:feat/sql-context-sql-with-options

Conversation

@shyjsarah

Copy link
Copy Markdown
Contributor

Summary

Expose SQLContext::sql_with_options so callers can apply DataFusion SQLOptions while retaining Paimon SQL routing. The existing SQLContext::sql behavior remains unchanged and uses the default options.

Changes

  • Add an additive public API that accepts SQLOptions.
  • Propagate the options through statements and rewritten queries delegated to DataFusion.
  • Cover statement restrictions for SET/RESET, COPY, and nested COPY under EXPLAIN.

Testing

  • cargo test --locked -p paimon-datafusion --test sql_context_tests test_sql_with_options_propagates -- --nocapture
  • cargo check --locked -p paimon-datafusion
  • cargo fmt --all -- --check
  • cargo clippy --locked -p paimon-datafusion --all-targets -- -D warnings

Notes

This is an additive public API change. Existing callers of SQLContext::sql are unaffected.

@QuakeWang QuakeWang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi
JingsongLi merged commit cd5d36c into apache:main Oct 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants