Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1446#discussion_r150402085
--- Diff:
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
---
@@ -300,14 +302,30 @@ private AbsoluteTableIdentifier
getAbsoluteTableIdentifier(Configuration configu
@Override public List<InputSplit> getSplits(JobContext job) throws
IOException {
AbsoluteTableIdentifier identifier =
getAbsoluteTableIdentifier(job.getConfiguration());
SegmentUpdateStatusManager updateStatusManager = new
SegmentUpdateStatusManager(identifier);
+ CarbonTable carbonTable =
getOrCreateCarbonTable(job.getConfiguration());
+ if (null == carbonTable) {
+ throw new IOException("Missing/Corrupt schema file for table.");
+ }
+ CarbonSessionInfo carbonSessionInfo =
ThreadLocalSessionInfo.getCarbonSessionInfo();
+ String aggregateTableSegments = "";
+ Boolean validateAggregateTableSegments = true;
+ if (carbonSessionInfo != null) {
+ aggregateTableSegments =
carbonSessionInfo.getSessionParams().getProperty(
+ CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
identifier.getCarbonTableIdentifier()
--- End diff --
Better don't access here, just set the validation required or not from
CarbonScanRDD and here use that boolean to skip the validation.
---