Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1673

Implement the WITH clause in Trafodion SQL for simple use cases

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1-incubating
    • sql-cmp
    • None

    Description

      We keep running into queries that use a WITH clause to define a temporary view that can be used once or multiple times in a FROM clause in the query.

      For non-recursive queries, the WITH clause could probably be handled very similar to a view. When it is defined, we create an in-memory view descriptor, containing the name and the definition. When it is used in a FROM clause, we could go through a code path similar to that of a view - bind the (temporary) view text and substitute it in the query. The fix could probably be handled entirely in the binder.

      This JIRA is not about recursive queries, those would require a lot more effort, involving many components in addition to the binder.

      Attachments

        Issue Links

          Activity

            People

              ovis_poly liu ming
              hzeller Hans Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: