Apache DataFusion SQL Query Engine
Fix license header (#12008)
Ruihang Xiaddee4717af08
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex 19af21ec91..cf204b2cd6 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -23,18 +23,12 @@ concurrency:cancel-in-progress: truejobs:- rat:- name: Release Audit Tool (RAT)+ license-header-check:runs-on: ubuntu-latest+ name: Check License Headersteps:- - name: Checkout- uses: actions/checkout@v4- - name: Setup Python- uses: actions/setup-python@v5- with:- python-version: "3.10"- - name: Audit licenses- run: ./dev/release/run-rat.sh .+ - uses: actions/checkout@v4+ - uses: korandoru/hawkeye@v5prettier:name: Use prettier to check formatting of documentsdiff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex 39b7b2b178..50bebc5b40 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -39,6 +39,14 @@ on:workflow_dispatch:jobs:+ # Check license header+ license-header-check:+ runs-on: ubuntu-20.04+ name: Check License Header+ steps:+ - uses: actions/checkout@v4+ - uses: korandoru/hawkeye@v5+# Check crate compileslinux-build-lib:name: cargo checkdiff --git a/benchmarks/compare.py b/benchmarks/compare.pyindex 2574c0735c..4b609c744d 100755--- a/benchmarks/compare.py+++ b/benchmarks/compare.py@@ -1,21 +1,20 @@#!/usr/bin/env python+# 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.from __future__ import annotationsdiff --git a/datafusion/common-runtime/src/lib.rs b/datafusion/common-runtime/src/lib.rsindex 8145bb1104..51cb988ea0 100644--- a/datafusion/common-runtime/src/lib.rs+++ b/datafusion/common-runtime/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/common/src/lib.rs b/datafusion/common/src/lib.rsindex 618e88fb83..77e8cd60ed 100644--- a/datafusion/common/src/lib.rs+++ b/datafusion/common/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rsindex 63d4fbc0bb..9d1574f515 100644--- a/datafusion/core/src/lib.rs+++ b/datafusion/core/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+#![warn(missing_docs, clippy::needless_borrow)]//! [DataFusion] is an extensible query engine written in Rust thatdiff --git a/datafusion/core/src/physical_optimizer/sanity_checker.rs b/datafusion/core/src/physical_optimizer/sanity_checker.rsindex 4d2baf1fe1..01d3cd1aab 100644--- a/datafusion/core/src/physical_optimizer/sanity_checker.rs+++ b/datafusion/core/src/physical_optimizer/sanity_checker.rs@@ -6,7 +6,7 @@// "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 andiff --git a/datafusion/core/src/test/object_store.rs b/datafusion/core/src/test/object_store.rsindex 6c0a2fc7be..cac430c5b4 100644--- a/datafusion/core/src/test/object_store.rs+++ b/datafusion/core/src/test/object_store.rs@@ -14,7 +14,9 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+//! Object store implementation used for testing+use crate::execution::context::SessionState;use crate::execution::session_state::SessionStateBuilder;use crate::prelude::SessionContext;diff --git a/datafusion/core/tests/fuzz_cases/equivalence/utils.rs b/datafusion/core/tests/fuzz_cases/equivalence/utils.rsindex 921332bca5..262f68079f 100644--- a/datafusion/core/tests/fuzz_cases/equivalence/utils.rs+++ b/datafusion/core/tests/fuzz_cases/equivalence/utils.rs@@ -14,7 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.-//+use datafusion::physical_plan::expressions::col;use datafusion::physical_plan::expressions::Column;use datafusion_physical_expr::{ConstExpr, EquivalenceProperties, PhysicalSortExpr};diff --git a/datafusion/core/tests/macro_hygiene/mod.rs b/datafusion/core/tests/macro_hygiene/mod.rsindex c35e46c0c5..62f24f5198 100644--- a/datafusion/core/tests/macro_hygiene/mod.rs+++ b/datafusion/core/tests/macro_hygiene/mod.rs@@ -14,9 +14,11 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+//! Verifies [Macro Hygene]//!//! [Macro Hygene]: https://en.wikipedia.org/wiki/Hygienic_macro+mod plan_err {// NO other imports!use datafusion_common::plan_err;diff --git a/datafusion/execution/src/lib.rs b/datafusion/execution/src/lib.rsindex 909364fa80..317bd3203a 100644--- a/datafusion/execution/src/lib.rs+++ b/datafusion/execution/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/expr/src/lib.rs b/datafusion/expr/src/lib.rsindex 849d960480..701b276853 100644--- a/datafusion/expr/src/lib.rs+++ b/datafusion/expr/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/expr/src/logical_plan/display.rs b/datafusion/expr/src/logical_plan/display.rsindex 9aea7747c4..84efd85419 100644--- a/datafusion/expr/src/logical_plan/display.rs+++ b/datafusion/expr/src/logical_plan/display.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+//! This module provides logic for displaying LogicalPlans in various stylesuse std::collections::HashMap;diff --git a/datafusion/ffi/src/lib.rs b/datafusion/ffi/src/lib.rsindex 4a74e65dc6..8e09780edf 100644--- a/datafusion/ffi/src/lib.rs+++ b/datafusion/ffi/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/functions-aggregate-common/src/tdigest.rs b/datafusion/functions-aggregate-common/src/tdigest.rsindex 786d7ea3e3..13e40a2b99 100644--- a/datafusion/functions-aggregate-common/src/tdigest.rs+++ b/datafusion/functions-aggregate-common/src/tdigest.rs@@ -1,17 +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+// 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.+// 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.//! An implementation of the [TDigest sketch algorithm] providing approximate//! quantile calculations.diff --git a/datafusion/functions-aggregate/src/lib.rs b/datafusion/functions-aggregate/src/lib.rsindex ca0276d326..746873442d 100644--- a/datafusion/functions-aggregate/src/lib.rs+++ b/datafusion/functions-aggregate/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/functions-aggregate/src/min_max.rs b/datafusion/functions-aggregate/src/min_max.rsindex b4256508e3..b497953bc5 100644--- a/datafusion/functions-aggregate/src/min_max.rs+++ b/datafusion/functions-aggregate/src/min_max.rs@@ -2,6 +2,7 @@// 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//diff --git a/datafusion/functions-aggregate/src/min_max/min_max_bytes.rs b/datafusion/functions-aggregate/src/min_max/min_max_bytes.rsindex a09d616ec8..25499c2521 100644--- a/datafusion/functions-aggregate/src/min_max/min_max_bytes.rs+++ b/datafusion/functions-aggregate/src/min_max/min_max_bytes.rs@@ -2,6 +2,7 @@// 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//diff --git a/datafusion/functions-nested/src/lib.rs b/datafusion/functions-nested/src/lib.rsindex 301ddb36fc..c47e4a696a 100644--- a/datafusion/functions-nested/src/lib.rs+++ b/datafusion/functions-nested/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/functions/src/lib.rs b/datafusion/functions/src/lib.rsindex 91f9449953..7278fe3ec5 100644--- a/datafusion/functions/src/lib.rs+++ b/datafusion/functions/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/optimizer/src/lib.rs b/datafusion/optimizer/src/lib.rsindex f310838311..263770b81f 100644--- a/datafusion/optimizer/src/lib.rs+++ b/datafusion/optimizer/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/optimizer/src/push_down_filter.rs b/datafusion/optimizer/src/push_down_filter.rsindex acb7ba0fa7..23cd46803c 100644--- a/datafusion/optimizer/src/push_down_filter.rs+++ b/datafusion/optimizer/src/push_down_filter.rs@@ -1,3 +1,6 @@+// 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 compliancediff --git a/datafusion/physical-expr-common/src/datum.rs b/datafusion/physical-expr-common/src/datum.rsindex c47ec9d75d..233deff758 100644--- a/datafusion/physical-expr-common/src/datum.rs+++ b/datafusion/physical-expr-common/src/datum.rs@@ -8,7 +8,7 @@//// http://www.apache.org/licenses/LICENSE-2.0//-// UnLt required by applicable law or agreed to in writing,+// 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 thediff --git a/datafusion/physical-expr/src/intervals/cp_solver.rs b/datafusion/physical-expr/src/intervals/cp_solver.rsindex 8084a52c78..f5a83c58de 100644--- a/datafusion/physical-expr/src/intervals/cp_solver.rs+++ b/datafusion/physical-expr/src/intervals/cp_solver.rs@@ -6,7 +6,7 @@// "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 andiff --git a/datafusion/physical-expr/src/intervals/test_utils.rs b/datafusion/physical-expr/src/intervals/test_utils.rsindex cedf55bccb..fbd018fb9e 100644--- a/datafusion/physical-expr/src/intervals/test_utils.rs+++ b/datafusion/physical-expr/src/intervals/test_utils.rs@@ -6,7 +6,7 @@// "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 andiff --git a/datafusion/physical-expr/src/intervals/utils.rs b/datafusion/physical-expr/src/intervals/utils.rsindex b426a656fb..496db7b454 100644--- a/datafusion/physical-expr/src/intervals/utils.rs+++ b/datafusion/physical-expr/src/intervals/utils.rs@@ -6,7 +6,7 @@// "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 andiff --git a/datafusion/physical-optimizer/src/lib.rs b/datafusion/physical-optimizer/src/lib.rsindex 6ae55df92d..9a4e4f8524 100644--- a/datafusion/physical-optimizer/src/lib.rs+++ b/datafusion/physical-optimizer/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/proto-common/src/generated/prost.rs b/datafusion/proto-common/src/generated/prost.rsindex fa77d23a6a..50a3cff5f5 100644--- a/datafusion/proto-common/src/generated/prost.rs+++ b/datafusion/proto-common/src/generated/prost.rs@@ -638,33 +638,27 @@ pub struct ParquetColumnSpecificOptions {#[derive(Clone, PartialEq, ::prost::Message)]pub struct ParquetColumnOptions {#[prost(oneof = "parquet_column_options::BloomFilterEnabledOpt", tags = "1")]- pub bloom_filter_enabled_opt: ::core::option::Option<- parquet_column_options::BloomFilterEnabledOpt,- >,+ pub bloom_filter_enabled_opt:+ ::core::option::Option<parquet_column_options::BloomFilterEnabledOpt>,#[prost(oneof = "parquet_column_options::EncodingOpt", tags = "2")]pub encoding_opt: ::core::option::Option<parquet_column_options::EncodingOpt>,#[prost(oneof = "parquet_column_options::DictionaryEnabledOpt", tags = "3")]- pub dictionary_enabled_opt: ::core::option::Option<- parquet_column_options::DictionaryEnabledOpt,- >,+ pub dictionary_enabled_opt:+ ::core::option::Option<parquet_column_options::DictionaryEnabledOpt>,#[prost(oneof = "parquet_column_options::CompressionOpt", tags = "4")]pub compression_opt: ::core::option::Option<parquet_column_options::CompressionOpt>,#[prost(oneof = "parquet_column_options::StatisticsEnabledOpt", tags = "5")]- pub statistics_enabled_opt: ::core::option::Option<- parquet_column_options::StatisticsEnabledOpt,- >,+ pub statistics_enabled_opt:+ ::core::option::Option<parquet_column_options::StatisticsEnabledOpt>,#[prost(oneof = "parquet_column_options::BloomFilterFppOpt", tags = "6")]- pub bloom_filter_fpp_opt: ::core::option::Option<- parquet_column_options::BloomFilterFppOpt,- >,+ pub bloom_filter_fpp_opt:+ ::core::option::Option<parquet_column_options::BloomFilterFppOpt>,#[prost(oneof = "parquet_column_options::BloomFilterNdvOpt", tags = "7")]- pub bloom_filter_ndv_opt: ::core::option::Option<- parquet_column_options::BloomFilterNdvOpt,- >,+ pub bloom_filter_ndv_opt:+ ::core::option::Option<parquet_column_options::BloomFilterNdvOpt>,#[prost(oneof = "parquet_column_options::MaxStatisticsSizeOpt", tags = "8")]- pub max_statistics_size_opt: ::core::option::Option<- parquet_column_options::MaxStatisticsSizeOpt,- >,+ pub max_statistics_size_opt:+ ::core::option::Option<parquet_column_options::MaxStatisticsSizeOpt>,}/// Nested message and enum types in `ParquetColumnOptions`.pub mod parquet_column_options {@@ -769,27 +763,22 @@ pub struct ParquetOptions {#[prost(string, tag = "16")]pub created_by: ::prost::alloc::string::String,#[prost(oneof = "parquet_options::MetadataSizeHintOpt", tags = "4")]- pub metadata_size_hint_opt: ::core::option::Option<- parquet_options::MetadataSizeHintOpt,- >,+ pub metadata_size_hint_opt:+ ::core::option::Option<parquet_options::MetadataSizeHintOpt>,#[prost(oneof = "parquet_options::CompressionOpt", tags = "10")]pub compression_opt: ::core::option::Option<parquet_options::CompressionOpt>,#[prost(oneof = "parquet_options::DictionaryEnabledOpt", tags = "11")]- pub dictionary_enabled_opt: ::core::option::Option<- parquet_options::DictionaryEnabledOpt,- >,+ pub dictionary_enabled_opt:+ ::core::option::Option<parquet_options::DictionaryEnabledOpt>,#[prost(oneof = "parquet_options::StatisticsEnabledOpt", tags = "13")]- pub statistics_enabled_opt: ::core::option::Option<- parquet_options::StatisticsEnabledOpt,- >,+ pub statistics_enabled_opt:+ ::core::option::Option<parquet_options::StatisticsEnabledOpt>,#[prost(oneof = "parquet_options::MaxStatisticsSizeOpt", tags = "14")]- pub max_statistics_size_opt: ::core::option::Option<- parquet_options::MaxStatisticsSizeOpt,- >,+ pub max_statistics_size_opt:+ ::core::option::Option<parquet_options::MaxStatisticsSizeOpt>,#[prost(oneof = "parquet_options::ColumnIndexTruncateLengthOpt", tags = "17")]- pub column_index_truncate_length_opt: ::core::option::Option<- parquet_options::ColumnIndexTruncateLengthOpt,- >,+ pub column_index_truncate_length_opt:+ ::core::option::Option<parquet_options::ColumnIndexTruncateLengthOpt>,#[prost(oneof = "parquet_options::EncodingOpt", tags = "19")]pub encoding_opt: ::core::option::Option<parquet_options::EncodingOpt>,#[prost(oneof = "parquet_options::BloomFilterFppOpt", tags = "21")]@@ -872,7 +861,9 @@ pub struct ColumnStats {#[prost(message, optional, tag = "4")]pub distinct_count: ::core::option::Option<Precision>,}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum JoinType {Inner = 0,@@ -919,7 +910,9 @@ impl JoinType {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum JoinConstraint {On = 0,@@ -945,7 +938,9 @@ impl JoinConstraint {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum TimeUnit {Second = 0,@@ -977,7 +972,9 @@ impl TimeUnit {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum IntervalUnit {YearMonth = 0,@@ -1006,7 +1003,9 @@ impl IntervalUnit {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum UnionMode {Sparse = 0,@@ -1032,7 +1031,9 @@ impl UnionMode {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum CompressionTypeVariant {Gzip = 0,@@ -1067,7 +1068,9 @@ impl CompressionTypeVariant {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum JoinSide {LeftSide = 0,@@ -1096,7 +1099,9 @@ impl JoinSide {}}}-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]+#[derive(+ Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,+)]#[repr(i32)]pub enum PrecisionInfo {Exact = 0,diff --git a/datafusion/proto-common/src/lib.rs b/datafusion/proto-common/src/lib.rsindex 91e3939154..9272a4e879 100644--- a/datafusion/proto-common/src/lib.rs+++ b/datafusion/proto-common/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/proto/src/lib.rs b/datafusion/proto/src/lib.rsindex e7019553f5..9f2973e3c9 100644--- a/datafusion/proto/src/lib.rs+++ b/datafusion/proto/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/proto/src/physical_plan/to_proto.rs b/datafusion/proto/src/physical_plan/to_proto.rsindex dc94ad075c..e9bae11bad 100644--- a/datafusion/proto/src/physical_plan/to_proto.rs+++ b/datafusion/proto/src/physical_plan/to_proto.rs@@ -13,8 +13,7 @@// "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.language governing permissions and-// limitations under the License.+// under the License.use std::sync::Arc;diff --git a/datafusion/sql/src/lib.rs b/datafusion/sql/src/lib.rsindex 956f5e17e2..a5d5389894 100644--- a/datafusion/sql/src/lib.rs+++ b/datafusion/sql/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143#![deny(clippy::clone_on_ref_ptr)]diff --git a/datafusion/wasmtest/src/lib.rs b/datafusion/wasmtest/src/lib.rsindex 085064d16d..54b662514c 100644--- a/datafusion/wasmtest/src/lib.rs+++ b/datafusion/wasmtest/src/lib.rs@@ -14,6 +14,7 @@// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.+extern crate wasm_bindgen;use datafusion_common::{DFSchema, ScalarValue};diff --git a/dev/create_license.py b/dev/create_license.pyindex 241d789d29..0eebb39e5f 100755--- a/dev/create_license.py+++ b/dev/create_license.py@@ -1,20 +1,20 @@#!/usr/bin/python+# 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-#-# 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.+# 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.import jsonimport subprocessdiff --git a/dev/release/check-rat-report.py b/dev/release/check-rat-report.pyindex e30d72bddd..a7e0a99a1d 100644--- a/dev/release/check-rat-report.py+++ b/dev/release/check-rat-report.py@@ -1,5 +1,4 @@#!/usr/bin/python-############################################################################### 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@@ -16,7 +15,7 @@# KIND, either express or implied. See the License for the# specific language governing permissions and limitations# under the License.-##############################################################################+import fnmatchimport reimport sysdiff --git a/dev/release/create-tarball.sh b/dev/release/create-tarball.shindex 1e59fad269..7d2b7d56bd 100755--- a/dev/release/create-tarball.sh+++ b/dev/release/create-tarball.sh@@ -112,9 +112,6 @@ echo "---------------------------------------------------------"mkdir -p ${distdir}(cd "${SOURCE_TOP_DIR}" && git archive ${release_hash} --prefix ${release}/ | gzip > ${tarball})-echo "Running rat license checker on ${tarball}"-${SOURCE_DIR}/run-rat.sh ${tarball}-echo "Signing tarball and creating checksums"gpg --armor --output ${tarball}.asc --detach-sig ${tarball}# create signing with relative path of tarballdiff --git a/dev/release/download-python-wheels.py b/dev/release/download-python-wheels.pyindex ca9789ec67..3f97d0a05c 100644--- a/dev/release/download-python-wheels.py+++ b/dev/release/download-python-wheels.py@@ -1,21 +1,20 @@#!/usr/bin/env python--#-# 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+# 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#-# 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.+# 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.# Script that download python release artifacts from Github#diff --git a/dev/release/generate-changelog.py b/dev/release/generate-changelog.pyindex 23b5942148..dc25b3dca2 100755--- a/dev/release/generate-changelog.py+++ b/dev/release/generate-changelog.py@@ -1,19 +1,20 @@#!/usr/bin/env python--# 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.import argparseimport sysdiff --git a/dev/update_arrow_deps.py b/dev/update_arrow_deps.pyindex 268ded38f6..6bd5d47ff0 100755--- a/dev/update_arrow_deps.py+++ b/dev/update_arrow_deps.py@@ -1,21 +1,20 @@#!/usr/bin/env python--#-# 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+# 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#-# 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.+# 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.# Script that updates the arrow dependencies in datafusion locally#diff --git a/dev/update_datafusion_versions.py b/dev/update_datafusion_versions.pyindex 2e3374cd92..4cb479b6df 100755--- a/dev/update_datafusion_versions.py+++ b/dev/update_datafusion_versions.py@@ -1,21 +1,20 @@#!/usr/bin/env python--#-# 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+# 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#-# 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.+# 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.# Script that updates versions for datafusion crates, locally#diff --git a/dev/release/run-rat.sh b/licenserc.tomlold mode 100755new mode 100644similarity index 51%rename from dev/release/run-rat.shrename to licenserc.tomlindex 94fa55fbe0..105d969ea5--- a/dev/release/run-rat.sh+++ b/licenserc.toml@@ -1,5 +1,3 @@-#!/bin/bash-## 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@@ -16,28 +14,17 @@# KIND, either express or implied. See the License for the# specific language governing permissions and limitations# under the License.-#--RAT_VERSION=0.13--# download apache rat-if [ ! -f apache-rat-${RAT_VERSION}.jar ]; then- curl -s https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar > apache-rat-${RAT_VERSION}.jar-fi--RAT="java -jar apache-rat-${RAT_VERSION}.jar -x "-RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)+headerPath = "Apache-2.0-ASF.txt"-# generate the rat report-$RAT $1 > rat.txt-python $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt rat.txt > filtered_rat.txt-cat filtered_rat.txt-UNAPPROVED=`cat filtered_rat.txt | grep "NOT APPROVED" | wc -l`+includes = [+ "*.rs",+ "*.py",+ "*.ts",+]-if [ "0" -eq "${UNAPPROVED}" ]; then- echo "No unapproved licenses"-else- echo "${UNAPPROVED} unapproved licences. Check rat report: rat.txt"- exit 1-fi+excludes = [+ # generated code+ "datafusion/proto/src/generated/",+ "datafusion/proto-common/src/generated/",+]