3.0.2 match右边不支持函数

Viewed 74
select 
    company_name
from  
    ss_qiyeku_saas.cyl_ent_tags
where 
 1 = 1 
 AND company_name MATCH array_join(TOKENIZE('科技公司','"parser"="chinese","support_phrase" = "true","lower_case"="true", "parser_mode"="fine_grained"'),' ')
 LIMIT 10

返回错误

SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = Only support match left operand is SlotRef, right operand is Literal. But meet expression (company_name#2 MATCH_ANY array_join(tokenize('科技公司', '"parser"="chinese","support_phrase" = "true","lower_case"="true", "parser_mode"="fine_grained"'), ' '))

目前只支持右边接文本,如: match '科技公司'
升级前2.1.4支持右边接函数

2 Answers

以3.0表现为准,match右边只允许常量。2.1系列不符合预期,后面会做修改

  1. 建议直接 company_name MATCH “科技公司”,match语法查询的时候会自动分词(按照写入的分词器),不需要自己处理