Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2398

DDL Sequencer to support functioned column references

XMLWordPrintable

      The Teiid DDL String Visitor unit tests demonstrate possible DDL permutations. The following example:

      CREATE VIEW G1 (
                                  "a e1" integer,
                                  "a e2" varchar,
                                  INDEX("a e1", upper("a e2")))
                                  AS
                                  SELECT e1, e2 FROM foo.bar;
      

      Currently, the DDL Sequencer does not support the 'upper' function keyword. In fact, the keyword is ignored and is not present in the modeshape schema.

      Support for such functions is not straightforward since the CreateTableParser.parseTableBodyConstraint method only detects the presence of column references in the expression, eg. "a e1" in the INDEX arguments and adds them to the REFERENCES property.

      To support functions, the sequencer will need to recognise the function name, successfully parse its arguments and record all the information as properties accordingly, eg. differentiate between the legal upper(a e1) and illegalFn(a e1).

      I imagine this would replicate the functionality seen in Teiid's own parser.

              Unassigned Unassigned
              parichar@redhat.com Paul Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: