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] No validation of format strings when formatting dates in legacy timeParserPolicy mode #2929

Closed
andygrove opened this issue Jul 14, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Contributor

Describe the bug
PR #2875 added support for LEGACY timeParserPolicy when parsing strings to temporal types but it also inadvertently enabled LEGACY timeParserPolicy for formatting dates as strings. This works fine for many format strings but could potentially produce wrong results for format strings that have a different meaning between LEGACY and CORRECTED mode.

Steps/Code to reproduce bug
I haven't tried to reproduce the bug yet. This issue is to track the work of doing that.

Expected behavior
If the user provides a format string in LEGACY mode that has a different meaning in CORRECTED mode we should either throw an error or produce the correct results.

Environment details (please complete the following information)
N/A

Additional context
N/A

@andygrove andygrove added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jul 14, 2021
@andygrove andygrove added this to the July 5 - July 16 milestone Jul 14, 2021
@andygrove andygrove self-assigned this Jul 14, 2021
@andygrove
Copy link
Contributor Author

I was wrong about this. The base class UnixTimeExprMeta does check that we support the format both for parsing and formatting. No further action is required.

@sameerz sameerz removed the ? - Needs Triage Need team to review and classify label Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants