简体   繁体   English

如何使用Apache方解石LIKE_REGEX

[英]How to use Apache calcite LIKE_REGEX

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. 我想在Apache方解石SQL查询中使用LIKE_REGEX,但是找不到任何有关如何使用它的文档或示例。 Can you please share examples or documentation around it's usage. 您能否分享有关其用法的示例或文档。

LIKE_REGEX was introduced in the SQL:2008 standard but as of version 1.17 Calcite does not currently support it. LIKE_REGEX是在SQL:2008标准中引入的,但是从1.17版开始,方解石当前不支持它。 (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.) (如果您查看Calcite的SQL参考, LIKE_REGEX出现在Calcite的保留SQL关键字列表中,因为Calcite自动保留SQL标准中列出的关键字。)

If you would like to match regular expressions, use SIMILAR TO . 如果要匹配正则表达式,请使用SIMILAR TO For example, the query VALUES 'abcccd' similar to 'ab*c+d' returns TRUE . 例如, VALUES 'abcccd' similar to 'ab*c+d'的查询VALUES 'abcccd' similar to 'ab*c+d'返回TRUE

Calcite's implementation of SIMILAR TO has semantics similar to PostgreSQL's implementation . Calcite的SIMILAR TO 的实现PostgreSQL的实现具有相似的语义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM