Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1846

Metadata pulled up predicates should skip non-deterministic calls

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      Metadata MdPredicates should ignore undeterministic calls, or else there would be unexpected result.

        Activity

        Hide
        tedxu Ted Xu added a comment -

        Hi guys, I've issued a pull request https://github.com/apache/calcite/pull/475 featuring this bug, someone please have a look, thanks!

        Show
        tedxu Ted Xu added a comment - Hi guys, I've issued a pull request https://github.com/apache/calcite/pull/475 featuring this bug, someone please have a look, thanks!
        Hide
        julianhyde Julian Hyde added a comment -

        Looks good. A few comments:

        • I would put the test into RelMetadataTest; it's not different enough to need a new test class.
        • The code that finds the deterministic parts of a conjunction occurs twice; can you make it a method in RexUtil, with a test in RexProgramTest.
        • Also, we use the term "non-deterministic" rather than "undeterministic". Can you change to match.

        Please work with Jesus Camacho Rodriguez to get this into 1.13 if possible. I'll be away for the next week.

        Show
        julianhyde Julian Hyde added a comment - Looks good. A few comments: I would put the test into RelMetadataTest; it's not different enough to need a new test class. The code that finds the deterministic parts of a conjunction occurs twice; can you make it a method in RexUtil, with a test in RexProgramTest. Also, we use the term "non-deterministic" rather than "undeterministic". Can you change to match. Please work with Jesus Camacho Rodriguez to get this into 1.13 if possible. I'll be away for the next week.
        Hide
        tedxu Ted Xu added a comment -
        Show
        tedxu Ted Xu added a comment - Thanks Julian Hyde . Pull request updated https://github.com/apache/calcite/pull/475 .
        Hide
        tedxu Ted Xu added a comment -

        Jesus Camacho Rodriguez could you please have a look? The failing CI build seems not related.

        Show
        tedxu Ted Xu added a comment - Jesus Camacho Rodriguez could you please have a look? The failing CI build seems not related.
        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/86a5cc9 .
        Hide
        tedxu Ted Xu added a comment -
        Show
        tedxu Ted Xu added a comment - Thanks Jesus Camacho Rodriguez !
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.13.0 (2017-06-26).

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).

          People

          • Assignee:
            tedxu Ted Xu
            Reporter:
            tedxu Ted Xu
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development