See DRILL-6167 that describes an attempt to use a table function with a regex format plugin.
Consider the plugin configuration:
(This plugin is defined in code in a test rather than the usual JSON in the Web console.)
Run a test with the above. Things work fine.
Now, try the plugin config with a table function as described in DRILL-6167:
Because we are using a file with suffix "log2", the query will match the format plugin config defined above. A query without the table function does, in fact, work using the defined config. But, with a table function, we get this warning from our regex code:
(The warning is in the custom plugin, not Drill.) This is the plugin saying, "hey! you didn't provide column names!". But, in the format definition, we did provide names. If we run the query without a table function, we do see those names used.
Yes, indeed, the table function discarded the defined format config values, filling in blanks, including for the column names.
The expected behavior is that all properties defined in the config should remain unchanged except for those in the table function. Why? In order to know which format plugin to use, the code has to map from the suffix (".log2" here) to a format plugin config. (The config is the only thing that specifies a suffix.) Since we mapped to a config (not the unconfigured plugin), we'd expect the config properties to be used.
It is highly surprising that all we get to use is the suffix, but all other attributes are ignored. This seems very much in the "bug" category and not at all in the "feature" category.