wombatu-kun commented on code in PR #19298:
URL: https://github.com/apache/hudi/pull/19298#discussion_r3690805803


##########
hudi-trino/src/test/java/io/trino/plugin/hudi/TestHudiUncompactedMetadataTable.java:
##########
@@ -0,0 +1,117 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.trino.plugin.hudi;
+
+import io.trino.Session;
+import io.trino.plugin.hudi.testing.UncompactedMetadataHudiTablesInitializer;
+import io.trino.testing.AbstractTestQueryFramework;
+import io.trino.testing.MaterializedResult;
+import io.trino.testing.QueryRunner;
+import org.junit.jupiter.api.Test;
+
+import static 
io.trino.plugin.hudi.testing.UncompactedMetadataHudiTablesInitializer.TABLE_NAME;
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Regression tests for apache/hudi#19279: queries on tables whose metadata 
table (MDT) has
+ * UNCOMPACTED delta commits. Those deltas are native HFILE log files, which 
the connector previously
+ * rejected ("Native HFILE log files are not supported..."), failing every 
query through the unguarded
+ * partition-stats pruning path. The table written by {@link 
UncompactedMetadataHudiTablesInitializer}
+ * keeps its MDT deliberately uncompacted (the zip fixtures always compact 
after every commit), so the
+ * queries below only succeed if the connector reads HFILE log deltas in the 
MDT's
+ * {@code files}/{@code column_stats}/{@code partition_stats} partitions.
+ */
+public class TestHudiUncompactedMetadataTable

Review Comment:
   `checkState(corrupted > 0)` proves bytes were flipped, not that any MDT read 
now throws, so `testReadFallsBackToDirectListingOnUnreadableMetadataTable` 
cannot tell the fallback apart from a clean read if the fixed trailer offsets 
ever miss. Have the initializer assert that a metadata-table read of the 
corrupted table actually fails.
   



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