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

Implement map functions #1660

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Implement map functions #1660

merged 1 commit into from
Jun 12, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Jun 11, 2023

  1. Implement the following map functions:
    a. MAP_EXTRACT: Return a list containing the value for a given key or an empty list if the key is not contained in the map. The type of the key provided in the second parameter must match the type of the map’s keys else an error is returned.
    b.CARDINALITY: Return the size of the map (or the number of entries in the map).
    c. MAP_KEYS: Return a list of all keys in the map.
    d. MAP_VALUES: Return a list of all values in the map.
  2. Fixed list parsing bug.

@acquamarin acquamarin changed the title Implement struct functions Implement map functions Jun 11, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 82.92% and project coverage change: -0.09 ⚠️

Comparison is base (139dbe0) 91.44% compared to head (ae66ec2) 91.35%.

❗ Current head ae66ec2 differs from pull request most recent head ff6c3db. Consider uploading reports for the commit ff6c3db to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1660      +/-   ##
==========================================
- Coverage   91.44%   91.35%   -0.09%     
==========================================
  Files         726      730       +4     
  Lines       26362    26459      +97     
==========================================
+ Hits        24106    24171      +65     
- Misses       2256     2288      +32     
Impacted Files Coverage Δ
src/include/common/type_utils.h 100.00% <ø> (ø)
src/common/type_utils.cpp 60.29% <45.28%> (-9.02%) ⬇️
src/storage/copier/table_copy_utils.cpp 78.18% <83.33%> (-0.02%) ⬇️
src/function/vector_list_operation.cpp 89.55% <88.88%> (-1.23%) ⬇️
src/function/vector_map_operation.cpp 91.22% <90.90%> (-2.89%) ⬇️
src/include/function/list/vector_list_operations.h 95.45% <94.73%> (-1.92%) ⬇️
src/common/types/types.cpp 91.26% <100.00%> (ø)
src/expression_evaluator/function_evaluator.cpp 100.00% <100.00%> (ø)
src/function/built_in_vector_operations.cpp 96.60% <100.00%> (+0.06%) ⬆️
src/function/vector_struct_operations.cpp 92.72% <100.00%> (ø)
... and 9 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

src/common/types/types.cpp Show resolved Hide resolved
src/common/type_utils.cpp Outdated Show resolved Hide resolved
src/include/common/vector/value_vector.h Outdated Show resolved Hide resolved
src/function/vector_map_operation.cpp Outdated Show resolved Hide resolved
@acquamarin acquamarin merged commit cd3f679 into master Jun 12, 2023
8 checks passed
@acquamarin acquamarin deleted the map-function branch June 12, 2023 03:08
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