spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #26629: [SPARK-29768][SQL] Column pruning through nondeterministic expressions
Date Mon, 25 Nov 2019 17:24:30 GMT
cloud-fan commented on a change in pull request #26629: [SPARK-29768][SQL] Column pruning through
nondeterministic expressions 
URL: https://github.com/apache/spark/pull/26629#discussion_r350320040
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/sources/PrunedScanSuite.scala
 ##########
 @@ -148,5 +148,27 @@ class PrunedScanSuite extends DataSourceTest with SharedSparkSession
{
       }
     }
   }
+
+  testNonDeterministicPruning("SELECT a, rand() FROM oneToTenPruned WHERE a > 5", "a")
+
+  testNonDeterministicPruning("SELECT a FROM oneToTenPruned WHERE rand() > 5", "a")
+
+  testNonDeterministicPruning("SELECT a, rand() FROM oneToTenPruned WHERE rand() > 5",
"a")
+
+  testNonDeterministicPruning("SELECT a, rand() FROM oneToTenPruned WHERE b > 5", "a",
"b")
+
+  def testNonDeterministicPruning(sqlString: String, expectedColumns: String*): Unit = {
 
 Review comment:
   why can't we reuse `testPruning`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message