Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1321#discussion_r136829721
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
---
@@ -639,6 +639,23 @@ case class LoadTable(
val carbonProperty: CarbonProperties = CarbonProperties.getInstance()
carbonProperty.addProperty("zookeeper.enable.lock", "false")
val optionsFinal = getFinalOptions(carbonProperty)
+ val tableProperties = relation.tableMeta.carbonTable.getTableInfo
+ .getFactTable.getTableProperties
+
+ optionsFinal.put("sort_scope",
tableProperties.getOrDefault("sort_scope",
+
carbonProperty.getProperty(CarbonLoadOptionConstants.CARBON_OPTIONS_SORT_SCOPE,
+ carbonProperty.getProperty(CarbonCommonConstants.LOAD_SORT_SCOPE,
+ CarbonCommonConstants.LOAD_SORT_SCOPE_DEFAULT))))
+
+ optionsFinal.put("batch_sort_size_inmb",
tableProperties.getOrDefault("batch_sort_size_inmb",
--- End diff --
This is needed only if using batch sort
---