This is an automated email from the ASF dual-hosted git repository.
hubgeter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0ee46bdc2f2 [fix](fe) Preserve Iceberg CAST semantics during file
pruning (#70674)
0ee46bdc2f2 is described below
commit 0ee46bdc2f24629af1e83cada693f0b74d6899d6
Author: daidai <[email protected]>
AuthorDate: Tue Dec 1 16:31:41 2026 +0800
[fix](fe) Preserve Iceberg CAST semantics during file pruning (#70674)
### Background
Iceberg uses pushed predicates to prune manifests and data files before
Doris evaluates rows. The FE converts scan predicates to neutral
connector expressions, whose current representation unwraps CAST
expressions. Predicates kept in Doris are evaluated after scanning the
selected files.
### What problem does this PR solve?
Issue Number: None
Related PR: #69551 (added the original disabled reproduction), #70511
(related column-to-string CAST protection)
PR Type: Bugfix
Problem Summary:
A DECIMAL(38,0) value of `9007199254740993` matches `CAST(value AS
DOUBLE) = CAST(9007199254740992 AS DOUBLE)`, but removing the column
CAST lets Iceberg compare the original decimal value and prune a
matching file. Declare CAST predicate pushdown unsupported for Iceberg
so the existing scan gate preserves these predicates in Doris before
CAST information is lost. Most of this change moves the disabled
downstream reproduction to engine tests covering planned expressions,
actual Iceberg metadata, and row/file retention; independent plain
conjuncts remain pushable.
---
.../iceberg/IcebergConnectorMetadata.java | 16 +-
.../IcebergPredicateConverterCoverageTest.java | 42 +---
.../doris/connector/spi/ConnectorPushdownOps.java | 4 +-
.../scan/PluginDrivenScanNodeIcebergCastTest.java | 227 +++++++++++++++++++++
.../iceberg/ICEBERG_CAPABILITY_TEST_COVERAGE.md | 2 +-
.../test_iceberg_predicate_conversion.groovy | 7 +-
6 files changed, 247 insertions(+), 51 deletions(-)
diff --git
a/fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java
b/fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java
index 4108c6717b7..cf5b2148604 100644
---
a/fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java
+++
b/fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java
@@ -2558,20 +2558,14 @@ public class IcebergConnectorMetadata implements
ConnectorMetadata {
// ========== Predicate pushdown ==========
/**
- * Iceberg accepts CAST-bearing predicates ({@code true}, the SPI default,
stated here rather than
- * inherited).
- *
- * <p>This is a conscious acceptance of the risk the SPI documents, not a
claim of safety: the residual
- * predicate is converted by {@code IcebergPredicateConverter} and handed
to the {@code TableScan}, so it
- * prunes manifests and data files AT THE SOURCE, and the engine has
already unwrapped the CAST — a
- * comparison whose literal iceberg binds differently than Doris coerced
it can skip files that hold
- * matching rows, which BE cannot recover. It stays {@code true} for
parity with the legacy
- * {@code IcebergScanNode}, which pushed the same converted predicate; no
defect has been observed. A
- * connector added later should default to {@code false} instead (see the
SPI javadoc).</p>
+ * Keep CAST predicates in Doris: the neutral converter unwraps CASTs, so
source-side pruning
+ * would compare the original column values instead of the cast results.
For example, adjacent
+ * DECIMAL values can become equal after conversion to DOUBLE; comparing
the uncast values can
+ * discard a file containing matching rows. Independent predicates without
CAST remain pushable.
*/
@Override
public boolean supportsCastPredicatePushdown(ConnectorSession session) {
- return true;
+ return false;
}
@Override
diff --git
a/fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergPredicateConverterCoverageTest.java
b/fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergPredicateConverterCoverageTest.java
index 6412a9f2ade..b4f271e8feb 100644
---
a/fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergPredicateConverterCoverageTest.java
+++
b/fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergPredicateConverterCoverageTest.java
@@ -23,30 +23,20 @@ import
org.apache.doris.connector.spi.pushdown.ConnectorComparison;
import org.apache.doris.connector.spi.pushdown.ConnectorIn;
import org.apache.doris.connector.spi.pushdown.ConnectorLiteral;
-import org.apache.iceberg.DataFile;
-import org.apache.iceberg.DataFiles;
-import org.apache.iceberg.FileFormat;
-import org.apache.iceberg.Metrics;
-import org.apache.iceberg.PartitionSpec;
import org.apache.iceberg.Schema;
import org.apache.iceberg.StructLike;
import org.apache.iceberg.expressions.Evaluator;
import org.apache.iceberg.expressions.Expression;
-import org.apache.iceberg.expressions.InclusiveMetricsEvaluator;
-import org.apache.iceberg.types.Conversions;
import org.apache.iceberg.types.Type;
import org.apache.iceberg.types.Types;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.math.BigDecimal;
-import java.nio.ByteBuffer;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import java.util.Map;
public class IcebergPredicateConverterCoverageTest {
private static final List<ConnectorComparison.Operator> OPERATORS =
Arrays.asList(
@@ -106,32 +96,12 @@ public class IcebergPredicateConverterCoverageTest {
}
@Test
- @Disabled("Known issue: stripping a DECIMAL-to-DOUBLE cast can prune
matching rows and files.")
- public void decimalToDoubleComparisonMustNotPruneMatchingRows() {
- Types.DecimalType type = Types.DecimalType.of(38, 0);
- Schema schema = schema(type);
- BigDecimal row = new BigDecimal("9007199254740993");
- double literal = 9007199254740992d;
- Assertions.assertTrue(row.doubleValue() == literal);
- // The engine removes the column's DOUBLE cast; pruning must preserve
its many-to-one equality.
- ConnectorComparison comparison = new
ConnectorComparison(ConnectorComparison.Operator.EQ,
- new ConnectorColumnRef("value", ConnectorType.of("DECIMALV3",
38, 0)),
- new ConnectorLiteral(ConnectorType.of("DOUBLE"), literal));
- List<Expression> converted = new IcebergPredicateConverter(schema,
ZoneOffset.UTC).convert(comparison);
- Map<Integer, ByteBuffer> bounds = Collections.singletonMap(1,
Conversions.toByteBuffer(type, row));
- Metrics metrics = new Metrics(1L, null, Collections.singletonMap(1,
1L),
- Collections.singletonMap(1, 0L), null, bounds, bounds);
- DataFile file = DataFiles.builder(PartitionSpec.unpartitioned())
-
.withPath("data/decimal-double.parquet").withFormat(FileFormat.PARQUET)
- .withFileSizeInBytes(1024L).withMetrics(metrics).build();
- // Dropping the predicate is safe; every predicate that is pushed must
retain this matching file.
- for (Expression predicate : converted) {
- Assertions.assertAll(
- () -> Assertions.assertTrue(new
Evaluator(schema.asStruct(), predicate)
- .eval(new SingleValueRow(row)), "a matching row
must survive pruning"),
- () -> Assertions.assertTrue(new
InclusiveMetricsEvaluator(schema, predicate).eval(file),
- "a file containing a matching row must survive
pruning"));
- }
+ public void castPredicatesRequireEngineEvaluation() {
+ IcebergConnectorMetadata metadata = new IcebergConnectorMetadata(new
RecordingIcebergCatalogOps(),
+ IcebergCatalogProperties.of(Collections.emptyMap()), new
RecordingConnectorContext());
+ // A DECIMAL-to-DOUBLE cast can equate distinct decimals. Reject it
before the engine's
+ // neutral converter loses the CAST; the connector cannot reconstruct
it from a bare column.
+ Assertions.assertFalse(metadata.supportsCastPredicatePushdown(null));
}
@Test
diff --git
a/fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorPushdownOps.java
b/fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorPushdownOps.java
index 4c6239ed686..dcfbf1e01dd 100644
---
a/fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorPushdownOps.java
+++
b/fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorPushdownOps.java
@@ -74,8 +74,8 @@ public interface ConnectorPushdownOps {
* by session configuration.</p>
*
* <p><b>Every shipped connector answers this deliberately; none of them
merely inherits.</b> jdbc, paimon,
- * maxcompute and the trino bridge return {@code false}; iceberg and
elasticsearch state {@code true} at
- * their own metadata class, each recording what it does with the
predicate and that {@code true} is an
+ * maxcompute, iceberg and the trino bridge return {@code false};
elasticsearch states {@code true} at
+ * its own metadata class, recording what it does with the predicate and
that {@code true} is an
* accepted risk rather than a safety claim. hive and hudi declare nothing
because for them the switch is
* INERT — their scan planning ignores the residual filter entirely, and
the predicate they do consume
* arrives on the {@link #applyFilter} path, which is never gated on this
method. A new connector should
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/datasource/scan/PluginDrivenScanNodeIcebergCastTest.java
b/fe/fe-core/src/test/java/org/apache/doris/datasource/scan/PluginDrivenScanNodeIcebergCastTest.java
new file mode 100644
index 00000000000..113c700a8cf
--- /dev/null
+++
b/fe/fe-core/src/test/java/org/apache/doris/datasource/scan/PluginDrivenScanNodeIcebergCastTest.java
@@ -0,0 +1,227 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you 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 org.apache.doris.datasource.scan;
+
+import org.apache.doris.analysis.CastExpr;
+import org.apache.doris.analysis.Expr;
+import org.apache.doris.analysis.SlotRef;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.FeConstants;
+import org.apache.doris.common.jmockit.Deencapsulation;
+import org.apache.doris.connector.iceberg.IcebergCatalogProperties;
+import org.apache.doris.connector.iceberg.IcebergConnectorMetadata;
+import org.apache.doris.connector.iceberg.IcebergPredicateConverter;
+import org.apache.doris.connector.iceberg.IcebergTableHandle;
+import org.apache.doris.connector.spi.pushdown.ConnectorColumnRef;
+import org.apache.doris.connector.spi.pushdown.ConnectorComparison;
+import org.apache.doris.connector.spi.pushdown.ConnectorExpression;
+import org.apache.doris.connector.spi.scan.ConnectorScanRequest;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.utframe.TestWithFeService;
+
+import org.apache.iceberg.DataFile;
+import org.apache.iceberg.DataFiles;
+import org.apache.iceberg.FileFormat;
+import org.apache.iceberg.Metrics;
+import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.StructLike;
+import org.apache.iceberg.expressions.Evaluator;
+import org.apache.iceberg.expressions.Expression;
+import org.apache.iceberg.expressions.Expressions;
+import org.apache.iceberg.expressions.InclusiveMetricsEvaluator;
+import org.apache.iceberg.types.Conversions;
+import org.apache.iceberg.types.Types;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
+import org.mockito.Mockito;
+
+import java.math.BigDecimal;
+import java.nio.ByteBuffer;
+import java.time.ZoneOffset;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+/** Exercises planned CAST predicates through the engine's filter gate and
actual Iceberg pruning. */
+public class PluginDrivenScanNodeIcebergCastTest extends TestWithFeService {
+ private static final Types.DecimalType DECIMAL = Types.DecimalType.of(38,
0);
+ private static final Schema SCHEMA = new Schema(
+ Types.NestedField.optional(1, "id", Types.IntegerType.get()),
+ Types.NestedField.optional(2, "wide", DECIMAL));
+
+ @Override
+ protected void runBeforeAll() throws Exception {
+ FeConstants.runningUnitTest = true;
+ createDatabase("iceberg_cast_test");
+ createTables("create table iceberg_cast_test.cast_predicates (id int,
wide decimal(38, 0))"
+ + " distributed by hash(id) properties('replication_num' =
'1')");
+ }
+
+ @ParameterizedTest
+ @CsvSource({"9007199254740993, 9007199254740992, false",
+ "9007199254740993, 9007199254740992, true",
+ "-9007199254740993, -9007199254740992, false",
+ "-9007199254740993, -9007199254740992, true"})
+ public void roundedDecimalEqualityKeepsMatchingRowsAndFiles(String
rowText, String literal, boolean reversed)
+ throws Exception {
+ BigDecimal row = new BigDecimal(rowText);
+ Assertions.assertEquals(Double.parseDouble(literal),
row.doubleValue());
+ String cast = "cast(wide as double)";
+ String constant = "cast(" + literal + " as double)";
+ String predicate = reversed ? constant + " = " + cast : cast + " = " +
constant;
+ List<Expr> conjuncts = planConjuncts(predicate);
+ assertDecimalToDoubleColumnCast(conjuncts);
+
+ ConnectorScanRequest request = scanRequest(conjuncts);
+
+ assertMatchingRowAndFileSurvive(request, row);
+ Assertions.assertTrue(request.getFilter().isEmpty());
+ Assertions.assertEquals(-1L, request.getLimit());
+ }
+
+ @Test
+ public void disjunctionContainingCastStaysWhole() throws Exception {
+ BigDecimal row = new BigDecimal("9007199254740993");
+ Assertions.assertEquals(9007199254740992d, row.doubleValue());
+ assertCastPredicateStaysLocal(
+ "cast(wide as double) = cast(9007199254740992 as double) or id
= 2", row);
+ }
+
+ @Test
+ public void negatedCastPredicateStaysLocal() throws Exception {
+ BigDecimal row = new BigDecimal("9007199254740995");
+ Assertions.assertNotEquals(9007199254740992d, row.doubleValue());
+ assertCastPredicateStaysLocal(
+ "not (cast(wide as double) = cast(9007199254740992 as
double))", row);
+ }
+
+ private void assertCastPredicateStaysLocal(String predicate, BigDecimal
matchingRow) throws Exception {
+ List<Expr> conjuncts = planConjuncts(predicate);
+ assertDecimalToDoubleColumnCast(conjuncts);
+ ConnectorScanRequest request = scanRequest(conjuncts);
+ Assertions.assertTrue(request.getFilter().isEmpty(), predicate);
+ Assertions.assertEquals(-1L, request.getLimit());
+ assertMatchingRowAndFileSurvive(request, matchingRow);
+ }
+
+ @Test
+ public void independentAndConjunctStillPrunesWithoutPushingLimit() throws
Exception {
+ List<Expr> conjuncts = planConjuncts(
+ "cast(wide as double) = cast(9007199254740992 as double) and
id = 1");
+ Assertions.assertEquals(2, conjuncts.size());
+ assertDecimalToDoubleColumnCast(conjuncts);
+
+ ConnectorScanRequest request = scanRequest(conjuncts);
+
+ ConnectorComparison pushed =
Assertions.assertInstanceOf(ConnectorComparison.class,
+ request.getFilter().orElseThrow());
+ Assertions.assertEquals("id", ((ConnectorColumnRef)
pushed.getLeft()).getColumnName());
+ Assertions.assertEquals(-1L, request.getLimit());
+ assertMatchingRowAndFileSurvive(request, new
BigDecimal("9007199254740993"));
+ }
+
+ @Test
+ public void plainPredicatesRemainPushable() throws Exception {
+ List<Expr> conjuncts = planConjuncts("id = 1");
+
Assertions.assertFalse(conjuncts.stream().anyMatch(PluginDrivenScanNode::containsCastExpr));
+
+ ConnectorScanRequest request = scanRequest(conjuncts);
+
+ Assertions.assertTrue(request.getFilter().isPresent());
+ Assertions.assertEquals(1L, request.getLimit());
+ assertMatchingRowAndFileSurvive(request, new
BigDecimal("9007199254740993"));
+ }
+
+ private static void assertDecimalToDoubleColumnCast(List<Expr> conjuncts) {
+ List<Expr> casts = new ArrayList<>();
+ for (Expr conjunct : conjuncts) {
+ conjunct.collect(node -> node instanceof CastExpr &&
node.getType().equals(Type.DOUBLE)
+ && node.getChild(0) instanceof SlotRef &&
node.getChild(0).getType().isDecimalV3(), casts);
+ }
+ Assertions.assertFalse(casts.isEmpty(), "the planned column comparison
must still contain its numeric CAST");
+ }
+
+ private List<Expr> planConjuncts(String predicate) throws Exception {
+ StmtExecutor executor = new StmtExecutor(connectContext,
+ "select * from iceberg_cast_test.cast_predicates where " +
predicate);
+ executor.execute();
+
Assertions.assertNotEquals(org.apache.doris.qe.QueryState.MysqlStateType.ERR,
+ connectContext.getState().getStateType(),
connectContext.getState().getErrorMessage());
+ return executor.planner().getScanNodes().get(0).getConjuncts();
+ }
+
+ private static ConnectorScanRequest scanRequest(List<Expr> conjuncts) {
+ List<Expr> before = Expr.cloneList(conjuncts);
+ PluginDrivenScanNode node = Mockito.mock(PluginDrivenScanNode.class,
Mockito.CALLS_REAL_METHODS);
+ IcebergConnectorMetadata metadata = new IcebergConnectorMetadata(
+ null, IcebergCatalogProperties.of(Collections.emptyMap()),
null);
+ Deencapsulation.setField(node, "cachedMetadata", metadata);
+ Deencapsulation.setField(node, "conjuncts", conjuncts);
+ Optional<ConnectorExpression> filter = Deencapsulation.invoke(node,
"buildRemainingFilter");
+ List<Integer> indexMapping = Deencapsulation.getField(node,
"filteredToOriginalIndex");
+ Assertions.assertEquals(before, conjuncts, "original predicates must
remain for Doris to evaluate");
+ return ConnectorScanRequest.builder(new
IcebergTableHandle("iceberg_cast_test", "cast_predicates"),
+ Collections.emptyList()).filter(filter)
+ .limit(PluginDrivenScanNode.effectiveSourceLimit(1L,
indexMapping != null)).build();
+ }
+
+ private static void assertMatchingRowAndFileSurvive(ConnectorScanRequest
request, BigDecimal value) {
+ Expression filter = Expressions.alwaysTrue();
+ for (Expression predicate : request.getFilter().map(expression ->
+ new IcebergPredicateConverter(SCHEMA,
ZoneOffset.UTC).convert(expression))
+ .orElse(Collections.emptyList())) {
+ filter = Expressions.and(filter, predicate);
+ }
+ Map<Integer, ByteBuffer> bounds = Map.of(
+ 1, Conversions.toByteBuffer(Types.IntegerType.get(), 1),
+ 2, Conversions.toByteBuffer(DECIMAL, value));
+ Metrics metrics = new Metrics(1L, null, Map.of(1, 1L, 2, 1L),
+ Map.of(1, 0L, 2, 0L), null, bounds, bounds);
+ DataFile file = DataFiles.builder(PartitionSpec.unpartitioned())
+
.withPath("data/decimal-double.parquet").withFormat(FileFormat.PARQUET)
+ .withFileSizeInBytes(1024L).withMetrics(metrics).build();
+ Object[] values = {1, value};
+ StructLike row = new StructLike() {
+ @Override
+ public int size() {
+ return values.length;
+ }
+
+ @Override
+ public <T> T get(int position, Class<T> javaClass) {
+ return javaClass.cast(values[position]);
+ }
+
+ @Override
+ public <T> void set(int position, T newValue) {
+ throw new UnsupportedOperationException();
+ }
+ };
+ Expression pruningFilter = filter;
+ Assertions.assertAll(
+ () -> Assertions.assertTrue(new Evaluator(SCHEMA.asStruct(),
pruningFilter).eval(row),
+ "a matching row must survive pruning"),
+ () -> Assertions.assertTrue(new
InclusiveMetricsEvaluator(SCHEMA, pruningFilter).eval(file),
+ "a file containing a matching row must survive
pruning"));
+ }
+}
diff --git
a/regression-test/suites/external_table_p0/iceberg/ICEBERG_CAPABILITY_TEST_COVERAGE.md
b/regression-test/suites/external_table_p0/iceberg/ICEBERG_CAPABILITY_TEST_COVERAGE.md
index 15c952f8a8d..3cd826c579b 100644
---
a/regression-test/suites/external_table_p0/iceberg/ICEBERG_CAPABILITY_TEST_COVERAGE.md
+++
b/regression-test/suites/external_table_p0/iceberg/ICEBERG_CAPABILITY_TEST_COVERAGE.md
@@ -121,7 +121,7 @@ is absent. Evidence on those rows is related
routing/contract coverage, not succ
| Branch versus tag/snapshot schema |
`test_iceberg_schema_dual_relation_matrix.groovy`,
`test_iceberg_schema_ref_actions_matrix.groovy` | New unit puts branch and tag
at the same old snapshot after schema-only evolution; tests explicit snapshot
after rollback. |
| V3 row lineage | `test_iceberg_v3_row_lineage_uniqueness_stability.groovy`,
`test_iceberg_v3_row_lineage_schema_evolution.groovy`,
`action/test_iceberg_v3_row_lineage_rewrite_data_files.groovy` | New V2-to-V3
schema-only transition and ADD/RENAME reserved-name atomicity checks. Overflow
and mixed inherited/physical lineage remain partial. |
| File metadata and TopN | `test_iceberg_file_metadata_columns.groovy` | New
`test_iceberg_file_metadata_delete_history.groovy` checks physical position
holes after deletes, partition predicates, historical refs and
eager/TopN-setting parity. |
-| Boolean/integer/long/float/double | `IcebergTypeMappingReadTest`,
`test_iceberg_float_predicate_pushdown.groovy` | New evaluator oracles test
integer narrowing and long limits in SCAN/CONFLICT/REWRITE modes. A separate
disabled reproduction preserves the DECIMAL-to-DOUBLE cast pruning invariant. |
+| Boolean/integer/long/float/double | `IcebergTypeMappingReadTest`,
`test_iceberg_float_predicate_pushdown.groovy` | New evaluator oracles test
integer narrowing and long limits in SCAN/CONFLICT/REWRITE modes.
`PluginDrivenScanNodeIcebergCastTest` checks planned DECIMAL-to-DOUBLE
predicates, row/file retention, Boolean composition and residual LIMIT handling
before CAST information is lost. |
| Decimal precision/scale | `write/test_iceberg_write_decimal_bounds.groovy`,
`IcebergPredicateConverterTest` | New precision 1/9/18/28/38 roundtrips and
exact 38-digit comparison oracle. Manifest bound encoding needs separate
reader/writer tests. |
| Dates, micro/nanoseconds, timestamp zones |
`test_iceberg_timestamp_tz.groovy`, `test_iceberg_timestamp_ns.groovy`,
`write/test_iceberg_write_timestamp_partitions.groovy` | New
negative-epoch/leap-century partition range oracle uses SDK transforms; DST
overlap/gap filtering still needs managed execution. |
| Binary/fixed/UUID | `test_iceberg_uuid_binary_compatibility.groovy`,
`test_iceberg_varbinary.groovy`,
`write/test_iceberg_write_binary_partitions.groovy` | New compound partition
JSON covers binary values; fixed/binary serialization preserves
direct/read-only buffer positions. |
diff --git
a/regression-test/suites/external_table_p0/iceberg/test_iceberg_predicate_conversion.groovy
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_predicate_conversion.groovy
index 1c65c7fd134..e5a35a72d81 100644
---
a/regression-test/suites/external_table_p0/iceberg/test_iceberg_predicate_conversion.groovy
+++
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_predicate_conversion.groovy
@@ -50,7 +50,12 @@ suite("test_iceberg_predicate_conversion", "p0,external") {
order_qt_q01 """${sqlstr}"""
explain {
sql("""${sqlstr}""")
- contains """ref(name="glue_varchar") > "2023-03-07 00:00:00"""
+ // Comparing STRING to DATE casts the column. A lexical file
filter would lose that cast.
+ notContains 'ref(name="glue_varchar")'
+ }
+ explain {
+ sql("select glue_varchar from tb_predict where glue_varchar >
'2023-03-07'")
+ contains 'ref(name="glue_varchar") > "2023-03-07"'
}
sqlstr = """select l_shipdate from tb_predict where l_shipdate in
("1997-05-18", "1996-05-06"); """
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]