citrusreticulata commented on code in PR #9826:
URL: https://github.com/apache/iotdb/pull/9826#discussion_r1190746104
##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertRowNode.java:
##########
@@ -836,14 +836,21 @@ public void updateAfterSchemaValidation() throws
QueryProcessException {
}
@Override
- public void validateMeasurementSchema(int index, IMeasurementSchemaInfo
measurementSchemaInfo) {
+ public void validateMeasurementSchema(int index, IMeasurementSchemaInfo
iMeasurementSchemaInfo) {
if (measurementSchemas == null) {
measurementSchemas = new MeasurementSchema[measurements.length];
}
- if (measurementSchemaInfo == null) {
+ if (iMeasurementSchemaInfo == null) {
measurementSchemas[index] = null;
} else {
- measurementSchemas[index] = measurementSchemaInfo.getSchema();
+ if (iMeasurementSchemaInfo.isLogicalView()) {
+ throw new RuntimeException(
+ new UnsupportedOperationException(
+ "This iMeasurementSchemaInfo is logical view schema info,"
+ + " can not convert it into MeasurementSchema.
InsertRowNode should use a measurementSchemaInfo."));
+ } else {
+ measurementSchemas[index] = (MeasurementSchema)
iMeasurementSchemaInfo.getSchema();
+ }
}
Review Comment:
All right. Those changes will be reverted at next commit. Thanks.
##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertTabletNode.java:
##########
@@ -1151,14 +1151,21 @@ public ISchemaValidation getSchemaValidation() {
}
@Override
- public void validateMeasurementSchema(int index, IMeasurementSchemaInfo
measurementSchemaInfo) {
+ public void validateMeasurementSchema(int index, IMeasurementSchemaInfo
iMeasurementSchemaInfo) {
if (measurementSchemas == null) {
measurementSchemas = new MeasurementSchema[measurements.length];
}
- if (measurementSchemaInfo == null) {
+ if (iMeasurementSchemaInfo == null) {
measurementSchemas[index] = null;
} else {
- measurementSchemas[index] = measurementSchemaInfo.getSchema();
+ if (iMeasurementSchemaInfo.isLogicalView()) {
+ throw new RuntimeException(
+ new UnsupportedOperationException(
+ "This iMeasurementSchemaInfo is logical view schema info,"
+ + " can not convert it into MeasurementSchema.
InsertTabletNode should use a measurementSchemaInfo."));
+ } else {
+ measurementSchemas[index] = (MeasurementSchema)
iMeasurementSchemaInfo.getSchema();
+ }
}
Review Comment:
All right. Those changes will be reverted at next commit. Thanks.
--
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]