Skip to content
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

[SPARK-30238][SQL][2.4] hive partition pruning can only support string and integral types #26876

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

backport #26871


Check the partition column data type and only allow string and integral types in hive partition pruning.

Currently we only support string and integral types in hive partition pruning, but the check is done for literals. If the predicate is InSet, then there is no literal and we may pass an unsupported partition predicate to Hive and cause problems.

… integral types

Check the partition column data type and only allow string and integral types in hive partition pruning.

Currently we only support string and integral types in hive partition pruning, but the check is done for literals. If the predicate is `InSet`, then there is no literal and we may pass an unsupported partition predicate to Hive and cause problems.

yes. fix a bug. A query fails before and can run now.

a new test

Closes apache#26871 from cloud-fan/bug.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@cloud-fan
Copy link
Contributor Author

cc @dongjoon-hyun @viirya

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

pending test.

@SparkQA
Copy link

SparkQA commented Dec 13, 2019

Test build #115279 has finished for PR 26876 at commit 8f3b3cf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

Merged to branch-2.4

HyukjinKwon pushed a commit that referenced this pull request Dec 13, 2019
…g and integral types

backport #26871

-----

Check the partition column data type and only allow string and integral types in hive partition pruning.

Currently we only support string and integral types in hive partition pruning, but the check is done for literals. If the predicate is `InSet`, then there is no literal and we may pass an unsupported partition predicate to Hive and cause problems.

Closes #26876 from cloud-fan/backport.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@cloud-fan cloud-fan closed this Dec 13, 2019
@dongjoon-hyun
Copy link
Member

+1, late LGTM! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants