VGalaxies commented on code in PR #14386:
URL: https://github.com/apache/iotdb/pull/14386#discussion_r1903762997
##########
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");
+ }
+
+ final boolean isDoubleLiving =
+ validator
+ .getParameters()
+ .getBooleanOrDefault(
+ Arrays.asList(
+ PipeExtractorConstant.EXTRACTOR_MODE_DOUBLE_LIVING_KEY,
+ PipeExtractorConstant.SOURCE_MODE_DOUBLE_LIVING_KEY),
+
PipeExtractorConstant.EXTRACTOR_MODE_DOUBLE_LIVING_DEFAULT_VALUE);
+ final boolean isTreeModelDataAllowedToBeCaptured = isDoubleLiving ||
isCaptureTree;
+ final boolean isTableModelDataAllowedToBeCaptured = isDoubleLiving ||
isCaptureTable;
Review Comment:
Yes, if double-living is set to true, then capture.tree and capture.table
are always true.
--
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]