JingsongLi commented on code in PR #8089:
URL: https://github.com/apache/paimon/pull/8089#discussion_r3345308120


##########
paimon-spark/paimon-spark-3.2/src/test/scala/org/apache/paimon/spark/PaimonScanBuilderTest.scala:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.paimon.spark
+
+/** Tests for [[PaimonScanBuilder]] in spark-3.2 module. */
+class PaimonScanBuilderTest extends PaimonSparkTestBase {
+
+  test("PaimonScanBuilder: read vector table normally on spark-3.2") {
+    withTable("T") {
+      spark.sql("""
+                  |CREATE TABLE T (id BIGINT, embs ARRAY<FLOAT>)
+                  |TBLPROPERTIES (
+                  |  'vector.file.format' = 'lance',
+                  |  'vector-field' = 'embs',
+                  |  'field.embs.vector-dim' = '3',
+                  |  'row-tracking.enabled' = 'true',
+                  |  'data-evolution.enabled' = 'true'
+                  |)
+                  |""".stripMargin)
+
+      val rows = spark.sql("SELECT id, embs FROM T ORDER BY id")

Review Comment:
   Could we make this test go through the table-valued-function path? A plain 
`SELECT id, embs FROM T` builds the scan from the normal `FileStoreTable`, so 
it does not exercise the `VectorSearchTable` / `FullTextSearchTable` branch 
added in `PaimonScanBuilder`. I verified this by locally reverting the builder 
to the previous implementation: this test still passed. Using 
`vector_search(...)` (and ideally a `full_text_search(...)` case too, since the 
patch handles both wrappers) would cover the actual regression.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to