Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1630#discussion_r156134688
--- Diff:
integration/spark-common/src/main/scala/org/apache/spark/util/CarbonReflectionUtils.scala
---
@@ -175,6 +175,17 @@ object CarbonReflectionUtils {
}
}
+ def getDescribeTableFormattedField[T: TypeTag : reflect.ClassTag](obj:
T): Boolean = {
+ var isFormatted: Boolean = false
+ val im = rm.reflect(obj)
+ for (m <- typeOf[T].members.filter(!_.isMethod)) {
+ if (m.toString.contains("isFormatted")) {
+ isFormatted = im.reflectField(m.asTerm).get.asInstanceOf[Boolean]
--- End diff --
Once the condition is satisfied, exit the loop....Also can you try to use
find method here instead of using for loop..
---