github-actions[bot] commented on code in PR #65760:
URL: https://github.com/apache/doris/pull/65760#discussion_r3601862240
##########
docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run31.sql:
##########
@@ -0,0 +1,32 @@
+-- Reproducer for an Iceberg table whose active snapshot contains both
+-- Parquet and ORC data files. Run this file once in the Spark Iceberg
container.
+-- It deliberately does not drop the table, so rerunning requires a new table
name.
+
+CREATE DATABASE IF NOT EXISTS demo.test_db;
+USE demo.test_db;
+
+CREATE TABLE mixed_file_format (
Review Comment:
[P2] Reset this fixture before recreating it. The Iceberg launcher brings
the stack down and back up without deleting its bind-mounted catalog/data,
while the entrypoint sources every bootstrap SQL file on each start. On a
second `run-thirdparties-docker.sh -c iceberg`, this `CREATE TABLE` sees the
existing table (or the later inserts append another six rows), so setup and the
committed 3-Parquet/3-ORC output are no longer repeatable. Please also remove
or update the now-obsolete single-use note at the top of this file.
```suggestion
DROP TABLE IF EXISTS mixed_file_format;
CREATE TABLE mixed_file_format (
```
##########
fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergUtilsTest.java:
##########
@@ -78,6 +78,27 @@
import java.util.UUID;
public class IcebergUtilsTest {
+ @Test
+ public void testGetFileFormatUsesPropertiesWithoutPlanningDataFiles() {
+ Table table = Mockito.mock(Table.class);
+ Mockito.when(table.properties()).thenReturn(Collections.emptyMap());
Review Comment:
[P2] Make this mock represent a populated propertyless table. Mockito
returns `null` for the unstubbed `currentSnapshot()`, and the removed
implementation also returned Parquet before `newScan()` in that case. As a
result, both this assertion and `never().newScan()` pass on the base code, so
the intended no-planning regression is not covered.
```suggestion
Mockito.when(table.properties()).thenReturn(Collections.emptyMap());
Mockito.when(table.currentSnapshot()).thenReturn(Mockito.mock(Snapshot.class));
```
--
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]