-
Notifications
You must be signed in to change notification settings - Fork 155
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
Error querying data with heterogenous field types #772
Comments
This might be a bit ugly, but should grouping automatically switch columns to something like |
I think this would require most users to then use a map function to cast values to the type they want.
The happy path is now complex. What @stuartcarnie and I discussed was only when users have disparate types they tell us what type they wanted and using the planner to push that logic into the reader. This would be the same as above
This way the happy path remains simple, yet there is still away to get data out. |
Ok that makes sense. I like the casting more. The renaming feels bad. There are also many other cases where people could have column names that collide, but are different types. Do we have a way to switch on types? So if they wanted to do something like that they could do:
|
@pauldix We do not have any conditional logic at this point. So even my above example with the For the most part the functions are polymorphic, including the type casting functions. So a type switch isn't needed in this case because you can pass any data type into the cast function and it will convert it as needed. |
My vote is for the following, assuming polymorphic functions:
I can see myself defining:
|
Right, I knew that, was just thinking about the case where users don't want to type cast and actually want to preserve in a different column name based on the type. |
Regarding casting, if the value cannot be converted (say string → float), I would expect the default behavior is to return the default value. We could add options to alter this to error. |
Once we have |
Hit this one, too.
Crashes with:
|
The original query now causes an Internal Error with no additional details:
The query from @rbetts causes:
|
Related to: influxdata/influxdb#21713 ? |
@in-fke, these are not related issues, as they refer to separate query engines, namely, Flux and InfluxQL. |
This issue has had no recent activity and will be closed soon. |
Well let's keep up the activity, then. |
This issue causes a number of queries to fail.
Example query
Output:
Sample dataset
Testing in OSS:
The text was updated successfully, but these errors were encountered: