You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Pajaraja (via GitHub)" <gi...@apache.org> on 2025/12/25 18:59:34 UTC
[PR] [SQL][MINOR] Add timezone to replacement of Uniform [spark]
Pajaraja opened a new pull request, #53615:
URL: https://github.com/apache/spark/pull/53615
### What changes were proposed in this pull request?
Added the timezone to the CAST that happens in the replacement of the UNIFORM expression.
### Why are the changes needed?
Since this Cast doesn't need any information about time zones, they are not explicitly needed. However, ResolveTimeZone in the analyzer does put the timezone into every cast created before analysis. This causes a problem between the fixed-point and single-pass analyzer, since reanalyzing queries produces different results (single-pass reanalyzes the plan and puts the timezone for the new Cast, while the fixed-point considers the Cast already resolved and doesn't do anything).
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Single pass analyzer is enabled in dual run mode in the cte-recursion golden file (and ctePrecedencePolicy isn't set to EXCEPTION), so the golden file is being ran on in the singe-pass analyzer. However, since recursive CTEs are still not in single pass, the new analyzer is only invoked in the recursion steps. Without this change, the query
```
WITH RECURSIVE randoms(val) AS (
SELECT CAST(UNIFORM(1, 6, 82374) AS INT)
UNION ALL
SELECT CAST(UNIFORM(1, 6, 237685) AS INT)
FROM randoms
)
SELECT val FROM randoms LIMIT 5;
```
fails with plan_mismatch_error (while executing the anchor).
### Was this patch authored or co-authored using generative AI tooling?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SQL][MINOR] Extend Uniform to be TimeZoneAwareExpression [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53615:
URL: https://github.com/apache/spark/pull/53615#issuecomment-3745035172
## ⚠️ Pull Request Title Validation
This pull request title does not contain a JIRA issue ID.
Please update the title to either:
- Include a JIRA ID: `[SPARK-12345] Your description`
- Mark as minor change: `[MINOR] Your description`
For minor changes that don't require a JIRA ticket (e.g., typo fixes), please prefix the title with `[MINOR]`.
---
*This comment was automatically generated by GitHub Actions*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [MINOR][SQL] Extend Uniform to be TimeZoneAwareExpression [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan closed pull request #53615: [MINOR][SQL] Extend Uniform to be TimeZoneAwareExpression
URL: https://github.com/apache/spark/pull/53615
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [MINOR][SQL] Extend Uniform to be TimeZoneAwareExpression [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on PR #53615:
URL: https://github.com/apache/spark/pull/53615#issuecomment-3747787612
thanks, merging to master!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org