Skip to content

Commit 113ca9d

Browse files
[spark] Support parser of Spark call procedure command
1 parent 4871a1a commit 113ca9d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/procedure/CompactProcedure.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package org.apache.fluss.spark.procedure
2020
import org.apache.spark.sql.catalyst.InternalRow
2121
import org.apache.spark.sql.connector.catalog.TableCatalog
2222
import org.apache.spark.sql.types.{DataTypes, Metadata, StructField, StructType}
23-
import org.apache.spark.unsafe.types.UTF8String
2423

2524
class CompactProcedure(tableCatalog: TableCatalog) extends BaseProcedure(tableCatalog) {
2625

@@ -35,11 +34,13 @@ class CompactProcedure(tableCatalog: TableCatalog) extends BaseProcedure(tableCa
3534
override def call(args: InternalRow): Array[InternalRow] = {
3635
val tableIdent = toIdentifier(args.getString(0), CompactProcedure.PARAMETERS(0).name)
3736
val sparkTable = loadSparkTable(tableIdent)
38-
37+
// TODO: Implement compact procedure logic:
38+
// 1. Get FlussTable from sparkTable and validate it supports compaction
39+
// 2. Trigger compaction via Fluss Admin API for the specified table
40+
// 3. Return the compaction result status as InternalRow
3941
val tablePath = toTablePath(tableIdent)
4042
throw new UnsupportedOperationException(
41-
s"Compact procedure for table $tablePath is not yet supported. " +
42-
"See https://github.com/apache/fluss/issues/2406 for more details."
43+
s"Compact procedure for table $tablePath is not yet supported. "
4344
)
4445
}
4546

0 commit comments

Comments
 (0)