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

Add typed literal casting, rework typed literal casting #2347

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

andyfengHKU
Copy link
Contributor

@andyfengHKU andyfengHKU commented Nov 6, 2023

This PR contains the following changes

  • Add casting function to RDF_VARIANT, RDF_VARIANT can be casted to any data type. On casting failure, instead of throwing runtime exception, we set casting result to NULL.
  • Rework casting framework. We now only expose one bindCastFunction interface which returns a casting function for a given pair of src and dst type.

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

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

Comparison is base (79999ec) 90.40% compared to head (b68bc6c) 90.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2347      +/-   ##
==========================================
+ Coverage   90.40%   90.46%   +0.05%     
==========================================
  Files        1013     1013              
  Lines       33050    33181     +131     
==========================================
+ Hits        29880    30016     +136     
+ Misses       3170     3165       -5     
Files Coverage Δ
src/binder/expression_binder.cpp 95.29% <100.00%> (ø)
src/common/types/types.cpp 0.00% <ø> (ø)
src/function/built_in_functions.cpp 100.00% <100.00%> (ø)
src/function/vector_cast_functions.cpp 97.36% <100.00%> (+22.36%) ⬆️
src/include/common/types/blob.h 100.00% <100.00%> (ø)
src/include/function/scalar_function.h 100.00% <100.00%> (ø)
src/include/function/unary_function_executor.h 90.24% <100.00%> (+2.43%) ⬆️
src/processor/operator/persistent/copy_to_csv.cpp 96.87% <100.00%> (+0.03%) ⬆️
src/function/cast/cast_rdf_variant.cpp 96.93% <96.93%> (ø)

... and 4 files with indirect coverage changes

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

src/function/cast/cast_rdf_variant.cpp Outdated Show resolved Hide resolved
src/function/vector_cast_functions.cpp Show resolved Hide resolved
src/function/cast/cast_rdf_variant.cpp Show resolved Hide resolved
src/function/cast/cast_rdf_variant.cpp Show resolved Hide resolved
@andyfengHKU andyfengHKU force-pushed the casting-function-rework branch 2 times, most recently from 94fb151 to 206bdcc Compare November 7, 2023 06:21
@andyfengHKU andyfengHKU merged commit e0b9a11 into master Nov 7, 2023
12 checks passed
@andyfengHKU andyfengHKU deleted the casting-function-rework branch November 7, 2023 08:00
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