-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Avoid pushdown IS (NOT) NULL expression on numeric types to Glue
#13138
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
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 |
|---|---|---|
|
|
@@ -147,6 +147,14 @@ static Optional<String> buildGlueExpressionForSingleDomain(String columnName, Do | |
| return Optional.empty(); | ||
| } | ||
|
|
||
| // Glue throws an exception (e.g. input string: "__HIVE_D" is not an integer) | ||
| // for column <> '__HIVE_DEFAULT_PARTITION__' or column = '__HIVE_DEFAULT_PARTITION__' expression on numeric types | ||
|
Member
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. Is there is any specific reason on not using
Member
Author
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. @findinpath and I confirmed the expression returns incorrect result. Let me leave a code comment.
Member
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. Similar behavior is shown even for
Member
Author
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. Yes, it behaves same regardless of the types. (We already shared this issue with AWS engineers)
Member
Author
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. @Praveen2112 Added a comment. Please take another look. |
||
| // "IS NULL" operator in the official documentation always returns empty result regardless of the type. | ||
| // https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-partitions.html#aws-glue-api-catalog-partitions-GetPartitions | ||
| if ((domain.getValues().isAll() || domain.getValues().isNone()) && !isQuotedType(domain.getType())) { | ||
| return Optional.empty(); | ||
| } | ||
|
Member
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. The code below doesn't handle the #13214 should make it clear (it doesn't solve the problem just yet)
Member
Author
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. Thanks for your explanation. I was going to handle |
||
|
|
||
| if (domain.getValues().isAll()) { | ||
| return Optional.of(format("(%s <> '%s')", columnName, NULL_STRING)); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.