DataSQRL/sqrl

Support function symbols such as `NULL ON ERROR`

Closed this issue · 2 comments

Calcite supports function symbols. However native flink functions do not currently support symbols. We have the ability to load calcite native functions in our function system, but we will have to translate them to functions that flink can support. It could be possible to drive this behavior with java annotations on native flink functions, or support a convention of symbols that map to argument names.

SELECT JSON_EXISTS('{"a": true}', 'strict $.b' TRUE ON ERROR);

Example flink translation:

JSON_EXISTS('...', '...', on_error => true)

Other example:

JSON_VALUE('{"contains blank": "right"}', 'strict $.[''contains blank'']' NULL ON EMPTY DEFAULT 'wrong' ON ERROR)

Calcite parses these specially and they aren't generally available. Closing.