This is an automated email from the ASF dual-hosted git repository. sunchao pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/arrow-datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push: new f359ed7 feat: Add license header by spotless:apply automatically (#110) f359ed7 is described below commit f359ed79a3dc710fadbc0484944f280c55c181e1 Author: advancedxy <xian...@apache.org> AuthorDate: Tue Feb 27 01:47:02 2024 +0800 feat: Add license header by spotless:apply automatically (#110) --- dev/copyright/java-header.txt | 19 ++++++++++++++++ dev/copyright/scala-header.txt | 1 + pom.xml | 6 +++++ .../org/apache/spark/sql/comet/CometPlan.scala | 26 ++++++++++++---------- .../src/test/scala/org/apache/spark/sql/TPCH.scala | 10 ++++----- .../test/scala/org/apache/spark/sql/Tables.scala | 13 +++++------ .../spark/sql/comet/CometPlanStabilitySuite.scala | 1 + 7 files changed, 52 insertions(+), 24 deletions(-) diff --git a/dev/copyright/java-header.txt b/dev/copyright/java-header.txt new file mode 100644 index 0000000..bd244d0 --- /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 0000000..372bb40 --- /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 5a96eae..d7cd076 100644 --- a/pom.xml +++ b/pom.xml @@ -723,6 +723,9 @@ under the License. <importOrder> <order>java|javax,scala,org,org.apache,com,org.apache.comet,\#,\#org.apache.comet</order> </importOrder> + <licenseHeader> + <file>${maven.multiModuleProjectDirectory}/dev/copyright/java-header.txt</file> + </licenseHeader> </java> <scala> <toggleOffOn /> @@ -730,6 +733,9 @@ under the License. <version>3.6.1</version> <file>${maven.multiModuleProjectDirectory}/scalafmt.conf</file> </scalafmt> + <licenseHeader> + <file>${maven.multiModuleProjectDirectory}/dev/copyright/scala-header.txt</file> + </licenseHeader> </scala> </configuration> </plugin> 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 fe2ce7e..e5d268c 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 31e5cf7..721b01d 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 138238d..99b9e14 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 ddd7d8d..48969ea 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