comphead commented on code in PR #6495: URL: https://github.com/apache/datafusion-comet/pull/6495#discussion_r4488344458
########## spark/src/test/spark-4.0/org/apache/spark/sql/CometHashJoinCollationSuite.scala: ########## @@ -0,0 +1,147 @@ +/* + * 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 org.apache.spark.sql.catalyst.expressions.AttributeReference +import org.apache.spark.sql.catalyst.optimizer.{BuildLeft, BuildRight} +import org.apache.spark.sql.catalyst.plans.Inner +import org.apache.spark.sql.comet.{CometBroadcastHashJoinExec, CometHashJoinExec} +import org.apache.spark.sql.execution.{LocalTableScanExec, SparkPlan} +import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, ShuffledHashJoinExec} +import org.apache.spark.sql.types.StringType + +import org.apache.comet.{CometConf, CometExplainInfo} +import org.apache.comet.serde.OperatorOuterClass + +// Spark 4.1 and later normalize hash join keys with CollationKey before constructing the +// physical join, so its converters receive BinaryType keys instead of collated strings. +// These tests exercise the Spark 4.0 path, where the converters see the original collation. Review Comment: When you name where the normalization happens (as suggested above), could you also give the first release? In the Spark sources I have locally, `HashJoin.normalizeJoinKeys` is absent from `v4.1.0` and `v4.1.1` and present from `v4.1.2` (SPARK-54852) and `v4.2.0`. It is also absent from `v4.0.5`. So "Spark 4.1 and later" is only true from 4.1.2. Comet builds against 4.1.3 so this does not change what runs, but the comment would then be checkable and would say why this suite cannot move to `spark-4.x`. I have not run anything against 4.1.0 or 4.1.1. -- 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]
