-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: bring EXPORT under the cost-based optimizer #33469
Labels
A-disaster-recovery
A-sql-optimizer
SQL logical planning and optimizations.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Comments
knz
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A-disaster-recovery
A-sql-optimizer
SQL logical planning and optimizations.
labels
Jan 3, 2019
@adityamaru27 May not need to do the entire refactor but the same technique used in CTAS should work here. |
RaduBerinde
added a commit
to RaduBerinde/cockroach
that referenced
this issue
Aug 4, 2019
This change moves the planning of EXPORT to the optimizer. The planning logic is fairly straightforward and doesn't need to be CCL. EXPORT can now be used with EXPLAIN and PREPARE. EXPORT can now only be used with the optimizer (the heuristic planner will hopefully be removed soon altogether anyway). One somewhat tricky aspect of the change is around the `KVOptions` which have string expressions as values (in order to support placeholders). Fixes cockroachdb#33469. Release note: None
RaduBerinde
added a commit
to RaduBerinde/cockroach
that referenced
this issue
Aug 5, 2019
This change moves the planning of EXPORT to the optimizer. The planning logic is fairly straightforward and doesn't need to be CCL. EXPORT can now be used with EXPLAIN and PREPARE. EXPORT can now only be used with the optimizer (the heuristic planner will hopefully be removed soon altogether anyway). One somewhat tricky aspect of the change is around the `KVOptions` which have string expressions as values (in order to support placeholders). Fixes cockroachdb#33469. Release note: None
craig bot
pushed a commit
that referenced
this issue
Aug 5, 2019
39312: opt: move EXPORT planning to the optimizer r=RaduBerinde a=RaduBerinde #### importccl: move export enterprise check to processor instantiation This change moves the EXPORT license check from the planning code to the execution part, when we instantiate the CSV Writer processor. The planning code will move into the optimizer and making the check from there is more awkward. Release note: None #### opt: move EXPORT planning to the optimizer This change moves the planning of EXPORT to the optimizer. The planning logic is fairly straightforward and doesn't need to be CCL. EXPORT can now be used with EXPLAIN and PREPARE. EXPORT can now only be used with the optimizer (the heuristic planner will hopefully be removed soon altogether anyway). One somewhat tricky aspect of the change is around the `KVOptions` which have string expressions as values (in order to support placeholders). Fixes #33469. Release note: None Co-authored-by: Radu Berinde <[email protected]>
🎉 thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-disaster-recovery
A-sql-optimizer
SQL logical planning and optimizations.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Currently the logic for EXPORT uses a weird interaction/hack because it's a CCL statement, and does not use the CBO to optimize its input query.
The EXPORT planning code must be amended to utilize the CBO, subject to the
optimizer
session setting.The litmus test to verify that EXPORT indeed uses the CBO is support for correlated subqueries, for example
(currently fails)
The text was updated successfully, but these errors were encountered: