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

Allow explicit cast between varlist CAST(var, varlist type) #2386

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

AEsir777
Copy link
Collaborator

@AEsir777 AEsir777 commented Nov 10, 2023

Benchmark: (size of list between 0 to 40, select condition size(list) > 25)

1000000 x Int128[][] cast whole list selected vector
1745.701000 3619 before malloc()
937.575
100000 x INT128[] to INT32[] (list of ints between 1 to 1000 and select condition size(list) > 800) 7776.816 7986.32
> 950 2106 2151.219
all 15766 21384

ToDo:

  • add more tests for list of nested types
  • add cast_error cases

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

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

Comparison is base (0782f86) 91.04% compared to head (2ac1809) 91.24%.
Report is 3 commits behind head on master.

Files Patch % Lines
src/planner/plan/plan_read.cpp 0.00% 2 Missing ⚠️
src/common/table_type.cpp 0.00% 1 Missing ⚠️
src/common/types/value/value.cpp 0.00% 1 Missing ⚠️
src/function/cast_string_to_functions.cpp 0.00% 1 Missing ⚠️
src/include/function/unary_function_executor.h 85.71% 1 Missing ⚠️
...erator/persistent/reader/parquet/column_reader.cpp 0.00% 1 Missing ⚠️
src/processor/operator/transaction.cpp 0.00% 1 Missing ⚠️
src/transaction/transaction_context.cpp 0.00% 1 Missing ⚠️
tools/python_api/src_cpp/py_query_result.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2386      +/-   ##
==========================================
+ Coverage   91.04%   91.24%   +0.20%     
==========================================
  Files        1015     1022       +7     
  Lines       36012    36323     +311     
==========================================
+ Hits        32788    33144     +356     
+ Misses       3224     3179      -45     

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

@AEsir777 AEsir777 marked this pull request as ready for review November 10, 2023 21:14
@AEsir777 AEsir777 force-pushed the explicit-cast-varlist branch 3 times, most recently from c143192 to 4d493f5 Compare November 13, 2023 21:19
resultChildVector->setNull(i, inputChildVector->isNull(i));
if (!resultChildVector->isNull(i)) {
// cast position i in child data vector
OP_WRAPPER::template operation<OPERAND_TYPE, RESULT_TYPE, FUNC>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is covered

src/function/vector_cast_functions.cpp Outdated Show resolved Hide resolved
src/function/vector_cast_functions.cpp Show resolved Hide resolved
src/function/vector_cast_functions.cpp Outdated Show resolved Hide resolved
src/function/vector_cast_functions.cpp Outdated Show resolved Hide resolved
@AEsir777 AEsir777 force-pushed the explicit-cast-varlist branch 5 times, most recently from 6e8edde to 43cee94 Compare November 14, 2023 17:04
@AEsir777 AEsir777 merged commit 684511c into master Nov 14, 2023
12 checks passed
@AEsir777 AEsir777 deleted the explicit-cast-varlist branch November 14, 2023 17:42
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.

None yet

2 participants