google / zetasql

ZetaSQL - Analyzer Framework for SQL
Apache License 2.0
2.28k stars 214 forks source link

Optional lambda parameter #146

Closed pgrivachev closed 1 year ago

pgrivachev commented 1 year ago

Is it possible to create function signature with optional lambda parameter like CONTAINS_SUBSTR has?

CONTAINS_SUBSTR(expression, search_value_literal[, json_scope=>json_scope_value])

json_scope_value:
  { 'JSON_VALUES' | 'JSON_KEYS' | 'JSON_KEYS_AND_VALUES' }

I found that for some reason such arguments should be REQUIRED (also comment). Is there any workaround?