VGalaxies commented on code in PR #14386:
URL: https://github.com/apache/iotdb/pull/14386#discussion_r1903763820
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/dataregion/IoTDBDataRegionExtractor.java:
##########
@@ -134,22 +135,37 @@ public void validate(final PipeParameterValidator
validator) throws Exception {
.getStringOrDefault(
SystemConstant.SQL_DIALECT_KEY,
SystemConstant.SQL_DIALECT_TREE_VALUE)
.equals(SystemConstant.SQL_DIALECT_TREE_VALUE);
- final boolean isTreeModelDataAllowedToBeCaptured =
+ final boolean isCaptureTree =
validator
.getParameters()
.getBooleanOrDefault(
Arrays.asList(
PipeExtractorConstant.EXTRACTOR_CAPTURE_TREE_KEY,
PipeExtractorConstant.SOURCE_CAPTURE_TREE_KEY),
isTreeDialect);
- final boolean isTableModelDataAllowedToBeCaptured =
+ final boolean isCaptureTable =
validator
.getParameters()
.getBooleanOrDefault(
Arrays.asList(
PipeExtractorConstant.EXTRACTOR_CAPTURE_TABLE_KEY,
PipeExtractorConstant.SOURCE_CAPTURE_TABLE_KEY),
!isTreeDialect);
+ if (!isCaptureTree && !isCaptureTable) {
+ throw new PipeParameterNotValidException(
+ "capture.tree and capture.table can not both be specified as false");
+ }
Review Comment:
> If both `capture.tree` and `capture.table` are specified as false, then
this pipe will not be visible under either the tree model or the table model.
In other words, this pipe cannot be dropped after it is created, becoming a
ghost pipe.
--
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]