github-actions[bot] commented on code in PR #68479:
URL: https://github.com/apache/doris/pull/68479#discussion_r4336424770


##########
fe/fe-core/src/test/java/org/apache/doris/catalog/OlapTableTest.java:
##########
@@ -58,6 +59,56 @@
 
 public class OlapTableTest {
 
+    @Test
+    public void testFlexiblePartialUpdateRejectsRollup() {
+        OlapTable table = newFlexiblePartialUpdateTable();
+        Assertions.assertDoesNotThrow(table::validateForFlexiblePartialUpdate);
+
+        List<Column> baseSchema = table.getBaseSchema(true);
+        List<Column> rollupSchema = Lists.newArrayList(new 
Column(baseSchema.get(1)),
+                new Column(baseSchema.get(0)), new Column(baseSchema.get(2)));
+        table.setIndexMeta(20L, "rollup", rollupSchema, 0, 0, (short) 2,
+                TStorageType.COLUMN, KeysType.UNIQUE_KEYS);
+        table.rebuildFullSchema();
+        // Plain rollup columns have no defining expression, so the MV-column 
check misses them.
+        
Assertions.assertFalse(table.getFullSchema().stream().anyMatch(Column::isMaterializedViewColumn));
+
+        UserException exception = Assertions.assertThrows(UserException.class,
+                table::validateForFlexiblePartialUpdate);
+        Assertions.assertTrue(exception.getMessage().contains(
+                "Flexible partial update is not supported on tables with 
rollup or sync materialized view."));
+    }
+
+    @Test
+    public void testFlexiblePartialUpdateAllowsRowBinlogIndex() {
+        OlapTable table = newFlexiblePartialUpdateTable();
+        table.setIndexMeta(20L, "row_binlog", table.getBaseSchema(true), 0, 0, 
(short) 2,
+                TStorageType.COLUMN, KeysType.UNIQUE_KEYS);
+        table.getIndexMetaByIndexId(20L).setRowBinlogIndexId(20L);

Review Comment:
   [P1] Use the current changelog-index setter in the new test
   
   Both calls to `setRowBinlogIndexId(20L)` target `MaterializedIndexMeta`, 
which exposes only `setChangelogIndexId(long)` on this head. The old setter no 
longer exists, so `OlapTableTest` fails Java test compilation and FE unit tests 
cannot run. Change both calls to `setChangelogIndexId(20L)` so the 
internal-index exclusion test compiles and exercises the current API.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to