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

Add string representation of default nulls direction for RelNode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.38.0
    • 1.39.0
    • core

    Description

      Calcite has the same hehavior with Oracle on returning the null direction if not specified, which means NULLS LAST is assumed for ASC and NULLS FIRST is assumed for DESC.
      However, the default nulls direction is not presented in plan traces. For example:

      select empno from emp order by empno desc
      

      has the following plan:

      LogicalSort(sort0=[$0], dir0=[DESC])
        LogicalProject(EMPNO=[$0])
          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
      

      It makes RelNode clearer if adding nulls direction, so the above plan will be like:

      LogicalSort(sort0=[$0], dir0=[DESC-nulls-first])
        LogicalProject(EMPNO=[$0])
          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
      

      Attachments

        Issue Links

          Activity

            People

              VAE ZheHu
              VAE ZheHu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: