diff --git a/dev/copyright/java-header.txt b/dev/copyright/java-header.txt new file mode 100644 index 000000000..bd244d07a --- /dev/null +++ b/dev/copyright/java-header.txt @@ -0,0 +1,19 @@ +/* + * 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. + */ + diff --git a/dev/copyright/scala-header.txt b/dev/copyright/scala-header.txt new file mode 120000 index 000000000..372bb407f --- /dev/null +++ b/dev/copyright/scala-header.txt @@ -0,0 +1 @@ +java-header.txt \ No newline at end of file diff --git a/pom.xml b/pom.xml index e46a49ab3..9b46b8fc4 100644 --- a/pom.xml +++ b/pom.xml @@ -722,6 +722,9 @@ under the License. java|javax,scala,org,org.apache,com,org.apache.comet,\#,\#org.apache.comet + + ${maven.multiModuleProjectDirectory}/dev/copyright/java-header.txt + @@ -729,6 +732,9 @@ under the License. 3.6.1 ${maven.multiModuleProjectDirectory}/scalafmt.conf + + ${maven.multiModuleProjectDirectory}/dev/copyright/scala-header.txt + diff --git a/spark/src/main/scala/org/apache/spark/sql/comet/CometPlan.scala b/spark/src/main/scala/org/apache/spark/sql/comet/CometPlan.scala index fe2ce7ed0..e5d268cd9 100644 --- a/spark/src/main/scala/org/apache/spark/sql/comet/CometPlan.scala +++ b/spark/src/main/scala/org/apache/spark/sql/comet/CometPlan.scala @@ -1,18 +1,20 @@ /* - * 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 + * 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 + * 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. + * 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.comet diff --git a/spark/src/test/scala/org/apache/spark/sql/TPCH.scala b/spark/src/test/scala/org/apache/spark/sql/TPCH.scala index 31e5cf798..721b01d64 100644 --- a/spark/src/test/scala/org/apache/spark/sql/TPCH.scala +++ b/spark/src/test/scala/org/apache/spark/sql/TPCH.scala @@ -17,6 +17,11 @@ * under the License. */ +package org.apache.spark.sql + +import org.apache.spark.SparkContext +import org.apache.spark.rdd.RDD + /** * Mostly copied from * https://github.com/databricks/spark-sql-perf/blob/master/src/main/scala/com/databricks/spark/sql/perf/tpch/TPCH.scala @@ -24,11 +29,6 @@ * TODO: port this back to the upstream Spark similar to TPCDS benchmark */ -package org.apache.spark.sql - -import org.apache.spark.SparkContext -import org.apache.spark.rdd.RDD - class Dbgen(dbgenDir: String, params: Seq[String]) extends DataGenerator { val dbgen: String = s"$dbgenDir/dbgen" diff --git a/spark/src/test/scala/org/apache/spark/sql/Tables.scala b/spark/src/test/scala/org/apache/spark/sql/Tables.scala index 138238da8..99b9e149a 100644 --- a/spark/src/test/scala/org/apache/spark/sql/Tables.scala +++ b/spark/src/test/scala/org/apache/spark/sql/Tables.scala @@ -17,13 +17,6 @@ * under the License. */ -/** - * Mostly copied from - * https://github.com/databricks/spark-sql-perf/blob/master/src/main/scala/com/databricks/spark/sql/perf/Tables.scala - * - * TODO: port this back to the upstream Spark similar to TPCDS benchmark - */ - package org.apache.spark.sql import scala.util.Try @@ -35,6 +28,12 @@ import org.apache.spark.rdd.RDD import org.apache.spark.sql.functions._ import org.apache.spark.sql.types._ +/** + * Mostly copied from + * https://github.com/databricks/spark-sql-perf/blob/master/src/main/scala/com/databricks/spark/sql/perf/Tables.scala + * + * TODO: port this back to the upstream Spark similar to TPCDS benchmark + */ trait DataGenerator extends Serializable { def generate( sparkContext: SparkContext, diff --git a/spark/src/test/scala/org/apache/spark/sql/comet/CometPlanStabilitySuite.scala b/spark/src/test/scala/org/apache/spark/sql/comet/CometPlanStabilitySuite.scala index ddd7d8d7e..48969ea41 100644 --- a/spark/src/test/scala/org/apache/spark/sql/comet/CometPlanStabilitySuite.scala +++ b/spark/src/test/scala/org/apache/spark/sql/comet/CometPlanStabilitySuite.scala @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.apache.spark.sql.comet import java.io.File