Skip to content
Snippets Groups Projects
Commit 2aff2ea8 authored by Reynold Xin's avatar Reynold Xin
Browse files

[SPARK-18214][SQL] Simplify RuntimeReplaceable type coercion


## What changes were proposed in this pull request?
RuntimeReplaceable is used to create aliases for expressions, but the way it deals with type coercion is pretty weird (each expression is responsible for how to handle type coercion, which does not obey the normal implicit type cast rules).

This patch simplifies its handling by allowing the analyzer to traverse into the actual expression of a RuntimeReplaceable.

## How was this patch tested?
- Correctness should be guaranteed by existing unit tests already
- Removed SQLCompatibilityFunctionSuite and moved it sql-compatibility-functions.sql
- Added a new test case in sql-compatibility-functions.sql for verifying explain behavior.

Author: Reynold Xin <rxin@databricks.com>

Closes #15723 from rxin/SPARK-18214.

(cherry picked from commit fd90541c)
Signed-off-by: default avatarReynold Xin <rxin@databricks.com>
parent 1eef8e5c
No related branches found
No related tags found
No related merge requests found
Showing
with 204 additions and 182 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment