SQL JSON_OBJECT() function results in RUNTIME_FAILURE when querying INFORMATION_SCHEMA.COLUMNS
christian-schlichtherle opened this issue · comments
Christian Schlichtherle commented
Affected Version
Druid 29.0.1
Description
Running the following query
select JSON_OBJECT('name': COLUMN_NAME, 'type': DATA_TYPE)
from INFORMATION_SCHEMA.COLUMNS
produces
Error: RUNTIME_FAILURE (OPERATOR)
cannot translate call json_object($t17, $t18, $t3, $t19, $t7)
java.lang.RuntimeException
Note that the error message quotes the json_object call to receive five parameters, but maybe that's an unrelated internal detail.
For comparison, the following works (but is useless):
select JSON_OBJECT('name': 'foo', 'type': 'VARCHAR')