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

Use separate variables for "expr != null" conditions. This allows to reu...

    XMLWordPrintableJSON

    Details

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

      Description

      ...se the result of expr calculation

      This is a basic reuse of expressions that might duplicate out of "null-checks".
      For instance: `upper(udf(1))` is typically translated to `udf(1) == null ? null : upper(udf(1))`
      The fix parttern-matches `XXX == null` and factors `XXX` to separate declaration.
      Thus final expression becomes `v0 = udf(1); v1 = v0 == null ? null : upper(v0)`

      The fix requires equals/hashCode support from linq4j: https://github.com/julianhyde/linq4j/pull/12

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/pull/235
      Created by: vlsi
      Labels:
      Created at: Sun Apr 06 22:21:48 CEST 2014
      State: closed

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              github-import GitHub Import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: