This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new a208b2d58 [spark] Add unit tests for spark SHOW TABLES command (#2304)
a208b2d58 is described below

commit a208b2d586574a080b2f8a0e8ed23738a3cc5ffd
Author: Yang Zhang <[email protected]>
AuthorDate: Tue Jan 6 00:27:02 2026 +0800

    [spark] Add unit tests for spark SHOW TABLES command (#2304)
---
 .../org/apache/fluss/spark/FlussCatalogTest.scala  | 34 ++++++++++++++++++++++
 .../apache/fluss/spark/FlussSparkTestBase.scala    |  6 ----
 2 files changed, 34 insertions(+), 6 deletions(-)

diff --git 
a/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussCatalogTest.scala
 
b/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussCatalogTest.scala
index a9022fff4..b30fc1e6c 100644
--- 
a/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussCatalogTest.scala
+++ 
b/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussCatalogTest.scala
@@ -82,6 +82,40 @@ class FlussCatalogTest extends FlussSparkTestBase {
     checkAnswer(sql("SHOW TABLES"), Nil)
   }
 
+  test("Catalog: show tables") {
+    withTable("test_tbl", "test_tbl1", "tbl_a") {
+      sql(s"CREATE TABLE $DEFAULT_DATABASE.test_tbl (id int, name string) 
COMMENT 'my test table'")
+      sql(
+        s"CREATE TABLE $DEFAULT_DATABASE.test_tbl1 (id int, name string) 
COMMENT 'my test table1'")
+      sql(s"CREATE TABLE $DEFAULT_DATABASE.tbl_a (id int, name string) COMMENT 
'my table a'")
+
+      checkAnswer(
+        sql("SHOW TABLES"),
+        Row("fluss", "test_tbl", false) :: Row("fluss", "test_tbl1", false) :: 
Row(
+          "fluss",
+          "tbl_a",
+          false) :: Nil)
+
+      checkAnswer(
+        sql(s"SHOW TABLES in $DEFAULT_DATABASE"),
+        Row("fluss", "test_tbl", false) :: Row("fluss", "test_tbl1", false) :: 
Row(
+          "fluss",
+          "tbl_a",
+          false) :: Nil)
+
+      checkAnswer(
+        sql(s"SHOW TABLES from $DEFAULT_DATABASE"),
+        Row("fluss", "test_tbl", false) :: Row("fluss", "test_tbl1", false) :: 
Row(
+          "fluss",
+          "tbl_a",
+          false) :: Nil)
+
+      checkAnswer(
+        sql(s"SHOW TABLES from $DEFAULT_DATABASE like 'test_*'"),
+        Row("fluss", "test_tbl", false) :: Row("fluss", "test_tbl1", false) :: 
Nil)
+    }
+  }
+
   test("Catalog: primary-key table") {
     sql(s"""
            |CREATE TABLE $DEFAULT_DATABASE.test_tbl (id int, name string, pt 
string)
diff --git 
a/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussSparkTestBase.scala
 
b/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussSparkTestBase.scala
index 2a5135ab8..9f6d4e763 100644
--- 
a/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussSparkTestBase.scala
+++ 
b/fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/FlussSparkTestBase.scala
@@ -61,12 +61,6 @@ class FlussSparkTestBase extends QueryTest with 
SharedSparkSession {
     sql(s"USE $DEFAULT_DATABASE")
   }
 
-  override def test(testName: String, testTags: Tag*)(testFun: => Any)(implicit
-      pos: Position): Unit = {
-    println(testName)
-    super.test(testName, testTags: _*)(testFun)(pos)
-  }
-
   def createTablePath(tableName: String): TablePath = {
     TablePath.of(DEFAULT_DATABASE, tableName)
   }

Reply via email to