Copilot commented on code in PR #17936:
URL: https://github.com/apache/iotdb/pull/17936#discussion_r3407455788


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusLogToTabletConverter.java:
##########
@@ -512,51 +501,32 @@ private List<Tablet> 
convertRelationalInsertTabletNode(final RelationalInsertTab
 
     final String[] measurements = node.getMeasurements();
     final TSDataType[] dataTypes = node.getDataTypes();
-    final long[] times = node.getTimes();
-    final Object[] columns = node.getColumns();
-    final BitMap[] bitMaps = node.getBitMaps();
-    final int rowCount = node.getRowCount();
-    final List<Integer> matchedColumnIndices =
-        getMatchedTableColumnIndices(
-            measurements, dataTypes, columns, node.getColumnCategories(), 
true);
-    if (matchedColumnIndices.isEmpty()) {
+    if (Objects.isNull(measurements)
+        || Objects.isNull(dataTypes)
+        || Objects.isNull(node.getColumns())) {

Review Comment:
   In convertRelationalInsertTabletNode, the loop assumes `measurements.length 
== dataTypes.length` and will throw AIOOBE if they diverge 
(RelationalInsertTabletNode codebase often guards with `i < columns.length && i 
< dataTypes.length`). Consider validating the array lengths (and returning 
empty + logging) before building schemas to avoid runtime crashes on 
malformed/partial WAL nodes.



-- 
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]

Reply via email to