aturoczy commented on code in PR #5005:
URL: https://github.com/apache/hive/pull/5005#discussion_r1454088170


##########
hplsql/src/main/java/org/apache/hive/hplsql/Stmt.java:
##########
@@ -957,7 +957,11 @@ public Integer 
forCursor(HplsqlParser.For_cursor_stmtContext ctx) {
       int cols = query.columnCount();
       Row row = new Row();
       for (int i = 0; i < cols; i++) {
-        row.addColumnDefinition(query.metadata().columnName(i), 
query.metadata().columnTypeName(i));
+        String columnName = query.metadata().columnName(i);
+        if (columnName.contains(".")) {
+          columnName = columnName.substring(columnName.lastIndexOf('.') + 1);

Review Comment:
   Just try to be a stupid engineer?
   How about table like
   
   col1.
   col2...
   col3.tab1.nice
   
   I would add negative tests as well. 



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