Open heni02 opened 2 hours ago
这个的根本原因是。 对于 类似 prefix_in (col1, serial([?,?,?,?,?]) ) 的处理,要怎么做的问题。 目前的bug是因为,在18925这个PR后,filter不再做deepcopy和constanfold。于是目前对于这种类型有2种处理逻辑了。 1、对于ranges和reader来说,目前是吧 [?,?,?,?]给合并成一个Expr_Vec来处理,这样的结果就是一行数据了。
2、而filter目前是会正常执行,会变成一个普通Vector,那么有几个元素就是有几列了。(这样对于 serial函数就不会处理了,因为它是应该根据batch的长度来处理的,而batch的长度不等于 [?,?,?,?]的长度了。
可能需要在evalExpress继续特殊处理Expr_List类型表达式才行了
Is there an existing issue for the same bug?
Branch Name
main
Commit ID
7a04342ac
Other Environment Information
Actual Behavior
job:https://github.com/matrixorigin/mo-nightly-regression/actions/runs/11016020437/job/30619710528 FATAL: mysql_stmt_execute() returned error 20101 (internal error: panic runtime error: index out of range [2] with length 2: runtime.goPanicIndex /usr/local/go/src/runtime/panic.go:115 github.com/matrixorigin/matrixone/pkg/sql/plan/function.SerialHelper /go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/function/func_builtin.go:1264 github.com/matrixorigin/matrixone/pkg/sql/plan/function.(*opSerial).BuiltInSerial /go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/function/func_builtin.go:1122 github.com/matrixorigin/matrixone/pkg/sql/colexec.() for query ' SELECT id, k, c, pad FROM sbtest1 WHERE k IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ' 该报错必现,没问题的commit:bdc147b00,协助排查定位
mo log: https://grafana.ci.matrixorigin.cn/explore?panes=%7B%22im7%22:%7B%22datasource%22:%22loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22mo-main-nightly-7a04342ac-20240924%5C%22%7D%20%7C%3D%20%60panic%20runtime%20error:%20index%20out%20of%20range%20%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22loki%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221727170007330%22,%22to%22:%221727256407330%22%7D%7D%7D&schemaVersion=1&orgId=1
Expected Behavior
No response
Steps to Reproduce
Additional information
No response