Hive
  1. Hive
  2. HIVE-2204

unable to get column names for a specific table that has '_' as part of its table name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: JDBC
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I have a table age_group and I am trying to get list of columns for this table name. As underscore and '%' have special meaning in table search pattern according to JDBC searchPattern string specification, I escape the '_' in my table name when I call getColumns for this single table. But HIVE does not return any columns. My call to getColumns is as follows
      catalog <null>
      schemaPattern "%"
      tableNamePattern "age_group"
      columnNamePattern "%"

      If I don't escape the '_' in my tableNamePattern, I am able to get the list of columns.

      1. HIVE-2204.patch
        10 kB
        Patrick Hunt

        Activity

        Hide
        Patrick Hunt added a comment -

        Added handling of escaped wildcard characters. Also updated jdbc tests to verify.

        Show
        Patrick Hunt added a comment - Added handling of escaped wildcard characters. Also updated jdbc tests to verify.
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/1106/
        -----------------------------------------------------------

        Review request for hive and Carl Steinbach.

        Summary
        -------

        Added additional handling for escaped wildcards.

        This addresses bug HIVE-2204.
        https://issues.apache.org/jira/browse/HIVE-2204

        Diffs


        jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java d1ff509
        jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java 591fa1f

        Diff: https://reviews.apache.org/r/1106/diff

        Testing
        -------

        added new tests, all tests pass for me.

        Thanks,

        Patrick

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1106/ ----------------------------------------------------------- Review request for hive and Carl Steinbach. Summary ------- Added additional handling for escaped wildcards. This addresses bug HIVE-2204 . https://issues.apache.org/jira/browse/HIVE-2204 Diffs jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java d1ff509 jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java 591fa1f Diff: https://reviews.apache.org/r/1106/diff Testing ------- added new tests, all tests pass for me. Thanks, Patrick
        Hide
        Carl Steinbach added a comment -

        +1. Will commit if tests pass.

        Show
        Carl Steinbach added a comment - +1. Will commit if tests pass.
        Hide
        Carl Steinbach added a comment -

        Committed to trunk. Thanks Patrick!

        Show
        Carl Steinbach added a comment - Committed to trunk. Thanks Patrick!
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #827 (See https://builds.apache.org/job/Hive-trunk-h0.21/827/)
        HIVE-2204. Unable to get column names for a specific table that has '_' as part of its table name (Patrick Hunt via cws)

        cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1146828
        Files :

        • /hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java
        • /hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #827 (See https://builds.apache.org/job/Hive-trunk-h0.21/827/ ) HIVE-2204 . Unable to get column names for a specific table that has '_' as part of its table name (Patrick Hunt via cws) cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1146828 Files : /hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java /hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java

          People

          • Assignee:
            Patrick Hunt
            Reporter:
            Mythili Gopalakrishnan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development