nikolamand-db commented on code in PR #45739:
URL: https://github.com/apache/spark/pull/45739#discussion_r1557841990
##########
sql/core/src/test/scala/org/apache/spark/sql/TPCDSBase.scala:
##########
@@ -34,7 +34,7 @@ trait TPCDSBase extends TPCBase with TPCDSSchema {
"q81", "q82", "q83", "q84", "q85", "q86", "q87", "q88", "q89", "q90",
"q91", "q92", "q93", "q94", "q95", "q96", "q97", "q98", "q99")
- protected val excludedTpcdsQueries: Set[String] = if (regenerateGoldenFiles)
{
+ protected def excludedTpcdsQueries: Set[String] = if (regenerateGoldenFiles)
{
Review Comment:
I've replaced `val` with `def` because in the override definition we refer
to super instance (this wouldn't compile if we used `val`):
https://github.com/apache/spark/blob/50f8d7957527b3f60c96db23a6ca2db019593df3/sql/core/src/test/scala/org/apache/spark/sql/TPCDSCollationQueryTestSuite.scala#L238
The loop which runs on `tpcdsAllQueries` and calls the def has ~100 iterations
so this shouldn't have significant impact on the performance.
##########
sql/core/src/test/scala/org/apache/spark/sql/TPCDSCollationQueryTestSuite.scala:
##########
@@ -0,0 +1,270 @@
+/*
+ * 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
+
+import java.nio.file.{Files, Paths}
+import java.util.Locale
+
+import org.apache.spark.{SparkConf, SparkContext}
+import org.apache.spark.sql.catalyst.util.resourceToString
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.test.TestSparkSession
+import org.apache.spark.tags.ExtendedSQLTest
+import org.apache.spark.util.Utils
+
+/**
+ * End-to-end tests to validate TPC-DS query results against collation-aware
+ * modified data and queries.
+ *
+ * For each collation, table schemas are replicated into two databases in such
way that in first
+ * DB all table columns are collated with specified collation, while the
second DB collates table
+ * columns with case-insensitive version of the collation. Tables from first
DB are then populated
+ * with lowercase-converted data from tpc-ds kit and tables from second DB are
populated with
+ * randomized-case data.
+ *
+ * When running arbitrary SQL query, we convert the query to lowercase for
execution
Review Comment:
Added clarification to the comment, please check.
--
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]