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

Getting metadata after executing group by query is giving wrong meta data

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0, 0.8.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Hadoop 0.20.1, Hive0.8.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).

      Description

      The following group by query returned wrong meta data

      create table sampletable (key string,value string) PARTITIONED BY(dt STRING, country STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '@';
      
      LOAD DATA LOCAL INPATH '/home/data/details1.txt' OVERWRITE INTO TABLE sampletable partition (dt='21Oct',country='x');
      
      select * from sampletable group by key,value;
      
      "Meta Data :"+resutSet.getMetaData().getColumnName(1)+" --- Data :"+resutSet.getString(1)
      
      

      Ouput:

      "Meta Data :"resutSet.getMetaData().getColumnName(1)" — Data :"+resutSet.getString(1)

      Meta Data :(tok_table_or_col key)--- Data :122
      Meta Data :(tok_table_or_col key)--- Data :123
      Meta Data :(tok_table_or_col key)--- Data :124

      Expected Output:

      Meta Data : key — Data :122
      Meta Data : key — Data :123
      Meta Data : key — Data :124

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chinnalalam Chinna Rao Lalam
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: