You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrade from 40 to 43 causes utf8 timestamp queries to fail #13625
@TheBuilderJR Cannot reproduce this problem on version 43.0.0. Maybe something is missing here.
let df = ctx.sql("create table logs(timestamp varchar);").await?;let df = ctx
.sql(r#"SELECT * FROM logs WHERE timestamp IS NOT NULL ORDER BY timestamp DESC LIMIT 3"#).await?;println!("{:?}",df.schema());
df.show().await?;
i wonder which query operation could have produced this error.
In current code base, "Coercion from ... to the signature" seems to be produced by function-related coecions, but in the query there is no function call, unless logs is a view. In such case, knowing the view definition can be necessary to reproduce the error.
In any case, here is a proposal to improve the error message: #13628
Thanks @holicc and @findepi I think I looked at the wrong query in the logs. You can reproduce with something like this
SELECT
EXTRACT(YEAR FROM timestamp) as year,
EXTRACT(MONTH FROM timestamp) as month,
COUNT(*) as count
FROM logs
WHERE timestamp IS NOT NULL
GROUP BY
EXTRACT(YEAR FROM timestamp),
EXTRACT(MONTH FROM timestamp)
ORDER BY year, month
let config = SessionConfig::new()
.set_bool("datafusion.execution.parquet.schema_force_view_types", false);
// Create a SessionState using the config and runtime_env
let state = SessionStateBuilder::new()
.with_config(config)
.with_default_features()
.build();
// Create a SessionContext
let ctx = SessionContext::from(state);
I think one small frustration I've had with datafusion is the amount of backwards breaking changes. Is it fair to say that datafusion isn't ready for production yet? Are there any active plans to add a more comprehensive test suite so users can feel confident more confident with the updates? Or perhaps are there any config settings that I can opt into that trades off stability for performance?
let config = SessionConfig::new()
.set_bool("datafusion.execution.parquet.schema_force_view_types", false);
// Create a SessionState using the config and runtime_env
let state = SessionStateBuilder::new()
.with_config(config)
.with_default_features()
.build();
// Create a SessionContext
let ctx = SessionContext::from(state);
My guess is that you are being impacted by the issue being worked on in #13404 - Edit: no, in fact I am unsure as to whether I've seen this issue before - string -> timestamp implicit casting failing.
I think one small frustration I've had with datafusion is the amount of backwards breaking changes. Is it fair to say that datafusion isn't ready for production yet? Are there any active plans to add a more comprehensive test suite so users can feel confident more confident with the updates? Or perhaps are there any config settings that I can opt into that trades off stability for performance?
As far as tests there is this: #13470 however I don't believe that will cover a large portion of what is breaking between releases for people, at least not initially.
As far as being production ready I suppose that depends on your definition of production ready. It's being used in production by quite a few companies for some time now but upgrades do seem to have been a concern - #13525
@TheBuilderJR can you please check whether the reproducer query that did work in DF 40 doesn't work in current main?
It might be the bug has been fixed and we can close the issue.
@findepi if you can't repro on main anymore but you can from before dec2 then I'm happy to close it out. I'm not sure if the repro above is exactly the same since I'm not sure if varchar gets converted into utf8 type. I'm unblocked now thanks to @alamb's suggestion so it's nbd either way. If you insist on closing this out I'm ok with that as well :)
Activity
holicc commentedon Dec 3, 2024
@TheBuilderJR Cannot reproduce this problem on version 43.0.0. Maybe something is missing here.
got results:
findepi commentedon Dec 3, 2024
i wonder which query operation could have produced this error.
In current code base, "Coercion from ... to the signature" seems to be produced by function-related coecions, but in the query there is no function call, unless
logsis a view. In such case, knowing the view definition can be necessary to reproduce the error.In any case, here is a proposal to improve the error message: #13628
TheBuilderJR commentedon Dec 3, 2024
Thanks @holicc and @findepi I think I looked at the wrong query in the logs. You can reproduce with something like this
which produces
alamb commentedon Dec 3, 2024
Does the problem go away if you turn off this config setting:
https://datafusion.apache.org/user-guide/configs.html
datafusion.execution.parquet.schema_force_view_types
We are still working through some additional needed support:
TheBuilderJR commentedon Dec 4, 2024
@alamb yep that fixes it
I think one small frustration I've had with datafusion is the amount of backwards breaking changes. Is it fair to say that datafusion isn't ready for production yet? Are there any active plans to add a more comprehensive test suite so users can feel confident more confident with the updates? Or perhaps are there any config settings that I can opt into that trades off stability for performance?
Omega359 commentedon Dec 4, 2024
My guess is that you are being impacted by the issue being worked on in #13404 - Edit: no, in fact I am unsure as to whether I've seen this issue before - string -> timestamp implicit casting failing.
As far as tests there is this: #13470 however I don't believe that will cover a large portion of what is breaking between releases for people, at least not initially.
As far as being production ready I suppose that depends on your definition of production ready. It's being used in production by quite a few companies for some time now but upgrades do seem to have been a concern - #13525
Omega359 commentedon Dec 4, 2024
So, I just ran the following against main as of a few days ago:
findepi commentedon Dec 4, 2024
@TheBuilderJR can you please check whether the reproducer query that did work in DF 40 doesn't work in current main?
It might be the bug has been fixed and we can close the issue.
TheBuilderJR commentedon Dec 4, 2024
@findepi It was broken on a dec2 fork I maintain (https://github.com/TheBuilderJR/datafusion/tree/main-dec-2-fork). Is there a PR that you have that landed past that date?
findepi commentedon Dec 4, 2024
I don't have any particular PR in mind, but if you have reproducer that still doesn't work on main, then it is something we can help with.
TheBuilderJR commentedon Dec 4, 2024
@findepi if you can't repro on main anymore but you can from before dec2 then I'm happy to close it out. I'm not sure if the repro above is exactly the same since I'm not sure if varchar gets converted into utf8 type. I'm unblocked now thanks to @alamb's suggestion so it's nbd either way. If you insist on closing this out I'm ok with that as well :)
alamb commentedon Dec 17, 2024
Closing this as it appears to have been fixed on main. Please reopen if there is something else you find wrong.