From 60e76cc5746f494107349952efcef9997d32e073 Mon Sep 17 00:00:00 2001 From: Paul Lin Date: Mon, 4 Dec 2023 17:13:09 +0800 Subject: [PATCH] [FLINK] Replace scala bounded reflection utils with the common ones --- .../flink/result/IncrementalResultFetchIterator.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/result/IncrementalResultFetchIterator.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/result/IncrementalResultFetchIterator.scala index 30b4f1ce379..22b17cd69e2 100644 --- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/result/IncrementalResultFetchIterator.scala +++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/result/IncrementalResultFetchIterator.scala @@ -36,7 +36,7 @@ import org.apache.flink.types.Row import org.apache.kyuubi.Logging import org.apache.kyuubi.engine.flink.shim.FlinkResultSet import org.apache.kyuubi.operation.FetchIterator -import org.apache.kyuubi.util.reflect.ReflectUtils.getField +import org.apache.kyuubi.util.reflect.DynFields class IncrementalResultFetchIterator( resultFetcher: ResultFetcher, @@ -59,7 +59,10 @@ class IncrementalResultFetchIterator( val FETCH_INTERVAL_MS: Long = 1000 - val isQueryResult: Boolean = getField(resultFetcher, "isQueryResult") + val isQueryResult: Boolean = + DynFields.builder + .hiddenImpl(classOf[ResultFetcher], "isQueryResult") + .build[Boolean](resultFetcher).get() val effectiveMaxRows: Int = if (isQueryResult) maxRows else Int.MaxValue