okumin commented on code in PR #5232:
URL: https://github.com/apache/hive/pull/5232#discussion_r1587966282


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -8379,7 +8402,9 @@ private ColsAndTypes deriveFileSinkColTypes(
       String colName = colInfo.getInternalName();  //default column name
       if (columns != null) {
         FieldSchema col = new FieldSchema();
-        if (!("".equals(nm[0])) && nm[1] != null) {
+        if (i < withColList.size()) {

Review Comment:
   Using a random name when <with column list> is shorter than the input. This 
follows the behavior of non-materialized CTEs.
   If I understand correctly, with-column-list is supported only when the 
number of columns is exactly equal to that of the query expression. So, it 
could be an option to make a query fail if `colInfos.size() != 
withColList.size()`.



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to