-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: internal error: unexpected separator '-' for field Hour as type date #36146
Comments
@mjibson this isn't a panic as far as I can tell, right? How come the test seems to have marked it as a crasher? |
Looks like the root cause is probably that we can't roundtrip weird dates properly.
@bobvawter by any chance do you expect this to work properly? For the record, Postgres doesn't permit adding dates and bigints together. But, even dates that are constructible by adding a date and an int4 can be unparsable by Cockroach:
@bobvawter, I think we should be able to roundtrip such dates since we can construct them via addition. Could you take a brief look at what's preventing this from being possible? To be honest, I don't think that fixing this is very important, but we should separately prevent this assertion error from firing as it seems to be possible in the wild. I'll take care of that part. |
Anything marked internal error or assertion error (i.e., things that used to be panics be we now try to catch in a defer) is treated as a crasher since it is definitely a problem. |
Is someone working on this? |
This is distinct from #35602. I'll take a look at it tomorrow. |
Smallest repro I could find:
|
Removing the ORDER BY or reducing the row count in the VALUES from 2 to 1 will not trigger this internal error. I assume this has to do with either some heuristic about this turning off the optimizer, or maybe distsql setting up some flows in some way. @jordanlewis do you happen to know? I'm just curious. |
It's probably distsql roundtrip serialization. Heh, after our earlier conversation, we should add a PBT that all expressions can be roundtripped by distsql. I can't believe I didn't think of this earlier. |
The text was updated successfully, but these errors were encountered: