Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1647#discussion_r156363228
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/CastExpressionOptimization.scala
---
@@ -367,6 +474,13 @@ object CastExpressionOptimization {
} else {
Some(CastExpr(c))
}
+ case s: ShortType if t.sameType(IntegerType) =>
+ val value = v.asInstanceOf[Integer].toShort
+ if (value.toShort.equals(v)) {
--- End diff --
change it to toInt
---