现象说明:tb_xx开启了tiflash副本后,执行查询语句报错。删掉tiflash副本后,查询正常。
怀疑:datediff( c_create_dt, str_to_date( TIMESTAMP ( ‘2024-04-03 00:00:00’ ), ‘%Y-%m-%d %H:%i:%s’ ) 函数问题?比如在不支持mpp算子下推的范围里。
各位 童靴帮忙分析下!!
执行语句:
SELECT
*
FROM
tb_xx
WHERE
company = '0112'
AND datediff( c_create_dt, str_to_date( TIMESTAMP ( '2024-04-03 00:00:00' ), '%Y-%m-%d %H:%i:%s ' ) ) >= 0
AND datediff( c_create_dt, str_to_date( TIMESTAMP ( '2024-04-03 00:00:00' ), '%Y-%m-%d %H:%i:%s' ) ) <= 0
AND store = '16074001'
AND store IN ( '16074001' )
ORDER BY
c_create_dt DESC
LIMIT 1000 OFFSET 0
错误信息:
<!--p.MsoNormal{ mso-style-name: 正文; mso-style-parent: ""; margin: 0pt; margin-bottom: .0001pt; mso-pagination: none; text-justify: inter-ideograph; mso-font-kerning: 1.0000pt; } p.paragraph{ mso-style-noshow: yes; margin-top: 5.0000pt; margin-right: 0.0000pt; margin-bottom: 5.0000pt; margin-left: 0.0000pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; text-align: left; font-family: 等线; mso-bidi-font-family: 'Times New Roman'; font-size: 12.0000pt; } -->
1105 - other error for mpp stream: From MPP<query:448959672348311565,task:1>: Code: 49, e.displayText() = DB::Exception: Check schema[i].type->equals(*storage_schema[i].type) failed, schema[i].name = table_scan_1, schema[i].type->getName() = Nullable(MyDateTime(3)), storage_schema[i].name = c_create_dt, storage_schema[i].type->getName() = Nullable(MyDateTime(0)), e.what() = DB::Exception,