Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/13893#discussion_r68557086
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruningSuite.scala
---
@@ -141,6 +141,14 @@ class PruningSuite extends HiveComparisonTest with
BeforeAndAfter {
Seq("2008-04-08", "11"),
Seq("2008-04-09", "11")))
+ createPruningTest("Partition pruning - with nondeterministic fields",
+ "SELECT value, hr FROM srcpart1 WHERE ds = '2008-04-08' AND rand(7) <
1",
--- End diff --
Yes you are right. I thought the deterministic part can always be PPDed
safely but it was not, in fact, the order of each part should also be
considered. For example:
rand() < 0.01 AND partition_col = 'some_value'
should not be PPDed, but
partition_col = 'some_value' AND rand() < 0.01
still could be.
Thank you for your kindly reply!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]