Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-895

ConstEval should not be included in target list of projectable nodes

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Planner/Optimizer
    • Labels:
      None

      Description

      In some applications, aliased constant values can be used in WHERE, GROUP BY, HAVING, ORDER BY clauses. For those cases, current planner evaluates constant value in target list of projectable nodes.

      SELECT '1994' end as year, ... FROM lineitem WHERE group by year;
      

      This approach works well so far, but there are rooms for significant improvement.

      The main problem is that constant target requires many workaround code in NamedExprManager, and TargetListManager. As a result, it makes code complexity higher. The second problem is that many constant values evaluated in each row consume unnecessary I/O and network bandwidth for storing and transmitting.

      The solution seems to be simple. In logical planning phase, we should rewrite column references which actually indicates constant values.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hyunsik Hyunsik Choi
                Reporter:
                hyunsik Hyunsik Choi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: