From b9afb4c006174fa4ca7a0a61cafaab39ce7b4261 Mon Sep 17 00:00:00 2001 From: Jingsong Date: Mon, 18 Nov 2024 21:16:49 +0800 Subject: [PATCH] fix --- .../org/apache/paimon/table/source/StreamDataTableScan.java | 6 ------ .../org/apache/paimon/spark/sources/StreamHelper.scala | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/paimon-core/src/main/java/org/apache/paimon/table/source/StreamDataTableScan.java b/paimon-core/src/main/java/org/apache/paimon/table/source/StreamDataTableScan.java index 07c9cd446bed..f5e6e3a0aa15 100644 --- a/paimon-core/src/main/java/org/apache/paimon/table/source/StreamDataTableScan.java +++ b/paimon-core/src/main/java/org/apache/paimon/table/source/StreamDataTableScan.java @@ -29,10 +29,4 @@ public interface StreamDataTableScan extends DataTableScan, StreamTableScan { /** Restore from checkpoint next snapshot id with scan kind. */ void restore(@Nullable Long nextSnapshotId, boolean scanAllSnapshot); - - @Override - default StreamDataTableScan dropStats() { - // do nothing, should implement this if need - return this; - } } diff --git a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/sources/StreamHelper.scala b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/sources/StreamHelper.scala index e7335c6482ac..7e61d71ac183 100644 --- a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/sources/StreamHelper.scala +++ b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/sources/StreamHelper.scala @@ -44,7 +44,8 @@ private[spark] trait StreamHelper { var lastTriggerMillis: Long - private lazy val streamScan: StreamDataTableScan = table.newStreamScan().dropStats() + private lazy val streamScan: StreamDataTableScan = + table.newStreamScan().dropStats().asInstanceOf[StreamDataTableScan] private lazy val partitionSchema: StructType = SparkTypeUtils.fromPaimonRowType(TypeUtils.project(table.rowType(), table.partitionKeys()))