spark-instrumented-optimizer/sql/catalyst/src/main
Chao Sun 482a79a5e3 [SPARK-24994][SQL][FOLLOW-UP] Handle foldable, timezone and cleanup
### What changes were proposed in this pull request?

This is a follow-up on #29565, and addresses a few issues in the last PR:
- style issue pointed by [this comment](https://github.com/apache/spark/pull/29565#discussion_r487646749)
- skip optimization when `fromExp` is foldable (by [this comment](https://github.com/apache/spark/pull/29565#discussion_r487646973)) as there could be more efficient rule to apply for this case.
- pass timezone info to the generated cast on the literal value
- a bunch of cleanups and test improvements

Originally I plan to handle this when implementing [SPARK-32858](https://issues.apache.org/jira/browse/SPARK-32858) but now think it's better to isolate these changes from that.

### Why are the changes needed?

To fix a few left over issues in the above PR.

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

No

### How was this patch tested?

Added a test for the foldable case. Otherwise relying on existing tests.

Closes #29775 from sunchao/SPARK-24994-followup.

Authored-by: Chao Sun <sunchao@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
2020-09-17 07:50:39 -07:00
..
antlr4/org/apache/spark/sql/catalyst/parser [SPARK-32718][SQL] Remove unnecessary keywords for interval units 2020-08-29 14:06:01 -07:00
java/org/apache/spark/sql [MINOR][DOCS] fix typo for docs,log message and comments 2020-08-22 06:45:35 +09:00
resources [SPARK-31385][SQL] Restrict micros rebasing via switch arrays up to 2037 year 2020-04-20 06:35:16 +00:00
scala/org/apache/spark/sql [SPARK-24994][SQL][FOLLOW-UP] Handle foldable, timezone and cleanup 2020-09-17 07:50:39 -07:00
scala-2.12/org/apache/spark/sql/catalyst [SPARK-32800][SQL] Remove ExpressionSet from the 2.13 branch 2020-09-06 09:44:07 +09:00
scala-2.13/org/apache/spark/sql/catalyst [SPARK-30090][SHELL] Adapt Spark REPL to Scala 2.13 2020-09-12 18:15:15 -05:00