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

feat: Enable Indexing of array fields #3092

Merged
merged 26 commits into from
Oct 4, 2024

Conversation

islamaliev
Copy link
Contributor

Relevant issue(s)

Resolves #2279

Description

Enable indexing of array fields.

This change also adds IsEqual method to NormalValue.

@islamaliev islamaliev requested a review from a team October 2, 2024 10:01
@islamaliev islamaliev self-assigned this Oct 2, 2024
@islamaliev islamaliev added feature New feature or request perf Performance issue or suggestion area/collections Related to the collections system labels Oct 2, 2024
@islamaliev islamaliev added this to the DefraDB v0.14 milestone Oct 2, 2024
@islamaliev islamaliev changed the title Feat/index-arr-elements feat: Enable Indexing of array fields Oct 2, 2024
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 87.28653% with 67 lines in your changes missing coverage. Please review.

Project coverage is 79.99%. Comparing base (4e5470c) to head (045bbc7).

Files with missing lines Patch % Lines
internal/db/index.go 77.72% 22 Missing and 19 partials ⚠️
internal/db/fetcher/indexer_iterators.go 80.22% 10 Missing and 8 partials ⚠️
internal/db/collection_index.go 80.00% 1 Missing and 1 partial ⚠️
internal/db/fetcher/errors.go 0.00% 2 Missing ⚠️
internal/planner/filter/merge.go 75.00% 1 Missing and 1 partial ⚠️
client/normal_nillable_array.go 95.83% 1 Missing ⚠️
internal/planner/type_join.go 66.67% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3092      +/-   ##
===========================================
+ Coverage    79.81%   79.99%   +0.18%     
===========================================
  Files          351      352       +1     
  Lines        27335    27757     +422     
===========================================
+ Hits         21816    22204     +388     
- Misses        3982     3987       +5     
- Partials      1537     1566      +29     
Flag Coverage Δ
all-tests 79.99% <87.29%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
client/index.go 88.24% <ø> (ø)
client/normal_array.go 100.00% <100.00%> (ø)
client/normal_array_of_nillables.go 97.62% <100.00%> (+1.87%) ⬆️
client/normal_nillable_array_of_nillables.go 100.00% <100.00%> (ø)
client/normal_nillable_scalar.go 100.00% <100.00%> (ø)
client/normal_scalar.go 100.00% <100.00%> (ø)
client/normal_void.go 97.89% <100.00%> (+0.07%) ⬆️
client/schema_field_description.go 65.76% <100.00%> (+5.40%) ⬆️
internal/core/encoding.go 79.91% <100.00%> (+0.28%) ⬆️
internal/core/key.go 83.02% <100.00%> (+0.42%) ⬆️
... and 13 more

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e5470c...045bbc7. Read the comment docs.

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Part way through reviewing, looks really great so far, only very localised comments atm :)

tests/integration/index/array_test.go Show resolved Hide resolved
client/normal_array.go Outdated Show resolved Hide resolved
client/normal_array_of_nillables.go Show resolved Hide resolved
internal/core/key.go Outdated Show resolved Hide resolved
internal/core/key.go Outdated Show resolved Hide resolved
internal/db/collection_index.go Show resolved Hide resolved
internal/db/fetcher/indexer_iterators.go Outdated Show resolved Hide resolved
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Looks really good Islam, just a couple more todos from me before merge

internal/db/index.go Show resolved Hide resolved
internal/db/index.go Outdated Show resolved Hide resolved
internal/db/index.go Show resolved Hide resolved
internal/db/index.go Show resolved Hide resolved
internal/db/index.go Outdated Show resolved Hide resolved
internal/db/index.go Show resolved Hide resolved
internal/db/index.go Show resolved Hide resolved
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Looks really good Islam, thanks for this :)

@islamaliev islamaliev merged commit bc93bff into sourcenetwork:develop Oct 4, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system feature New feature or request perf Performance issue or suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sec. Index: enable indexing of elements of array fields
3 participants