You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by John Pullokkaran <jp...@hortonworks.com> on 2014/08/29 21:18:55 UTC
Fwd: DNF to CNF
Is there a utility in Optiq that can convert DNF to CNF?
Thanks
John
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: DNF to CNF
Posted by Julian Hyde <ju...@gmail.com>.
Not as such. But I think RelOptUtil.conjunctions(RexNode) and .disjunctions(RexNode) will make the task easier.
Given an expression in DNF, rex = ā(a AND b) OR cā, the following loop will decompose into parts:
for (RexNode disjunction : disjunctions(rex)) {
for (RexNode conjunction : conjunctions(disjunction)) {
...
}
}
Julian
PS For those not into the jargon: http://en.wikipedia.org/wiki/Disjunctive_normal_form
On Aug 29, 2014, at 12:18 PM, John Pullokkaran <jp...@hortonworks.com> wrote:
> Is there a utility in Optiq that can convert DNF to CNF?
>
> Thanks
> John
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.