Skip to content

Conversation

@xiaojunjie
Copy link
Contributor

Proposed changes

Issue Number: none

Problem summary

case: select str_to_date("2022-05-24 10:00:00.123 PM", "%Y-%m-%d %h:%i:%s.%f %p");

  1. disable_vectorized
    Expected: 2022-05-24 22:00:00.123000
    Actual: 2022-05-24 22:00:00.123000

  2. enables_vectorized
    Expected: 2022-05-24 22:00:00
    Actual: null

In function VecDateTimeValue::from_date_format_str, it is necessary to eat the microsecond "123" before parsing "PM", even though _microsecond has been removed in class VecDateTimeValue.

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

…rom_date_format_str (apache#13446)

* [bugfix](VecDateTimeValue) eat the value of microsecond in function from_date_format_str

* add sql based regression test

Co-authored-by: xiaojunjie <xiaojunjie@baidu.com>
Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei
Copy link
Contributor

#13446

@yiguolei yiguolei merged commit 54ed8fb into apache:branch-1.1-lts Oct 20, 2022
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.

2 participants