MaxGekk opened a new pull request, #41220:
URL: https://github.com/apache/spark/pull/41220
### What changes were proposed in this pull request?
In the PR, I propose to propagate all tags in a `Project` while resolving of
expressions and missing columns in
`ColumnResolutionHelper.resolveExprsAndAddMissingAttrs()`.
### Why are the changes needed?
To fix the bug reproduced by the query below:
```sql
spark-sql (default)> WITH
> t1 AS (select key from values ('a') t(key)),
> t2 AS (select key from values ('a') t(key))
> SELECT t1.key
> FROM t1 FULL OUTER JOIN t2 USING (key)
> WHERE t1.key NOT LIKE 'bb.%';
[UNRESOLVED_COLUMN.WITH_SUGGESTION] A column or function parameter with name
`t1`.`key` cannot be resolved. Did you mean one of the following? [`key`].;
line 4 pos 7;
```
### Does this PR introduce _any_ user-facing change?
No. It fixes a bug, and outputs the expected result: `a`.
### How was this patch tested?
By new test added to `using-join.sql`:
```
$ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly
org.apache.spark.sql.SQLQueryTestSuite -- -z using-join.sql"
```
and the related test suites:
```
$ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly
org.apache.spark.sql.hive.HiveContextCompatibilitySuite"
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]