Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1563#discussion_r153711584
--- Diff:
integration/spark-common/src/main/scala/org/apache/spark/util/CarbonReflectionUtils.scala
---
@@ -140,10 +140,15 @@ object CarbonReflectionUtils {
def getSessionState(sparkContext: SparkContext, carbonSession: Object):
Any = {
if (sparkContext.version.startsWith("2.1")) {
- createObject("org.apache.spark.sql.hive.CarbonSessionState",
carbonSession)._1
+ val className = sparkContext.conf
+ .get("spark.carbon.sessionstate.classname",
"org.apache.spark.sql.hive.CarbonSessionState")
+ createObject(className, carbonSession)._1
} else if (sparkContext.version.startsWith("2.2")) {
+ val className = sparkContext.conf
+ .get("spark.carbon.sessionstate.classname",
+ "org.apache.spark.sql.hive.CarbonSessionStateBuilder")
val tuple =
- createObject("org.apache.spark.sql.hive.CarbonSessionStateBuilder",
+ createObject(className,
--- End diff --
move `className` to nest line
---