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

fix(codegen): handle nullable for date type #3543

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

aceforeverd
Copy link
Collaborator

@aceforeverd aceforeverd commented Oct 8, 2023

Also fix include headers as iwyu.

Fixes #3194

More general problem is described in #926, which should handling later

always returns allocated structure even it is null, for the cases:

  1. construct timestamp from number, even number is < 0
  2. construct date from timestamp, even timestamp is null
  3. construct date from null literal

@github-actions github-actions bot added the execute-engine hybridse sql engine label Oct 8, 2023
@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (bcc0b1f) 75.33% compared to head (757717a) 75.32%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3543      +/-   ##
============================================
- Coverage     75.33%   75.32%   -0.01%     
  Complexity      587      587              
============================================
  Files           716      716              
  Lines        129651   129654       +3     
  Branches       1280     1280              
============================================
- Hits          97672    97665       -7     
- Misses        31693    31703      +10     
  Partials        286      286              
Files Coverage Δ
hybridse/src/codegen/array_ir_builder.cc 100.00% <ø> (ø)
hybridse/src/codegen/cast_expr_ir_builder.cc 68.28% <100.00%> (+0.56%) ⬆️
hybridse/src/codegen/date_ir_builder.cc 68.93% <100.00%> (+0.72%) ⬆️
hybridse/src/codegen/ir_base_builder.h 100.00% <ø> (ø)
hybridse/src/codegen/native_value.cc 74.35% <ø> (ø)
hybridse/src/codegen/predicate_expr_ir_builder.cc 74.88% <ø> (ø)
hybridse/src/codegen/type_ir_builder.cc 82.53% <ø> (ø)
hybridse/src/codegen/type_ir_builder.h 100.00% <ø> (ø)
hybridse/src/codegen/udf_ir_builder.cc 80.48% <100.00%> (ø)
hybridse/src/codegen/udf_ir_builder.h 100.00% <ø> (ø)
... and 4 more

... and 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

always returns allocated structure even it is null, for the cases:
1. construct timestamp from number, even number is < 0
2. construct date from timestamp, even timestamp is null
@aceforeverd aceforeverd merged commit 6fe2a30 into 4paradigm:main Oct 23, 2023
27 of 28 checks passed
@aceforeverd aceforeverd deleted the fix-3194-timestamp-overflow branch October 23, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-engine hybridse sql engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

string like "1900-01-00" in func datediff,unix_timestamp will make tablet crash
3 participants