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

Reference type of Pulled Up Predicates is not handled properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      RelMdPredicates is not handling reference types well. Noticing the following query:

      query.sql
      SELECT * FROM
      (SELECT * FROM src) o JOIN (SELECT "foo" as key, value FROM src1) o1
      ON o.key = o1.key 
      

      The right side predicate is [key -> "foo"] with key type VARCHAR NOT NULL, the very type is not matching the input reference from the left side (which is VARCHAR), causing error when applying JoinPushTransitivePredicatesRule.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tedxu Ted Xu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: