Skip to content

Commit

Permalink
feat: Add license header by spotless:apply automatically (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
advancedxy authored Feb 26, 2024
1 parent a2b1f9b commit f359ed7
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 24 deletions.
19 changes: 19 additions & 0 deletions dev/copyright/java-header.txt
Original file line number Diff line number Diff line change
@@ -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.
*/

1 change: 1 addition & 0 deletions dev/copyright/scala-header.txt
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,19 @@ 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 />
<scalafmt>
<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>
Expand Down
26 changes: 14 additions & 12 deletions spark/src/main/scala/org/apache/spark/sql/comet/CometPlan.scala
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions spark/src/test/scala/org/apache/spark/sql/TPCH.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
* 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
*
* 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"

Expand Down
13 changes: 6 additions & 7 deletions spark/src/test/scala/org/apache/spark/sql/Tables.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.spark.sql.comet

import java.io.File
Expand Down

0 comments on commit f359ed7

Please sign in to comment.