Login  Register

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #4030: [CARBONDATA-4064] Fix tpcds query failure with SI

Posted by GitBox on Nov 30, 2020; 6:11am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-Indhumathi27-opened-a-new-pull-request-4030-WIP-Fix-tpcds-query-failure-with-SI-tp103767p103820.html


ajantha-bhat commented on a change in pull request #4030:
URL: https://github.com/apache/carbondata/pull/4030#discussion_r532366408



##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala
##########
@@ -943,7 +943,11 @@ class CarbonSecondaryIndexOptimizer(sparkSession: SparkSession) {
     val filterAttributes = filter.condition collect {
       case attr: AttributeReference => attr.name.toLowerCase
     }
-    val parentTableRelation = MatchIndexableRelation.unapply(filter.child).get
+    val parentRelation = MatchIndexableRelation.unapply(filter.child)
+    if (parentRelation.isEmpty) {
+      return false
+    }
+    val parentTableRelation = parentRelation.get

Review comment:
       can you please add a small testcase for this and update the PR description about when the parent Relation can be Empty.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]