xiangfu0 commented on code in PR #19894:
URL: https://github.com/apache/pinot/pull/19894#discussion_r4610078847
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/RegexpMatcher.java:
##########
@@ -43,9 +44,11 @@ public class RegexpMatcher {
private final FST<Long> _fst;
private final Automaton _automaton;
+ @SuppressWarnings("deprecation") // Preserve the complement syntax supported
by existing FST queries.
public RegexpMatcher(String regexQuery, FST<Long> fst) {
_fst = fst;
- _automaton = (new RegExp(regexQuery)).toAutomaton();
+ _automaton = Operations.determinize(new RegExp(regexQuery, RegExp.ALL |
RegExp.DEPRECATED_COMPLEMENT).toAutomaton(),
Review Comment:
The shared compiler now determinizes before either matcher traverses the
FST. Both FST and IFST run `testOverlappingRegexAndComplement` on Lucene 10.6.0.
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/text/LuceneTextIndexReader.java:
##########
@@ -80,12 +84,66 @@ public class LuceneTextIndexReader implements
TextIndexReader {
private Constructor<QueryParserBase> _queryParserClassConstructor;
private boolean _enablePrefixSuffixMatchingInPhraseQueries = false;
+ /// Retains support for immutable Lucene 8 text indexes through Lucene's
backward codecs.
+ /// The default reader only accepts indexes created with the current or
previous major version.
+ static DirectoryReader openIndexReader(Directory directory)
Review Comment:
The fallback now reads the commit with
`SegmentInfos.readLatestCommit(directory, 8)` and opens it with
`StandardDirectoryReader`. The real Lucene 8 fixture passed on 10.6.0 through
both the filesystem and packed `PinotDataBuffer` constructors.
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/vector/lucene99/HnswCodec.java:
##########
@@ -18,21 +18,21 @@
*/
package org.apache.pinot.segment.local.segment.creator.impl.vector.lucene99;
-import org.apache.lucene.backward_codecs.lucene90.Lucene90PostingsFormat;
import org.apache.lucene.codecs.DocValuesFormat;
import org.apache.lucene.codecs.FilterCodec;
import org.apache.lucene.codecs.KnnVectorsFormat;
import org.apache.lucene.codecs.PointsFormat;
import org.apache.lucene.codecs.PostingsFormat;
+import org.apache.lucene.codecs.lucene100.Lucene100Codec;
import org.apache.lucene.codecs.lucene90.Lucene90DocValuesFormat;
import org.apache.lucene.codecs.lucene90.Lucene90PointsFormat;
-import org.apache.lucene.codecs.lucene912.Lucene912Codec;
+import org.apache.lucene.codecs.lucene912.Lucene912PostingsFormat;
Review Comment:
The 10.6.0 bump removes the explicit postings override. `HnswCodec` now gets
its postings format from `Lucene104Codec` and supplies its own HNSW vector
format.
##########
compatibility-verifier/checkoutAndBuild.sh:
##########
@@ -55,8 +55,12 @@ function checkOut() {
git pull origin master 1>&2 || exit 1
# Pull the tag list so that we can check out by tag name
git fetch --tags 1>&2 || exit 1
- # Return different error code if old version is not on master
- git checkout $commitHash 1>&2 || exit 22 # invalid argument error code
+ # Unmerged PR baselines are not necessarily reachable from master or a tag.
+ if ! git rev-parse --verify "${commitHash}^{commit}" >/dev/null 2>&1; then
+ git fetch origin "$commitHash" 1>&2 || exit 22
+ commitHash=FETCH_HEAD
+ fi
+ git checkout --detach "$commitHash" 1>&2 || exit 22 # invalid argument error
code
Review Comment:
The final compatibility matrix exercises the released `release-1.6.0`
rollback target and `master` through the upstream checkout script.
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/RegexpMatcher.java:
##########
@@ -43,9 +44,11 @@ public class RegexpMatcher {
private final FST<Long> _fst;
private final Automaton _automaton;
+ @SuppressWarnings("deprecation") // Preserve the complement syntax supported
by existing FST queries.
public RegexpMatcher(String regexQuery, FST<Long> fst) {
_fst = fst;
- _automaton = (new RegExp(regexQuery)).toAutomaton();
+ _automaton = Operations.determinize(new RegExp(regexQuery, RegExp.ALL |
RegExp.DEPRECATED_COMPLEMENT).toAutomaton(),
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
Review Comment:
Addressed in 81585e4235. Both FST matchers now check a shared construction
budget before Lucene builds the automaton, including for nested counted
repetitions. The FST and IFST regression tests cover oversized repeats and
verify that ordinary repeats still match. The built-in `TEXT_MATCH` parsers use
the same budget.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]