-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add syntax support for PARTITIONED BY/CLUSTERED BY in INSERT queries #12163
Merged
abhishekagarwal87
merged 54 commits into
apache:master
from
LakshSingla:calcite-ext-insert
Feb 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
29969da
Initial commit, build working
LakshSingla 6d3382f
Merge branch 'master' into calcite-ext-prototype
LakshSingla f70aad9
Add for SqlSelect and OrderBy
LakshSingla 7b2c884
Integrate the changes such that set context works
LakshSingla f406334
Merge branch 'master' into calcite-ext-prototype
LakshSingla c9d9bc9
Fix nullptr in DruidPlanner
LakshSingla ab57bc0
Add files for SqlInsert
LakshSingla 7a3e479
Revert setcontext changes, only insert changes being exposed
LakshSingla d791669
Cleanup code, ClusterBy will create a new SqlNode of type OrderBy
LakshSingla 5b741a6
Cleanup code, revert unnesecary changes
LakshSingla 2ddad66
Merge branch 'master' into calcite-ext-insert
LakshSingla 1845ddf
Remove contextMap from ParsedNodes
LakshSingla 2817a85
Add getter for partitionBy
LakshSingla 7d63e44
Checkstyle fix
LakshSingla a22eb0e
Add generated files to ignorelist of forbiddenapis
LakshSingla 1119dd0
indentation fix, add license to insert.ftl
LakshSingla 50ce3fb
Add testcases which plan using modified syntax
LakshSingla 472291c
Handle LIMIT/OFFSET clauses, add more testcases
LakshSingla 6c2fcf2
Exclude generated classes from spotbug/forbiddenapis
LakshSingla e31ebcc
Merge branch 'master' into calcite-ext-insert
LakshSingla 0b7dec6
Remove version from mvn-dep plugin, add sl4j dep
LakshSingla f78606c
Pass the partition by granularity in the querycontext
LakshSingla 4768209
Merge branch 'master' into calcite-ext-insert
LakshSingla c290a63
Address review comments, check on the granularity passed
LakshSingla 4f4cb77
Improve testcase for cluster by
LakshSingla 8371400
Fix build, add CLUSTER to kwds as well
LakshSingla 94d9175
fix format string
LakshSingla 585cd61
Make CLUSTER reserved keyword
LakshSingla 1e54241
POM changes - move plugin version to parent, scope=provided for slf4j
LakshSingla 4330703
Rename cluster to clustered, partition to partitioned
LakshSingla 0ae5570
Disallow ORDER BY in SELECT inside INSERT queries
LakshSingla 37728f2
Indent ftl properly, try cleanup around Insert and DruidSqlInsert
LakshSingla 4e63d27
checkstyle fix
LakshSingla 1b62e6c
Update the partition by clause
LakshSingla 960870a
Update the error messages in parsing class
LakshSingla 8717d0b
semicolon fix, javadoc
LakshSingla 72ae0bd
Add test cases for the util class
LakshSingla 5cbcb35
checkstyle fix
LakshSingla 38aa941
Partitioned by now a required clause
LakshSingla 7df0610
Update testcases, minor review comments
LakshSingla d8d57f4
fix test cases
LakshSingla d36bc2b
add tests, cleanup error message
LakshSingla eaaad27
Change the value of insert segment granularity in querycontext
LakshSingla b90ab16
minor fixes
LakshSingla e335214
intellij inspections
LakshSingla 2cef674
Exclude druidsqlinsert from codecov
LakshSingla 8d58136
Exclude druidsqlinsert from codecov2
LakshSingla 973d3fa
Missed testcase
LakshSingla dc2b45e
DruidSqlInsert.unparse working
LakshSingla 32244a6
Fix error messages
LakshSingla 5017257
Revert codecov exclude
LakshSingla 5b79694
reduce severity for parsing error log
LakshSingla 43b7388
intellij, test errors
LakshSingla ad78bba
unused import
LakshSingla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix error messages
- Loading branch information
commit 32244a6c4fa626369592dae6255da77aa7937a35
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this error occurs, it's due to user error on one particular query, so it shouldn't be an ERROR that appears in the server logs. That should be reserved for really important stuff that cluster operators need to worry about.
However, there should be some way to get the stack trace, and we generally don't want to return it directly to users of the SQL API.
So in a situation like this I'd do
log.debug
instead oflog.error
, so server admins can see the stack trace if they really need to, but won't see it by default. That balances all of the relevant desires: server admins shouldn't see "user error" stuff by default, and users shouldn't see stack traces as part of normal error messages.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with the correct level, thanks for the explanation.