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

There is any way to rewrite and forceful remove Join,Filter etc.. from RelNode or SqlNode?

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: None
    • Labels:
      None

      Description

      I have a sql Query :
      select a.addr, b.src from a inner join b on a.cust_id=b.cust_id where b.cust_id=1

      I convert the query to SqlNode than optimize RelNode:

      LogicalProject(addr=[$0], src=[$24])
      LogicalJoin(condition=[=($17, $47)], joinType=[inner])
      LogicalFilter(condition=[=($17, 1)])
      JdbcTableScan(table=[[, a]])
      LogicalFilter(condition=[=($26, 1)])
      JdbcTableScan(table=[[, b]])

      It is ok.Calcite provide me a optimized query...
      but i have another table c with fields addr,src as in table a and b.

      I want to rewrite the query:

      select c.addr,c.src from c where c.cust_id=1

      Is possible ?

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              vermasanjai7 Sanjai Verma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: