-
Feature Request
-
Resolution: Won't Do
-
Major
-
3.8.1.Final, 4.1.0.Final
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.