GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/10444
[SPARK-6624][WIP] Another alternative version of CNF normalization
This PR is a draft version of another alternative of CNF normalization
based on [comment][1] in PR #8200. This PR doesn't include test cases, and is
only for further discussion.
In this version, CNF normalization is implemented as a separate function
`Predicate.toCNF`, which accepts an optional expansion threshold to prevent
exponential explosion. The motivation behind this design is that, CNF
normalization itself can be useful in other use cases (e.g., eliminating common
predicate factors). It would be convenient if we can call it from anywhere
without involving the optimizer.
Another consideration is that, if no expansion threshold is provided,
`toCNF` should always return a predicate that is really in CNF. That's why a
new `RuleExecutor` strategy `FixPoint.Unlimited` is added.
[1]: https://github.com/apache/spark/pull/8200/files#r48328448
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark cnf-draft
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10444.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10444
----
commit 0fb4beb99dc80e55cbd5ecba8cf0a87fc21b9b86
Author: Cheng Lian <[email protected]>
Date: 2015-12-23T09:17:16Z
Draft version of CNF normalization
----
---
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]