Github user bhavya411 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1142#discussion_r126392544
--- Diff:
integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
---
@@ -111,58 +108,46 @@ private void initialize(InputSplit inputSplit,
Configuration conf) throws IOExce
} else {
columnTypes =
TypeInfoUtils.getTypeInfosFromTypeString(columnTypeProperty);
}
+
+ if (valueObj == null) {
+ valueObj = new ArrayWritable(Writable.class, new
Writable[columnTypes.size()]);
+ }
--- End diff --
Actually the data structure should be consistent, initially we were just
returning the project columns and the Arraywritable was having variable length
but in Parquet and ORC both implementation the ArrayWritable length was
equivalent to the number of columns in table . It was causing issues in TPCh
queries so that's why made changes to have Arraywritable size equivalent to
number of columns and then populate the data at respective position
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---