Skip to content

Clarify DateTime32 precision errors#1184

Open
BharatDeva wants to merge 1 commit into
timeplus-io:developfrom
BharatDeva:fix/datetime32-precision-error
Open

Clarify DateTime32 precision errors#1184
BharatDeva wants to merge 1 commit into
timeplus-io:developfrom
BharatDeva:fix/datetime32-precision-error

Conversation

@BharatDeva
Copy link
Copy Markdown

PR checklist:

  • Did you run ClangFormat ? Not run locally; the change is small and follows the surrounding style.
  • Did you separate headers to a different section in existing community code base ? Not applicable.
  • Did you surround proton: starts/ends for new code in existing community code base ? Not applicable; this updates Proton-specific DateTime32 handling that is already in the file.

Please write user-readable short description of the changes:

This makes the datetime32(3) error message more direct.

Before this change, datetime32(3) treated 3 as the first datetime32 argument and reported it as a timezone type error. That is technically accurate from the parser path, but confusing for users because the input looks like a precision argument.

Now, numeric datetime32(...) arguments fail with a clearer message explaining that datetime32 does not support precision and that datetime64 should be used for fractional seconds.

A gtest regression was added for DataTypeFactory::instance().get(datetime32(3)) to check the error code and message.

Validation performed:

git show --check --oneline --summary HEAD

Result:

6b28d1ca Clarify DateTime32 precision errors

I could not run the C++ gtest locally on this Windows checkout because there is no configured build directory or C++ toolchain available in the current shell.

Fixes #816

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@yokofly
Copy link
Copy Markdown
Collaborator

yokofly commented Jun 4, 2026

Hi, the changes look good. Please assign the CLA. @BharatDeva #1184 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing error message while creating a stream with datetime32(3) 'timezone' for datetime32 has wrong type: UInt64, expected String literal.

3 participants