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

serde fails when field name starts with underscore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • 0.3.0
    • None

    Description

      (Not sure if this is a metastore bug or serde bug)

      For the query:

      select count(1) from table

      HiveInterface.getSchema() returns:

      struct result

      { string _c0}

      DynamicSerDe.initialize() raises a lexical error:

      [junit] Lexical error at line 1, column 24. Encountered: "_" (95), after : ""
      [junit] org.apache.hadoop.hive.serde2.dynamic_type.TokenMgrError: Lexical error at line 1, column 24. Encountered: "_" (95), after : ""
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammarTokenManager.getNextToken(thrift_grammarTokenManager.java:1457)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.jj_consume_token(thrift_grammar.java:2233)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Field(thrift_grammar.java:1547)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.FieldList(thrift_grammar.java:1501)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Struct(thrift_grammar.java:1171)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.TypeDefinition(thrift_grammar.java:497)
      [junit] at org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Definition(thrift_grammar.java:439)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              michim Michi Mutsuzaki
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: