You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2021/07/06 08:31:46 UTC

[GitHub] [kylin] xiacongling commented on a change in pull request #1680: KYLIN-5021 FilePruner throws NPE when there is no timePartitionColunm in cube

xiacongling commented on a change in pull request #1680:
URL: https://github.com/apache/kylin/pull/1680#discussion_r664348908



##########
File path: kylin-spark-project/kylin-spark-common/src/main/scala/org/apache/spark/sql/execution/datasource/FilePruner.scala
##########
@@ -330,7 +330,7 @@ class FilePruner(cubeInstance: CubeInstance,
         }
       case _ =>
         //other unary filter like EqualTo, GreaterThan, GreaterThanOrEqual, etc.
-        if (filter.references.subsetOf(AttributeSet(col))) {
+        if (col != null && filter.references.subsetOf(AttributeSet(col))) {

Review comment:
       I think we can move the null-check to the beginning of the method, so that the mothed would not go into the recursion. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@kylin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org