JackieTien97 opened a new pull request, #18924:
URL: https://github.com/apache/iotdb/pull/18924
## Description
`pattern_match` with `PARTITION BY` reused one `QetchAlgorithm` across all
partition processors. With two partitions of five rows each, the second
partition emitted pass-through indexes `5..9` against a five-row cache and
failed with `Invalid position 5 and length 1 in block with 5 positions`.
Create and configure a fresh algorithm in `getDataProcessor()` so each
partition owns its row indexes and matching state. Add regression tests for
ordinary and regex patterns, successive partitions of different lengths,
independently interleaved processors, and SQL queries over two devices.
## Validation
- All three new unit tests fail on the original implementation and pass
after the fix.
- Clean reactor verification with `TableSimpleIT`: 3 unit tests and 2 SQL
integration tests passed in a 1 ConfigNode / 1 DataNode environment.
- Clean reactor test of `node-commons` and its dependencies with
`with-zh-locale`: all 3 unit tests passed.
- Spotless, Checkstyle, and license checks passed in the isolated
verification checkout.
```bash
mvn clean verify -pl integration-test -am -P
with-integration-tests,TableSimpleIT \
-Dtest=PatternMatchTableFunctionTest \
'-Dit.test=IoTDBWindowTVFIT#testPatternMatchPartitions+testPatternMatchRegexPartitions'
\
-DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false \
-Dfailsafe.failIfNoSpecifiedTests=false
mvn clean test -pl iotdb-core/node-commons -am -P with-zh-locale \
-Dtest=PatternMatchTableFunctionTest \
-Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false
```
This PR has:
- [x] been self-reviewed.
- [x] added comments explaining the intent of the change.
- [x] added unit tests.
- [x] added integration tests.
- [x] been tested in a test IoTDB cluster.
--
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]