Skip to content

Conversation

@gortiz
Copy link
Contributor

@gortiz gortiz commented Jan 27, 2023

This is a partial draft PR related to #10183. The whole PR is in #10184. It isn't intended to be merged as it is and it doesn't require to compile or pass the checks. It has been created in order to make it easier to understand the PR with all the changes.

This PR depends on #10192. Readers only interested in the difference between this and the previous PR can focus on gortiz#2

This PR shows all IndexTypes partially implemented without actually modifying the code.

@gortiz gortiz marked this pull request as draft January 27, 2023 15:04
@gortiz gortiz changed the title Index spi: all types [Draft] Index spi: all types Jan 27, 2023
@gortiz gortiz changed the title [Draft] Index spi: all types [draft] Index spi: all types Jan 27, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2023

Codecov Report

Merging #10193 (02afd66) into master (11272b7) will decrease coverage by 2.04%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master   #10193      +/-   ##
============================================
- Coverage     70.27%   68.23%   -2.04%     
+ Complexity     6113     6104       -9     
============================================
  Files          2070     2088      +18     
  Lines        112024   112149     +125     
  Branches      17051    17054       +3     
============================================
- Hits          78725    76530    -2195     
- Misses        27751    30149    +2398     
+ Partials       5548     5470      -78     
Flag Coverage Δ
integration1 24.45% <0.00%> (-0.01%) ⬇️
integration2 ?
unittests1 67.83% <0.00%> (-0.10%) ⬇️
unittests2 13.96% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...ment/local/segment/index/bloom/BloomIndexType.java 0.00% <0.00%> (ø)
...egment/index/dictionary/DictionaryIndexPlugin.java 0.00% <0.00%> (ø)
.../segment/index/dictionary/DictionaryIndexType.java 0.00% <0.00%> (ø)
...ocal/segment/index/forward/ForwardIndexPlugin.java 0.00% <0.00%> (ø)
.../local/segment/index/forward/ForwardIndexType.java 0.00% <0.00%> (ø)
...egment/local/segment/index/fst/FstIndexPlugin.java 0.00% <0.00%> (ø)
.../segment/local/segment/index/fst/FstIndexType.java 0.00% <0.00%> (ø)
.../segment/local/segment/index/h3/H3IndexPlugin.java 0.00% <0.00%> (ø)
...ot/segment/local/segment/index/h3/H3IndexType.java 0.00% <0.00%> (ø)
...al/segment/index/inverted/InvertedIndexPlugin.java 0.00% <0.00%> (ø)
... and 10 more

... and 182 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gortiz gortiz mentioned this pull request Mar 21, 2023

@Override
public IndexReaderFactory<IndexReader> getReaderFactory() {
throw new UnsupportedOperationException();
Copy link
Contributor

Choose a reason for hiding this comment

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

Some functions are unsupported. some are implemented.

I assume the unsupported functions will be added in next PR. Is that the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep. They are implemented in #10184

/**
* The default range index version used when not specified in the TableConfig.
*
* This value should be equal to the one used in {@link org.apache.pinot.spi.config.table.IndexingConfig}
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment for this INSTANCE constant? I feel it's not quite related, but I may have missed some details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch and a funny story. I created this PR by using diff from changes in index-spi branch and then removing things I didn't want to show in this PR. Here I removed a static constant but didn't removed the Javadoc.

The problem with my approach is that now if I delete the javadoc here, once I merge this with #10184 the comment will be removed without conflict and I may forget about it. Therefore what I'm going to do is to bring back the static constant. It is not going to be used in this PR, but it is going to ensure we don't accidentally remove the javadoc.

*
* This value should be equal to the one used in {@link org.apache.pinot.spi.config.table.IndexingConfig}
*/
public static final int DEFAULT_RANGE_INDEX_VERSION = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure where this would be used.. and how we change the index version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be used in the next PR. We have been talking about it here.

TL;DR: The const is not used here, but I added the javadoc by mistake on this PR. We can either add here the const (no problematic), let the javadoc written without the attribute (which seems rare) or remove here the javadoc. The later may seem to be the best option, but if I do that, the javadoc will be removed from the full PR once I merge the changes. If I don't remember to add it later, we will lose the javadoc. Given that this process is error prone, I decided to just bring the const to this PR, which causes no problem at the cost of having a const we don't actually use here.

and how we change the index version
This is the range index version we use right now.

@KKcorps KKcorps merged commit 1d02d0e into apache:master Mar 28, 2023
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.

6 participants