presto
presto copied to clipboard
Presto logicalRowExpressions creating wrong DNF form
@Test
public void testWrongDnf()
{
RowExpression test = new SpecialFormExpression( SpecialFormExpression.Form.OR, BooleanType.BOOLEAN, Arrays.asList(a, b, c, d));
assertEquals(
logicalRowExpressions.convertToDisjunctiveNormalForm(test),
or(or(a, b), or(c, d)),
"Failed 1,1");
}
in test Error
Failed 1,1 expected [OR(OR(a, b), OR(c, d))] but found [OR(a, b)]
This test case fails and logicalRowExpressions is unable to create a proper dnf form. This only happens when the specialFormExpression has > 2 arguments This seems to be one of the root cause of https://github.com/prestodb/presto/issues/22147
Your Environment
- Presto version used:
- Storage (HDFS/S3/GCS..):
- Data source and connector used:
- Deployment (Cloud or On-prem):
- Pastebin link to the complete debug logs:
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce
Screenshots (if appropriate)
Context
cc: @kaikalur