Affects Version/s: 1.12.0
Fix Version/s: None
Consider DRILL-6167 which describes a regex storage plugin. The plugin definition wants to take a list of columns. This can be expressed in the storage plugin config as a list:
The list can be defined in JSON using the Drill web console. All works fine.
Drill also provides table functions that allow us to specify format plugin config options at query time. Because the function is defined as SQL, there appears to be no way to express an argument which is a list.
Let's try to define the list in sql:
The syntax above is legal SQL (see below), but is not wired up correctly to map to a list argument. When run:
This error seems to say that:
- The syntax is OK. (Check parser.jj, if you work down the rules starting from TableFunctionCall, you'll see that ParenthesizedQueryOrCommaList defines the above list as valid syntax for a function argument.
- The type of the argument appears to be a RecordType.
- No rules are in place to realize that, for a plugin config table function, the RecordType can be translated to a String list.
The only workaround appears to be to redefine the string list to be a single string. In this case, rather than a list of fields, require a string with a comma-separated list of files which is parsed by the plugin at run time.
If Drill provides lists in the config, and provides table functions to set the properties in a config, then it should provide a way to set lists.