stanyao commented on code in PR #54972: URL: https://github.com/apache/spark/pull/54972#discussion_r3121073632
########## sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2TableSampleSuite.scala: ########## @@ -0,0 +1,98 @@ +/* + * 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.spark.sql.connector + +import org.apache.spark.sql.connector.catalog.InMemoryTableWithTableSampleCatalog + +class DataSourceV2TableSampleSuite extends DatasourceV2SQLBase Review Comment: I assume by "pushed systemtable EXPLAIN", you meant validating when a system sample is pushed down, the explain plan will include expected sample information like "SYSTEM" and "BERNOULLI" and their parameters. To simplify, I added that coverage in the following existing test cases: - test("SPARK-55978: TABLESAMPLE SYSTEM pushdown removes Sample node") - test("SPARK-55978: TABLESAMPLE BERNOULLI pushdown removes Sample node") Added more test cases below for the other error case related comment above: - non-pushdown DSv2 catalog => UNSUPPORTED_FEATURE.TABLESAMPLE_SYSTEM - subquery => UNSUPPORTED_FEATURE.TABLESAMPLE_SYSTEM_NO_SCAN - DSv1 parquet table => UNSUPPORTED_FEATURE.TABLESAMPLE_SYSTEM_NO_SCAN -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
