-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
in_list doesn't handle value being a Dictionary type when check data type matches #9530
Comments
@advancedxy It seems that you are mixing dict with utf8. I think it is not a valid case 😕 I think the problem is that the caller should do the type coercion to convert utf8 to dict(i32, utf8) beforehand. In datafusion, we have done it in the optimization step, when we reach @alamb It seems that if the datafusion user imports the physical-expr functions only, they may need to fight with type coercion. In lance, they struggle with data types from SQL string to logical expr too. |
I think in the comet cases, the value type is a dict(i32, utf8) and the static list is all utf8 type. So we should convert the |
There is an example of how to invoke the coercion (but it starts from a logical expr) |
I can think of two possibilities Option 1 Easy to code, less performant
Option 2: More code, but more performantImplement direct support for Somewhere in here: (this would also help us in InfluxData so I would be happy to help review / work on a PR -- though my bandwidth for the next week is pretty limited) |
I can submit a PR for option 2 in the next 2 weeks maybe if no one is working on this.
It's not urgent, I think we can take your time. |
Describe the bug
When I'm working on apache/datafusion-comet#184, I notice that some tpc-ds queries failing when trying to convert the static list into the set.
The error message is something like:
To Reproduce
Create in input schema with a Dictionary type and then try to convert the in_list expression should easily reproduce this one.
Expected behavior
When using
in_list
to create aInListExpr
, it should handle value type being Dictionary Type.Additional context
No response
The text was updated successfully, but these errors were encountered: