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(batch): Do not try to write %#z it is undefined #10283

Open
kwannoel opened this issue Jun 11, 2023 · 4 comments
Open

bug(batch): Do not try to write %#z it is undefined #10283

kwannoel opened this issue Jun 11, 2023 · 4 comments
Assignees
Labels
found-by-sqlsmith help wanted Issues that need help from contributors no-issue-activity type/bug Something isn't working

Comments

@kwannoel
Copy link
Contributor

Describe the bug

SELECT ((1) - (718)) AS col_0, (to_char((DATE '2022-01-12' - (~ (INT '140'))), t_0.name)) AS col_1, (BIGINT '975') AS col_2, t_0.id AS col_3 FROM person AS t_0 FULL JOIN m3 AS t_1 ON t_0.extra = t_1.col_2 AND true WHERE true GROUP BY t_0.name, t_0.id HAVING true
thread '<unnamed>' panicked at 'Do not try to write %#z it is undefined', /risingwave/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.24/src/format/mod.rs:679:25

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@kwannoel kwannoel added type/bug Something isn't working found-by-sqlsmith labels Jun 11, 2023
@github-actions github-actions bot added this to the release-0.20 milestone Jun 11, 2023
@kwannoel kwannoel added the help wanted Issues that need help from contributors label Jul 5, 2023
@kwannoel
Copy link
Contributor Author

kwannoel commented Jul 7, 2023

Repro: select to_char(DATE '2022-01-12' - (~ (INT '140')), '%#z');

@kwannoel
Copy link
Contributor Author

kwannoel commented Jul 7, 2023

Seems like a bug with the underlying library.. Continue looking at it next week.

@xiangjinwu
Copy link
Contributor

https://docs.rs/chrono/0.4.26/chrono/format/strftime/index.html

  • %#z is documented as Parsing only and should not be used in to_char implementation
  • %:::z is documented to be Offset from the local time to UTC without minutes which aligns with PostgreSQL TZH. However, its implementation in parsing is wrong Flexible offset parsing [2/3] chronotope/chrono#1083

Once chrono fixed the issue, we can just map TZH to %:::z. If we need a fix before that, we will need to map TZH to %:::z in to_char but to %#z during parsing.

@xiangjinwu xiangjinwu self-assigned this Dec 22, 2023
Copy link
Contributor

github-actions bot commented Jul 3, 2024

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean.
Don't worry if you think the issue is still valuable to continue in the future.
It's searchable and can be reopened when it's time. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found-by-sqlsmith help wanted Issues that need help from contributors no-issue-activity type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants