You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/17 16:11:42 UTC

[GitHub] [hive] jcamachor commented on a change in pull request #1865: HIVE-24633: Support CTE with column labels

jcamachor commented on a change in pull request #1865:
URL: https://github.com/apache/hive/pull/1865#discussion_r559202460



##########
File path: ql/src/test/queries/clientpositive/cte_8.q
##########
@@ -0,0 +1,34 @@
+set hive.cli.print.header=true;
+
+create table t1(int_col int, bigint_col bigint);
+
+insert into t1 values(1, 2), (3, 4);
+
+explain cbo
+with cte1(a, b) as (select int_col x, bigint_col y from t1)
+select a, b from cte1;
+
+with cte1(a, b) as (select int_col x, bigint_col y from t1)
+select a, b from cte1;
+
+with cte1(a) as (select int_col x, bigint_col y from t1)

Review comment:
       What happens for the following query?
   ```
   with cte1(a) as (select int_col x, bigint_col a from t1)
   ...
   ```
   Basically the `a` alias will clash. What is our behavior compared to other RDBMS that allows this such as PG? Can we add the test?
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org