Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presto logicalRowExpressions creating wrong DNF form #22698

Open
jaystarshot opened this issue May 8, 2024 · 1 comment
Open

Presto logicalRowExpressions creating wrong DNF form #22698

jaystarshot opened this issue May 8, 2024 · 1 comment
Labels

Comments

@jaystarshot
Copy link
Member

jaystarshot commented May 8, 2024

 @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 #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

@jaystarshot jaystarshot added the bug label May 8, 2024
@jaystarshot jaystarshot changed the title Presto creating wrong DNF form Presto logicalRowExpressions creating wrong DNF form May 8, 2024
@jaystarshot jaystarshot reopened this May 8, 2024
@jaystarshot
Copy link
Member Author

cc: @kaikalur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 Unprioritized
Development

No branches or pull requests

1 participant