Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17067#discussion_r103849099
  
    --- Diff: 
sql/core/src/test/resources/sql-tests/inputs/columnresolution-negative.sql ---
    @@ -0,0 +1,36 @@
    +-- Negative testcases for column resolution
    +CREATE DATABASE mydb1;
    +USE mydb1;
    +CREATE TABLE t1 USING parquet AS SELECT 1 AS i1;
    +
    +CREATE DATABASE mydb2;
    +USE mydb2;
    +CREATE TABLE t1 USING parquet AS SELECT 20 AS i1;
    +
    +-- Negative tests: column resolution scenarios with ambiguous cases in 
join queries
    +set spark.sql.crossJoin.enabled = true;
    +USE mydb1;
    +SELECT i1 FROM t1, mydb1.t1;
    +SELECT t1.i1 FROM t1, mydb1.t1;
    +SELECT mydb1.t1.i1 FROM t1, mydb1.t1;
    +SELECT i1 FROM t1, mydb2.t1;
    +SELECT t1.i1 FROM t1, mydb2.t1;
    +USE mydb2;
    +SELECT i1 FROM t1, mydb1.t1;
    +SELECT t1.i1 FROM t1, mydb1.t1;
    +SELECT i1 FROM t1, mydb2.t1;
    +SELECT t1.i1 FROM t1, mydb2.t1;
    +SELECT db1.t1.i1 FROM t1, mydb2.t1;
    +
    +-- Negative tests
    +USE mydb1;
    +SELECT mydb1.t1 FROM t1;
    +SELECT t1.x.y.* FROM t1;
    +SELECT t1 FROM mydb1.t1;
    +USE mydb2;
    +SELECT mydb1.t1.i1 FROM t1;
    +
    +-- reset
    +set spark.sql.crossJoin.enabled = false;
    +DROP DATABASE mydb1 CASCADE;
    +DROP DATABASE mydb2 CASCADE;
    --- End diff --
    
    Please add one empty space after this line


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to