Revision c0d91098b4d79360996569b5414d3dc11cf51dcf authored by Wenchen Fan on 28 June 2022, 14:40:41 UTC, committed by Wenchen Fan on 28 June 2022, 14:41:40 UTC
### What changes were proposed in this pull request?

`ResolveInlineTables` requires the column expressions to be foldable, however, `Alias` is not foldable. Inline-table does not use the names in the column expressions, and we should trim aliases before checking foldable. We did something similar in `ResolvePivot`.

### Why are the changes needed?

To make inline-table handle more cases, and also fixed a regression caused by https://github.com/apache/spark/pull/31844 . After https://github.com/apache/spark/pull/31844 , we always add an alias for function literals like `current_timestamp`, which breaks inline table.

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

yea, some failed queries can be run after this PR.

### How was this patch tested?

new tests

Closes #36967 from cloud-fan/bug.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 1df992f03fd935ac215424576530ab57d1ab939b)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent 359bc3f
History

README.md

back to top