From 40ab0b3056d505342c4ee0f467553519e12726f7 Mon Sep 17 00:00:00 2001 From: Marius Grama Date: Thu, 20 Apr 2023 17:19:51 +0200 Subject: [PATCH] Showcase dereference pushdown limited effectiveness in Iceberg Dereference pushdown is effective on filtering the data being read from the source so that only relevant nested data is being provided by the connector to the engine. However, the whole content corresponding to a nested column is currently read from the data files. --- .../io/trino/plugin/iceberg/BaseIcebergConnectorTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java index 47c7915b2ff7..1f45a94880d5 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java @@ -4930,11 +4930,16 @@ public void testProjectionPushdownReadsLessData() getSession(), selectQuery, statsWithPushdown -> { + DataSize physicalDataSizeWithPushdown = statsWithPushdown.getPhysicalInputDataSize(); DataSize processedDataSizeWithPushdown = statsWithPushdown.getProcessedInputDataSize(); assertQueryStats( sessionWithoutPushdown, selectQuery, - statsWithoutPushdown -> assertThat(statsWithoutPushdown.getProcessedInputDataSize()).isGreaterThan(processedDataSizeWithPushdown), + statsWithoutPushdown -> { + //TODO (https://github.com/trinodb/trino/issues/17156) add dereference pushdown on the physical layer + assertThat(statsWithoutPushdown.getPhysicalInputDataSize()).isEqualTo(physicalDataSizeWithPushdown); + assertThat(statsWithoutPushdown.getProcessedInputDataSize()).isGreaterThan(processedDataSizeWithPushdown); + }, results -> assertEquals(results.getOnlyColumnAsSet(), expected)); }, results -> assertEquals(results.getOnlyColumnAsSet(), expected));