当前使用版本(必填,否则不予处理)
mybatis-plus:3.5.1 数据库:clickhouse
该问题是如何引起的?(确定最新版也有问题再提!!!)
Clickhouse查询SQL可以正常查询到结果,但是会记录日志|c.b.m.e.p.i.PaginationInnerInterceptor.autoCountSql:351|optimize this sql to a count sql has exception,sql:"
重现步骤(如果有就写完整)
报错信息
|2022-07-28 14:00:26,871|WARN|f1237475-cc22-4671-94ba-7dacc5462d45|c.b.m.e.p.i.PaginationInnerInterceptor.autoCountSql:351|optimize this sql to a count sql has exception, sql:"SELECT
id,time_stamp,gid,signature_id,category,threat_level,signature,success,arrayStringConcat(arrayMap(x->dictGetString('cs_plus.enterprise_attack_dictionary', 'name', tuple(x)),
splitByChar(',', attack_tactics)), ',') attackTactics,flag,threat_flag,src_in_out srcInOut,dst_in_out destInOut,
multiIf(src_in_out is null,src_country,src_in_out=0,'内网',src_in_out=1,src_country,'') srcCountry,
multiIf(src_in_out is null,dst_country,dst_in_out=0,'内网',dst_in_out=1,dst_country,'') destCountry,
event_url,event_host,event_xff,event_xri,http_method,http_response_code,app_proto,proto,src_ip srcIP,dest_ip destIp,src_port,dest_port,attack attackId,exploited_host,
arrayStringConcat(arrayMap(x->dictGetOrDefault('cs_plus.threat_dictionary', 'classification_name',tuple(x),x),splitByChar(',', src_categories)), ',') srcCategories,
arrayStringConcat(arrayMap(x->dictGetOrDefault('cs_plus.threat_dictionary', 'classification_name',tuple(x),x),splitByChar(',', dst_categories)), ',') dstCategories,
src_threat_level srcThreatLevel,dst_threat_level dstThreatLevel,
dictGetString('cs_plus.event_host_identity_dictionary', 'host_ident_name', toUInt64(src_host_identity)) srcIpIdent,
dictGetString('cs_plus.event_host_identity_dictionary', 'host_ident_name', toUInt64(dst_host_identity)) destIpIdent
FROM
event_log e
WHERE e.time_stamp BETWEEN ? AND ?
ORDER BY
time_stamp
desc", exception:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "(" at line 3, column 97.
Comment From: miemieYaho
jsqlparser 无法解析sql
Comment From: SeeTomorrow
但是sql执行结果是没问题的,它仅仅是记录了这个日志
Comment From: SeeTomorrow