Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-28214

HPLSQL not using the hive variables passed through beeline using --hivevar option

    XMLWordPrintableJSON

Details

    Description

      HPLSQL not using the hive variables passed through beeline using --hivevar option.

      Steps to reproduce:

      beeline -u 'jdbc:hive2://localhost:10000/default;user=hive;password=hive;mode=hplsql' --hivevar hivedb=sys --hivevar hivetbl=tbls
      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>
      

      Attachments

        Issue Links

          Activity

            People

              Dayakar Dayakar M
              Dayakar Dayakar M
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: