Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TPCC Test Errors with 'invalid argument function prefix_in, bad value [VARCHAR TUPLE]' #16009

Open
1 task done
sukki37 opened this issue May 11, 2024 · 3 comments
Open
1 task done
Assignees
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@sukki37
Copy link
Contributor

sukki37 commented May 11, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

1.2-dev

Commit ID

b5c2ea

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

image

https://grafana.ci.matrixorigin.cn/explore?panes=%7B%22fzn%22:%7B%22datasource%22:%22loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22mo-branch-reg-b5c2eaa%5C%22%7D%20%7C%3D%20%60invalid%20argument%20function%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:%221715363311811%22,%22to%22:%221715375978032%22%7D%7D%7D&schemaVersion=1&orgId=1

Expected Behavior

No response

Steps to Reproduce

run tpcc

Additional information

No response

@sukki37 sukki37 added kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels May 11, 2024
@matrix-meow matrix-meow added this to the 1.2.0 milestone May 11, 2024
@sukki37 sukki37 modified the milestones: 1.2.0, 1.2.1 May 11, 2024
@m-schen
Copy link
Contributor

m-schen commented May 11, 2024

image runtime_filter 处理下推条件 in 的情况会走到这里, 该函数指定了第二个参数类型为tuple类型。

如果可以被优化成prefix_in的情况下,会在GetFunctionByName报错。具体原因如下图,prefix_in函数只支持 [varchar, varchar]这种情况,且使用的 fixedDireclyTypeMatch 的匹配规则,不会做类型转换。
image

不过该函数这里并不返回错误,而是会将prefix_in(varchar, tuple)返回,最后该表达式会被传到
NewReader(ctx, cpu, filterExpr)... 的第三个参数里。

麻烦看看是不是需要支持这种类型,或者该情况下走in。

我比较怀疑这个不支持并不导致查询失败,只是trace打出来的日志。(我不确定,因为这个expr似乎只是传给了存储,存储似乎对于in, prefix_in都没有处理,如下图,有可能找错地方,我没有深跟该部分逻辑了。)
image

prefix_eq, prefix_between也有类似的问题,不过目前似乎没有用到。

@m-schen
Copy link
Contributor

m-schen commented May 11, 2024

cn和tn两边用的过滤逻辑不一样,(dn处只会用到传下去的function name)。

修改cn部分的prefix_in函数多支持一种类型感觉也没什么用,只能让它不报错,少打这些日志。

不过MakeInExpr里头应该需要处理当生成的函数并不支持的情况(也就是GetFunctionByName报错的情况)吧。

@aunjgr
Copy link
Contributor

aunjgr commented May 15, 2024

PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

5 participants