Skip to content

Commit

Permalink
Merge 92af62d into 581591a
Browse files Browse the repository at this point in the history
  • Loading branch information
dhatchayani committed Jun 18, 2019
2 parents 581591a + 92af62d commit c168cfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -105,7 +105,7 @@ private void initialize(InputSplit inputSplit, Configuration conf) throws IOExce
valueObj = new ArrayWritable(Writable.class, new Writable[columnTypes.size()]);
}

if (!colIds.equals("")) {
if (null != colIds && !colIds.equals("")) {
String[] arraySelectedColId = colIds.split(",");
columnIds = new int[arraySelectedColId.length];
int columnId = 0;
Expand Down
Expand Up @@ -131,6 +131,8 @@ public RecordReader<Void, ArrayWritable> getRecordReader(InputSplit inputSplit,
}
QueryModel queryModel = null;
try {
jobConf.set(DATABASE_NAME, "_dummyDb_" + UUID.randomUUID().toString());
jobConf.set(TABLE_NAME, "_dummyTable_" + UUID.randomUUID().toString());
queryModel = getQueryModel(jobConf, path);
} catch (InvalidConfigurationException e) {
LOGGER.error("Failed to create record reader: " + e.getMessage(), e);
Expand Down Expand Up @@ -181,7 +183,7 @@ private String getProjection(Configuration configuration, CarbonTable carbonTabl
allColumns.append(column.getColName() + ",");
}

if (!projection.equals("")) {
if (null != projection && !projection.equals("")) {
String[] columnNames = projection.split(",");
//verify that the columns parsed by Hive exist in the table
for (String col : columnNames) {
Expand Down

0 comments on commit c168cfa

Please sign in to comment.