Review Board 1.7.22


Patch to fix HIVE-4789

Review Request #12100 - Created June 26, 2013 and submitted

Sean Busbey
Reviewers
hive
ashutoshc, jghoman, mwagner
hive
HIVE-3953 fixed using partitioned avro tables for anything that used the MapOperator, but those that rely on FetchOperator still fail with the same error.
e.g.
  SELECT * FROM partitioned_avro LIMIT 5;
  SELECT * FROM partitioned_avro WHERE partition_col=value;
reran avro partition unit tests and partition_wise_fileformat*.q
trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
Revision 1518830 New Change
[20] 387 lines
[+20] [+] private void getNextPath() throws Exception {
388
      }
388
      }
389
      this.inputSplits = inputSplits;
389
      this.inputSplits = inputSplits;
390

    
   
390

   
391
      splitNum = 0;
391
      splitNum = 0;
392
      serde = partDesc.getDeserializerClass().newInstance();
392
      serde = partDesc.getDeserializerClass().newInstance();
393
      serde.initialize(job, partDesc.getProperties());
393
      serde.initialize(job, partDesc.getOverlayedProperties());
394

    
   
394

   
395
      if (currTbl != null) {
395
      if (currTbl != null) {
396
        tblSerde = serde;
396
        tblSerde = serde;
397
      }
397
      }
398
      else {
398
      else {
[+20] [20] 9 lines
[+20] private void getNextPath() throws Exception {
408
          serde.getObjectInspector(), outputOI);
408
          serde.getObjectInspector(), outputOI);
409

    
   
409

   
410
      if (LOG.isDebugEnabled()) {
410
      if (LOG.isDebugEnabled()) {
411
        LOG.debug("Creating fetchTask with deserializer typeinfo: "
411
        LOG.debug("Creating fetchTask with deserializer typeinfo: "
412
            + serde.getObjectInspector().getTypeName());
412
            + serde.getObjectInspector().getTypeName());
413
        LOG.debug("deserializer properties: " + partDesc.getProperties());
413
        LOG.debug("deserializer properties: " + partDesc.getOverlayedProperties());
414
      }
414
      }
415

    
   
415

   
416
      if (currPart != null) {
416
      if (currPart != null) {
417
        getRowInspectorFromPartition(currPart, outputOI);
417
        getRowInspectorFromPartition(currPart, outputOI);
418
      }
418
      }
[+20] [20] 202 lines
[+20] [+] public ObjectInspector getOutputObjectInspector() throws HiveException {
621

    
   
621

   
622
      // Get the OI corresponding to all the partitions
622
      // Get the OI corresponding to all the partitions
623
      for (PartitionDesc listPart : listParts) {
623
      for (PartitionDesc listPart : listParts) {
624
        partition = listPart;
624
        partition = listPart;
625
        Deserializer partSerde = listPart.getDeserializerClass().newInstance();
625
        Deserializer partSerde = listPart.getDeserializerClass().newInstance();
626
        partSerde.initialize(job, listPart.getProperties());
626
        partSerde.initialize(job, listPart.getOverlayedProperties());
627

    
   
627

   
628
        partitionedTableOI = ObjectInspectorConverters.getConvertedOI(
628
        partitionedTableOI = ObjectInspectorConverters.getConvertedOI(
629
            partSerde.getObjectInspector(), tableOI);
629
            partSerde.getObjectInspector(), tableOI);
630
        if (!partitionedTableOI.equals(tableOI)) {
630
        if (!partitionedTableOI.equals(tableOI)) {
631
          break;
631
          break;
[+20] [20] 51 lines
trunk/ql/src/test/queries/clientpositive/avro_partitioned.q
Revision 1518830 New Change
 
trunk/ql/src/test/results/clientpositive/avro_partitioned.q.out
Revision 1518830 New Change
 
  1. trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java: Loading...
  2. trunk/ql/src/test/queries/clientpositive/avro_partitioned.q: Loading...
  3. trunk/ql/src/test/results/clientpositive/avro_partitioned.q.out: Loading...