[ https://issues.apache.org/jira/browse/HIVE-28214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dayakar M updated HIVE-28214: ----------------------------- Description: HPLSQL not using the hive variables passed through beeline using --hivevar option. Steps to reproduce: {noformat} beeline -u 'jdbc:hive2://localhost:10000/default;user=hive;password=hive;mode=hplsql' --hivevar hivedb=sys --hivevar hivetbl=tbls{noformat} {noformat} 0: jdbc:hive2://localhost> DECLARE hivedb_tbl string; . . . . . . . . . . . . . . . . . . . . . . .> SELECT hivedb || '.' || hivetbl into hivedb_tbl; . . . . . . . . . . . . . . . . . . . . . . .> PRINT hivedb_tbl; . . . . . . . . . . . . . . . . . . . . . . .> / INFO : Compiling command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb): SELECT CONCAT(hivedb, '.', hivetbl) ERROR : FAILED: SemanticException [Error 10004]: Line 1:14 Invalid table alias or column reference 'hivedb': (possible column names are: ) org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Invalid table alias or column reference 'hivedb': (possible column names are: ) INFO : Completed compiling command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb); Time taken: 3.976 seconds ERROR : Unhandled exception in HPL/SQL No rows affected (4.901 seconds) 0: jdbc:hive2://localhost> {noformat} was: HPLSQL not using the hive variables passed through beeline using --hivevar option. Steps to reproduce: {noformat} beeline -u 'jdbc:hive2://localhost:10000/default;user=hive;password=hive;mode=hplsql' --hivevar hivedb=sys --hivevar hivetbl=tbls{noformat} {noformat} 0: jdbc:hive2://localhost> DECLARE hivedb_tbl string; . . . . . . . . . . . . . . . . . . . . . . .> SELECT hivedb || '.' || hivetbl into hivedb_tbl; . . . . . . . . . . . . . . . . . . . . . . .> PRINT hivedb_tbl; . . . . . . . . . . . . . . . . . . . . . . .> / INFO : Compiling command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb): SELECT CONCAT(hivedb, '.', hivetbl) ERROR : FAILED: SemanticException [Error 10004]: Line 1:14 Invalid table alias or column reference 'hivedb': (possible column names are: ) org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Invalid table alias or column reference 'hivedb': (possible column names are: ) INFO : Completed compiling command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb); Time taken: 3.976 seconds ERROR : Unhandled exception in HPL/SQL No rows affected (4.901 seconds) 0: jdbc:hive2://localhost> {noformat} > HPLSQL not using the hive variables passed through beeline using --hivevar > option > --------------------------------------------------------------------------------- > > Key: HIVE-28214 > URL: https://issues.apache.org/jira/browse/HIVE-28214 > Project: Hive > Issue Type: Bug > Components: hpl/sql > Reporter: Dayakar M > Assignee: Dayakar M > Priority: Major > > HPLSQL not using the hive variables passed through beeline using --hivevar > option. > Steps to reproduce: > {noformat} > beeline -u > 'jdbc:hive2://localhost:10000/default;user=hive;password=hive;mode=hplsql' > --hivevar hivedb=sys --hivevar hivetbl=tbls{noformat} > {noformat} > 0: jdbc:hive2://localhost> DECLARE hivedb_tbl string; > . . . . . . . . . . . . . . . . . . . . . . .> SELECT hivedb || '.' || > hivetbl into hivedb_tbl; > . . . . . . . . . . . . . . . . . . . . . . .> PRINT hivedb_tbl; > . . . . . . . . . . . . . . . . . . . . . . .> / > INFO : Compiling > command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb): > SELECT CONCAT(hivedb, '.', hivetbl) > ERROR : FAILED: SemanticException [Error 10004]: Line 1:14 Invalid table > alias or column reference 'hivedb': (possible column names are: ) > org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Invalid table > alias or column reference 'hivedb': (possible column names are: ) > > INFO : Completed compiling > command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb); > Time taken: 3.976 seconds > ERROR : Unhandled exception in HPL/SQL > No rows affected (4.901 seconds) > 0: jdbc:hive2://localhost> > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)