Github user Indhumathi27 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2311#discussion_r189421516
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala
---
@@ -479,6 +479,24 @@ private[sql] class CarbonLateDecodeStrategy extends
SparkStrategy {
case a: Attribute if isComplexAttribute(a) => a
}.size == 0 )
+ // block filters for lucene with more than one text_match udf
+ // Todo: handle when lucene and normal query filter is supported
+ var count: Int = 0
+ if (predicates.nonEmpty) {
+ predicates.foreach(predicate => {
+ if (predicate.isInstanceOf[ScalaUDF]) {
+ predicate match {
+ case u: ScalaUDF if u.function.isInstanceOf[TextMatchUDF] ||
+
u.function.isInstanceOf[TextMatchMaxDocUDF] => count = count + 1
+ }
+ }
+ })
+ if (count > 1) {
+ throw new MalformedCarbonCommandException(
+ "Only one TEXT_MATCH UDF for filters is allowed")
--- End diff --
okay
---