Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1613#discussion_r155249189
--- Diff:
integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala
---
@@ -359,14 +359,24 @@ class CarbonScanRDD(
}
val carbonSessionInfo = ThreadLocalSessionInfo.getCarbonSessionInfo
if (carbonSessionInfo != null) {
- CarbonTableInputFormat.setAggeragateTableSegments(conf,
carbonSessionInfo.getSessionParams
- .getProperty(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
- identifier.getCarbonTableIdentifier.getDatabaseName +
"." +
- identifier.getCarbonTableIdentifier.getTableName, ""))
- CarbonTableInputFormat.setValidateSegmentsToAccess(conf,
carbonSessionInfo.getSessionParams
+ if (carbonSessionInfo.getSessionParams
+ .getProperty(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
+
identifier.getCarbonTableIdentifier.getDatabaseName + "." +
+ identifier.getCarbonTableIdentifier.getTableName)
!= null) {
+ CarbonTableInputFormat.setAggeragateTableSegments(conf,
carbonSessionInfo.getSessionParams
+ .getProperty(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
+ identifier.getCarbonTableIdentifier.getDatabaseName
+ "." +
+ identifier.getCarbonTableIdentifier.getTableName))
+ }
+ if (carbonSessionInfo.getSessionParams
+
.getProperty(CarbonCommonConstants.VALIDATE_CARBON_INPUT_SEGMENTS +
+
identifier.getCarbonTableIdentifier.getDatabaseName + "." +
+ identifier.getCarbonTableIdentifier.getTableName)
!= null) {
--- End diff --
Please take this to variable and reuse it
---