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

JDBC client's hive variables are not passed to HS2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: JDBC
    • Labels:
      None
    • Release Note:
      Hide
      We haven't documented the usage in which hive variables may be specified at hive JDBC url, which can be used to substitute parameters present in user query. For instance, jdbc:hive2://localhost:10000#D_TBL=dummy_t specifies a hive variable D_TBL with a value dummy_t. In user query, ${D_TBL} or ${hivevar:D_TBL} can be used to refer to the value dummy_t. Thus, a DDL, "create table ${D_TBL} (d int);" will create a table named dummy_t.

      The functionality was there for hive embedded mode. This JIRA will make this available for Hive remote mode as well.
      Show
      We haven't documented the usage in which hive variables may be specified at hive JDBC url, which can be used to substitute parameters present in user query. For instance, jdbc: hive2://localhost:10000#D_TBL=dummy_t specifies a hive variable D_TBL with a value dummy_t. In user query, ${D_TBL} or ${hivevar:D_TBL} can be used to refer to the value dummy_t. Thus, a DDL, "create table ${D_TBL} (d int);" will create a table named dummy_t. The functionality was there for hive embedded mode. This JIRA will make this available for Hive remote mode as well.

      Description

      Related to HIVE-2914. However, HIVE-2914 seems addressing Hive CLI only. JDBC clients suffer the same problem. This was identified in HIVE-4568. I decided it might be better to separate issue from a different issue.

        Attachments

        1. HIVE-5131.1.patch
          3 kB
          Xuefu Zhang
        2. HIVE-5131.patch
          2 kB
          Xuefu Zhang
        3. HIVE-5131.patch
          1 kB
          Xuefu Zhang

          Issue Links

            Activity

              People

              • Assignee:
                xuefuz Xuefu Zhang
                Reporter:
                xuefuz Xuefu Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: