Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17185#discussion_r104817091
  
    --- Diff: 
sql/core/src/test/resources/sql-tests/inputs/columnresolution-views.sql ---
    @@ -13,10 +13,8 @@ DROP VIEW view1;
     -- Test scenario with Global Temp view
     CREATE OR REPLACE GLOBAL TEMPORARY VIEW view1 as SELECT 1 as i1;
     SELECT * FROM global_temp.view1;
    --- TODO: Support this scenario
     SELECT global_temp.view1.* FROM global_temp.view1;
    --- End diff --
    
    I'm not sure if this is a valid case. We should treat `SELECT ... FROM ...` 
as a 2-levels look up: Level 1, in `FROM` statement, we specify the table name 
with an optional qualifier(database name). Level 2, in `SELECT` statement, we 
specify the column name with an optional qualifier(table name).
    
    I don't think it makes sense to specify the database name for column name, 
the table lookup should be done in the `FROM` statement.


---
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