mdayakar commented on code in PR #5005: URL: https://github.com/apache/hive/pull/5005#discussion_r1454876791
########## 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: @aturoczy we can not create a table or a column with .(dot) in its name so here if .(dot) is there in the name means its _<table_name>.<column_name>_. ``` 0: jdbc:hive2://localhost> create table tab.emp(id int, name string); Error: Error while compiling statement: FAILED: SemanticException [Error 10072]: Database does not exist: tab (state=42000,code=10072) 0: jdbc:hive2://localhost> create table tab(id.new int, name.first string); Error: Error while compiling statement: FAILED: ParseException line 1:19 cannot recognize input near '.' 'new' 'int' in column type (state=42000,code=40000) 0: jdbc:hive2://localhost> ``` -- 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