I would like to use LIKE_REGEX in Apache calcite SQL query and can not find any documentation or examples on how to use it. Can you please share examples or documentation around it's usage.
Asked
Active
Viewed 1,316 times
1 Answers
1
LIKE_REGEX
was introduced in the SQL:2008 standard but as of version 1.17 Calcite does not currently support it. (If you look at Calcite's SQL reference, LIKE_REGEX
appears in Calcite's list of reserved SQL keywords because Calcite automatically reserves keywords listed in the SQL standard.)
If you would like to match regular expressions, use SIMILAR TO
. For example, the query VALUES 'abcccd' similar to 'ab*c+d'
returns TRUE
.
Calcite's implementation of SIMILAR TO
has semantics similar to PostgreSQL's implementation.

Julian Hyde
- 1,239
- 7
- 10
-
Thanks Julian. Your suggestion worked. Since it was on reserved list, I was under the impression it was implemented. – Andy P. Aug 17 '18 at 13:38