Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13554 [Umbrella] SQL:2011 compliance
  3. HIVE-15976

Support CURRENT_CATALOG and CURRENT_SCHEMA

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • SQL
    • None

    Description

      Support these keywords for querying the current catalog and schema. SQL reference: section 6.4

      oracle
      CREATE TABLE CURRENT_SCHEMA (col VARCHAR2(1)); – ok
      SELECT CURRENT_SCHEMA FROM DUAL; – error, ORA-00904: "CURRENT_SCHEMA": invalid identifier
      SELECT CURRENT_SCHEMA() FROM DUAL; – error, ORA-00904: "CURRENT_SCHEMA": invalid identifier

      postgres
      CREATE TABLE CURRENT_SCHEMA (col VARCHAR(1)); – error: syntax error at or near "CURRENT_SCHEMA"
      SELECT CURRENT_SCHEMA; – ok, "public"
      SELECT CURRENT_SCHEMA(); – ok, "public"

      mysql
      CREATE TABLE CURRENT_SCHEMA (col VARCHAR(1)); – ok
      SELECT CURRENT_SCHEMA; – error, Unknown column 'CURRENT_SCHEMA' in 'field list'
      SELECT CURRENT_SCHEMA(); – error, FUNCTION db_9_e28e6f.CURRENT_SCHEMA does not exist

      Attachments

        1. HIVE-15976.01.patch
          17 kB
          László Bodor
        2. HIVE-15976.02.patch
          18 kB
          László Bodor
        3. HIVE-15976.03.patch
          17 kB
          László Bodor
        4. HIVE-15976.04.patch
          11 kB
          László Bodor
        5. HIVE-15976.05.patch
          11 kB
          László Bodor
        6. HIVE-15976.06.patch
          11 kB
          László Bodor
        7. HIVE-15976.07.patch
          11 kB
          László Bodor
        8. HIVE-15976.08.patch
          11 kB
          László Bodor

        Issue Links

          Activity

            People

              abstractdog László Bodor
              cartershanklin Carter Shanklin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: