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-35437][SQL][FOLLOWUP] Relax cast if does not need timezone with PrunePartitionsFastFallback #34981

Closed
wants to merge 1 commit into from

Conversation

ulysses-you
Copy link
Contributor

@ulysses-you ulysses-you commented Dec 22, 2021

What changes were proposed in this pull request?

Allow Cast during prunePartitionsFastFallback if it actually does not require the timezone.

The original PR #34431

Why are the changes needed?

Make prunePartitionsFastFallback work with more cases.

For example, one partition column data type is StringType but the query with the partition predicate using IntegerType

CREATE TABLE t(c int) PARTITIONED BY(p string);
SELECT * FROM t WHERE p = 20210101;

Does this PR introduce any user-facing change?

no, not released and this pr itself just affects the perf.

How was this patch tested?

Add some test for Cast who need or does not need time zone.

@github-actions github-actions bot added the SQL label Dec 22, 2021
@SparkQA
Copy link

SparkQA commented Dec 22, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50946/

@SparkQA
Copy link

SparkQA commented Dec 22, 2021

Test build #146470 has finished for PR 34981 at commit 3a70db0.

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

@ulysses-you
Copy link
Contributor Author

cc @cxzl25 @sunchao @cloud-fan

@SparkQA
Copy link

SparkQA commented Dec 22, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50946/

@cloud-fan
Copy link
Contributor

Can you link to the original PR in your PR description?

@ulysses-you
Copy link
Contributor Author

Can you link to the original PR in your PR description?

updated

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in d1cf8ff Dec 22, 2021
@ulysses-you
Copy link
Contributor Author

thank you @cloud-fan

@ulysses-you ulysses-you deleted the SPARK-35437-FOLLOWUP branch December 22, 2021 10:46
domybest11 pushed a commit to domybest11/spark that referenced this pull request Jun 15, 2022
…h PrunePartitionsFastFallback

Allow `Cast` during `prunePartitionsFastFallback` if it actually does not require the timezone.

The original PR apache#34431

Make `prunePartitionsFastFallback` work with more cases.

For example, one partition column data type is `StringType` but the query with the partition predicate using `IntegerType`
```sql
CREATE TABLE t(c int) PARTITIONED BY(p string);
SELECT * FROM t WHERE p = 20210101;
```

no, not released and this pr itself just affects the perf.

Add some test for `Cast` who need or does not need time zone.

Closes apache#34981 from ulysses-you/SPARK-35437-FOLLOWUP.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit d1cf8ff)
kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…h PrunePartitionsFastFallback

### What changes were proposed in this pull request?

Allow `Cast` during `prunePartitionsFastFallback` if it actually does not require the timezone.

The original PR apache#34431

### Why are the changes needed?

Make `prunePartitionsFastFallback` work with more cases.

For example, one partition column data type is `StringType` but the query with the partition predicate using `IntegerType`
```sql
CREATE TABLE t(c int) PARTITIONED BY(p string);
SELECT * FROM t WHERE p = 20210101;
```

### Does this PR introduce _any_ user-facing change?

no, not released and this pr itself just affects the perf.

### How was this patch tested?

Add some test for `Cast` who need or does not need time zone.

Closes apache#34981 from ulysses-you/SPARK-35437-FOLLOWUP.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants