Skip to content

feat: Enable Indexing of array fields#3092

Merged
islamaliev merged 26 commits intosourcenetwork:developfrom
islamaliev:feat/index-arr-elements
Oct 4, 2024
Merged

feat: Enable Indexing of array fields#3092
islamaliev merged 26 commits intosourcenetwork:developfrom
islamaliev:feat/index-arr-elements

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
@codecov
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 :)

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

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
ChrisBQu pushed a commit to ChrisBQu/defradb that referenced this pull request Feb 21, 2025
## Relevant issue(s)

Resolves sourcenetwork#2279

## Description

Enable indexing of array fields.

This change also adds `Equal` method to `NormalValue`.
ChrisBQu pushed a commit to ChrisBQu/defradb that referenced this pull request Apr 25, 2025
## Relevant issue(s)

Resolves sourcenetwork#2279

## Description

Enable indexing of array fields.

This change also adds `Equal` method to `NormalValue`.
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