-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[WIP][SQL][TESTS] Disable stable column aliases in tests if assumed #51337
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5580,7 +5580,7 @@ object SQLConf { | |
"and form them via pretty SQL print.") | ||
.version("3.5.0") | ||
.booleanConf | ||
.createWithDefault(false) | ||
.createWithDefault(true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have done it earlier to make sure this feature works well by passing all tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should handle test failures carefully and figure out if there is any bug in this feature, instead of blindly turning off the config. This will take a long time and we should invite the community to work on it together. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I switched the config only to detect the tests that make some assumption about column aliases algorithm. Not going to merge it.
I agree. We should. |
||
|
||
val LOCAL_RELATION_CACHE_THRESHOLD = | ||
buildConf(SqlApiConfHelper.LOCAL_RELATION_CACHE_THRESHOLD_KEY) | ||
|
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.
can we change the test query to add explicit alias?
Uh oh!
There was an error while loading. Please reload this page.
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.
Yep, this could be another way, but this require much more work. I will try my best, and change some test in this way.
Uh oh!
There was an error while loading. Please reload this page.
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.
I think it's better to not randomly switch this conf here and there. We just need to publish a good habit for writing tests: alias the expressions when necessary to have stable alias.
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.
It is good idea, but before implementing this we should make sure that existing tests are reliable to such behaviour otherwise we will destabilize the existing CI.
Habits is nice, and I believe if a test writer assumes some naming convention, this assumption should be explicit via a config set otherwise he/she should assign an alias. How about to put this statement to the coding style?
I will do when it is obvious, but some tests are depend
SQLConf.STABLE_DERIVED_COLUMN_ALIAS_ENABLED
for unknown reasons at least for me (I cannot say why without investigation). For instance, the simple case where names should be the same in plan and in the query independently from the config:fails with: