You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2025/11/26 06:14:02 UTC
(sedona-spatialbench) branch branch-0.1.0 updated (a9c8205 -> fa3b4c8)
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a change to branch branch-0.1.0
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
discard a9c8205 Fix script
discard 3c5290d Fix header
discard b97f769 Update release script
new 219658c Update release script
new fa3b4c8 Fix header
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (a9c8205)
\
N -- N -- N refs/heads/branch-0.1.0 (fa3b4c8)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
(sedona-spatialbench) 02/02: Fix header
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch branch-0.1.0
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
commit fa3b4c8ffc28c30b2edfc12456f34888843becf7
Author: Jia Yu <ji...@gmail.com>
AuthorDate: Tue Nov 25 21:53:21 2025 -0800
Fix header
---
dev/release/README.md | 5 +++--
dev/release/rat_exclude_files.txt | 22 ++++++++++++++++++----
raster/generator.py | 17 +++++++++++++++++
spatialbench-arrow/Cargo.toml | 17 +++++++++++++++++
spatialbench-arrow/README.md | 19 +++++++++++++++++++
spatialbench-arrow/src/building.rs | 17 +++++++++++++++++
spatialbench-arrow/src/conversions.rs | 17 +++++++++++++++++
spatialbench-arrow/src/customer.rs | 17 +++++++++++++++++
spatialbench-arrow/src/driver.rs | 17 +++++++++++++++++
spatialbench-arrow/src/lib.rs | 17 +++++++++++++++++
spatialbench-arrow/src/trip.rs | 17 +++++++++++++++++
spatialbench-arrow/src/vehicle.rs | 17 +++++++++++++++++
spatialbench-arrow/tests/reparse.rs | 17 +++++++++++++++++
spatialbench-cli/Cargo.toml | 17 +++++++++++++++++
spatialbench-cli/src/csv.rs | 17 +++++++++++++++++
spatialbench-cli/src/generate.rs | 17 +++++++++++++++++
spatialbench-cli/src/main.rs | 17 +++++++++++++++++
spatialbench-cli/src/output_plan.rs | 17 +++++++++++++++++
spatialbench-cli/src/parquet.rs | 17 +++++++++++++++++
spatialbench-cli/src/plan.rs | 17 +++++++++++++++++
spatialbench-cli/src/runner.rs | 17 +++++++++++++++++
spatialbench-cli/src/spatial_config_file.rs | 17 +++++++++++++++++
spatialbench-cli/src/statistics.rs | 17 +++++++++++++++++
spatialbench-cli/src/tbl.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/config.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/datasource.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/main.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/mod.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/partition.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/stats.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/transform.rs | 17 +++++++++++++++++
spatialbench-cli/src/zone/writer.rs | 17 +++++++++++++++++
spatialbench-cli/tests/cli_integration.rs | 17 +++++++++++++++++
spatialbench/Cargo.toml | 17 +++++++++++++++++
spatialbench/data/README.md | 19 +++++++++++++++++++
spatialbench/src/csv.rs | 17 +++++++++++++++++
spatialbench/src/dates.rs | 17 +++++++++++++++++
spatialbench/src/decimal.rs | 17 +++++++++++++++++
spatialbench/src/distribution.rs | 17 +++++++++++++++++
spatialbench/src/dists.dss | 16 ++++++++++++++++
spatialbench/src/generators.rs | 17 +++++++++++++++++
spatialbench/src/kde.rs | 17 +++++++++++++++++
spatialbench/src/lib.rs | 17 +++++++++++++++++
spatialbench/src/q_and_a/answers_sf1.rs | 17 +++++++++++++++++
spatialbench/src/q_and_a/mod.rs | 17 +++++++++++++++++
spatialbench/src/q_and_a/queries.rs | 17 +++++++++++++++++
spatialbench/src/random.rs | 17 +++++++++++++++++
spatialbench/src/spatial/cache.rs | 17 +++++++++++++++++
spatialbench/src/spatial/config.rs | 17 +++++++++++++++++
spatialbench/src/spatial/defaults.rs | 17 +++++++++++++++++
spatialbench/src/spatial/distributions.rs | 17 +++++++++++++++++
spatialbench/src/spatial/generator.rs | 17 +++++++++++++++++
spatialbench/src/spatial/geometry.rs | 17 +++++++++++++++++
spatialbench/src/spatial/mod.rs | 17 +++++++++++++++++
spatialbench/src/spatial/overrides.rs | 17 +++++++++++++++++
spatialbench/src/spatial/utils/affine.rs | 17 +++++++++++++++++
spatialbench/src/spatial/utils/antimeridian.rs | 17 +++++++++++++++++
spatialbench/src/spatial/utils/continent.rs | 17 +++++++++++++++++
spatialbench/src/spatial/utils/mod.rs | 17 +++++++++++++++++
spatialbench/src/spatial/utils/random.rs | 17 +++++++++++++++++
spatialbench/src/text.rs | 17 +++++++++++++++++
spatialbench/tests/geometry_tests.rs | 17 +++++++++++++++++
spatialbench/tests/integration_tests.rs | 17 +++++++++++++++++
63 files changed, 1061 insertions(+), 6 deletions(-)
diff --git a/dev/release/README.md b/dev/release/README.md
index 2d2ef9e..ee4f18a 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -36,10 +36,11 @@ This will run all verification tests on your local checkout without requiring an
### Testing a local tarball
-If you have a tarball you want to test before uploading:
+To create a local tarball for testing:
```shell
-dev/release/verify-release-candidate.sh /path/to/apache-sedona-spatialbench-0.1.0.tar.gz
+VERSION="0.1.0" && git archive HEAD --prefix=apache-sedona-spatialbench-${VERSION}/ | gzip > apache-sedona-spatialbench-${VERSION}.tar.gz
+dev/release/verify-release-candidate.sh apache-sedona-spatialbench-${VERSION}.tar.gz
```
### Verifying an official release candidate
diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index 5a4c249..d5ceb40 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -5,8 +5,22 @@ Cargo.lock
site/**
docs-overrides/**
raster/output/**
-spatialbench/data/sf-v1/*.tbl.gz
-spatialbench/data/sf-v1/*.parquet
+spatialbench/data/**
dev/release/rat_exclude_files.txt
-
-
+.gitignore
+.gitkeep
+filtered_rat.txt
+rat.txt
+docs/requirements.txt
+docs/javascripts/katex.js
+docs/stylesheets/extra.css
+target/**
+ARCHITECTURE.md
+Cargo.toml
+README.md
+spatialbench-config.yml
+docs/queries.md
+spatialbench-cli/CONFIGURATION.md
+spatialbench-cli/Cargo.toml
+spatialbench-cli/README.md
+spatialbench-cli/pyproject.toml
diff --git a/raster/generator.py b/raster/generator.py
index a9ba0cc..0e5d70b 100644
--- a/raster/generator.py
+++ b/raster/generator.py
@@ -1,3 +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
+#
+# 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 os
import numpy as np
diff --git a/spatialbench-arrow/Cargo.toml b/spatialbench-arrow/Cargo.toml
index 8b0fbe6..c78bd82 100644
--- a/spatialbench-arrow/Cargo.toml
+++ b/spatialbench-arrow/Cargo.toml
@@ -1,3 +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
+#
+# 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]
name = "spatialbench-arrow"
version = "1.1.1"
diff --git a/spatialbench-arrow/README.md b/spatialbench-arrow/README.md
index 59a25ad..95147d8 100644
--- a/spatialbench-arrow/README.md
+++ b/spatialbench-arrow/README.md
@@ -1,3 +1,22 @@
+<!---
+ 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.
+-->
+
# Spatial Bench Data Generator in Arrow format
This crate generates Spatial Bench data directly into [Apache Arrow] format using the [arrow] crate
diff --git a/spatialbench-arrow/src/building.rs b/spatialbench-arrow/src/building.rs
index 8d16aba..609ff8b 100644
--- a/spatialbench-arrow/src/building.rs
+++ b/spatialbench-arrow/src/building.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::conversions::string_view_array_from_display_iter;
use crate::{DEFAULT_BATCH_SIZE, RecordBatchIterator};
use arrow::array::{BinaryArray, Int64Array, RecordBatch};
diff --git a/spatialbench-arrow/src/conversions.rs b/spatialbench-arrow/src/conversions.rs
index 63aad6e..5826bda 100644
--- a/spatialbench-arrow/src/conversions.rs
+++ b/spatialbench-arrow/src/conversions.rs
@@ -1,3 +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
+//
+// 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.
+
//! Routines to convert TPCH types to Arrow types
use arrow::array::{StringViewArray, StringViewBuilder};
diff --git a/spatialbench-arrow/src/customer.rs b/spatialbench-arrow/src/customer.rs
index 126bdbc..3f84775 100644
--- a/spatialbench-arrow/src/customer.rs
+++ b/spatialbench-arrow/src/customer.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::conversions::string_view_array_from_display_iter;
use crate::{DEFAULT_BATCH_SIZE, RecordBatchIterator};
use arrow::array::{Int64Array, RecordBatch, StringViewArray};
diff --git a/spatialbench-arrow/src/driver.rs b/spatialbench-arrow/src/driver.rs
index 8294397..16b2a61 100644
--- a/spatialbench-arrow/src/driver.rs
+++ b/spatialbench-arrow/src/driver.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::conversions::string_view_array_from_display_iter;
use crate::{DEFAULT_BATCH_SIZE, RecordBatchIterator};
use arrow::array::{Int64Array, RecordBatch, StringViewArray};
diff --git a/spatialbench-arrow/src/lib.rs b/spatialbench-arrow/src/lib.rs
index ac6fb78..68fd7b5 100644
--- a/spatialbench-arrow/src/lib.rs
+++ b/spatialbench-arrow/src/lib.rs
@@ -1,3 +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
+//
+// 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.
+
//! Generate Spatial Bench data as Arrow RecordBatches
//!
//! This crate provides generators for Spatial Bench tables that directly produces
diff --git a/spatialbench-arrow/src/trip.rs b/spatialbench-arrow/src/trip.rs
index bf866de..c5b2f86 100644
--- a/spatialbench-arrow/src/trip.rs
+++ b/spatialbench-arrow/src/trip.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::conversions::{decimal128_array_from_iter, to_arrow_timestamp_millis};
use crate::{DEFAULT_BATCH_SIZE, RecordBatchIterator};
use arrow::array::{BinaryArray, Int64Array, RecordBatch, TimestampMillisecondArray};
diff --git a/spatialbench-arrow/src/vehicle.rs b/spatialbench-arrow/src/vehicle.rs
index 8e39013..3dbde22 100644
--- a/spatialbench-arrow/src/vehicle.rs
+++ b/spatialbench-arrow/src/vehicle.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::conversions::string_view_array_from_display_iter;
use crate::{DEFAULT_BATCH_SIZE, RecordBatchIterator};
use arrow::array::{Int64Array, RecordBatch, StringViewArray};
diff --git a/spatialbench-arrow/tests/reparse.rs b/spatialbench-arrow/tests/reparse.rs
index 889933a..dd3b206 100644
--- a/spatialbench-arrow/tests/reparse.rs
+++ b/spatialbench-arrow/tests/reparse.rs
@@ -1,3 +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
+//
+// 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.
+
//! Verifies the correctness of the Arrow Spatial Bench generator by parsing the canonical TBL format
//! and comparing with the generated Arrow RecordBatches
diff --git a/spatialbench-cli/Cargo.toml b/spatialbench-cli/Cargo.toml
index a3c8e87..5b42ec4 100644
--- a/spatialbench-cli/Cargo.toml
+++ b/spatialbench-cli/Cargo.toml
@@ -1,3 +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
+#
+# 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]
name = "spatialbench-cli"
version = "1.1.1"
diff --git a/spatialbench-cli/src/csv.rs b/spatialbench-cli/src/csv.rs
index 78f93e5..241dc0c 100644
--- a/spatialbench-cli/src/csv.rs
+++ b/spatialbench-cli/src/csv.rs
@@ -1,3 +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
+//
+// 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.
+
//! Implementations of [`Source`] for generating data in TBL format
use super::generate::Source;
use spatialbench::csv::{BuildingCsv, CustomerCsv, DriverCsv, TripCsv, VehicleCsv};
diff --git a/spatialbench-cli/src/generate.rs b/spatialbench-cli/src/generate.rs
index bbe3cef..90cba4b 100644
--- a/spatialbench-cli/src/generate.rs
+++ b/spatialbench-cli/src/generate.rs
@@ -1,3 +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
+//
+// 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.
+
//! Parallel data generation: [`Source`] and [`Sink`] and [`generate_in_chunks`]
//!
//! These traits and function are used to generate data in parallel and write it to a sink
diff --git a/spatialbench-cli/src/main.rs b/spatialbench-cli/src/main.rs
index e1b5c4c..425e5d7 100644
--- a/spatialbench-cli/src/main.rs
+++ b/spatialbench-cli/src/main.rs
@@ -1,3 +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
+//
+// 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.
+
//! Spatial Bench data generation CLI with a dbgen compatible API.
//!
//! This crate provides a CLI for generating Spatial Bench data and tries to remain close
diff --git a/spatialbench-cli/src/output_plan.rs b/spatialbench-cli/src/output_plan.rs
index 75e441b..cdab006 100644
--- a/spatialbench-cli/src/output_plan.rs
+++ b/spatialbench-cli/src/output_plan.rs
@@ -1,3 +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
+//
+// 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.
+
//! * [`OutputLocation`]: where to output the generated data
//! * [`OutputPlan`]: an output file that will be generated
//! * [`OutputPlanGenerator`]: plans the output files to be generated
diff --git a/spatialbench-cli/src/parquet.rs b/spatialbench-cli/src/parquet.rs
index 53b60f4..45ffcbd 100644
--- a/spatialbench-cli/src/parquet.rs
+++ b/spatialbench-cli/src/parquet.rs
@@ -1,3 +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
+//
+// 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.
+
//! Parquet output format
use crate::statistics::WriteStatistics;
diff --git a/spatialbench-cli/src/plan.rs b/spatialbench-cli/src/plan.rs
index fceace9..ed680b1 100644
--- a/spatialbench-cli/src/plan.rs
+++ b/spatialbench-cli/src/plan.rs
@@ -1,3 +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
+//
+// 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.
+
//! * [`GenerationPlan`]: how to generate a specific Spatial Bench dataset.
use crate::{OutputFormat, Table};
diff --git a/spatialbench-cli/src/runner.rs b/spatialbench-cli/src/runner.rs
index 882d1cf..a337490 100644
--- a/spatialbench-cli/src/runner.rs
+++ b/spatialbench-cli/src/runner.rs
@@ -1,3 +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
+//
+// 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.
+
//! [`PlanRunner`] for running [`OutputPlan`]s.
use crate::csv::*;
diff --git a/spatialbench-cli/src/spatial_config_file.rs b/spatialbench-cli/src/spatial_config_file.rs
index 9027da7..876daeb 100644
--- a/spatialbench-cli/src/spatial_config_file.rs
+++ b/spatialbench-cli/src/spatial_config_file.rs
@@ -1,3 +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
+//
+// 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.
+
use anyhow::Result;
use serde::de::{self, Visitor};
use serde::{Deserialize, Deserializer};
diff --git a/spatialbench-cli/src/statistics.rs b/spatialbench-cli/src/statistics.rs
index b4230dd..ff604b4 100644
--- a/spatialbench-cli/src/statistics.rs
+++ b/spatialbench-cli/src/statistics.rs
@@ -1,3 +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
+//
+// 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.
+
//! Statistics reporter for Spatial Bench data generation.
use log::{debug, info};
diff --git a/spatialbench-cli/src/tbl.rs b/spatialbench-cli/src/tbl.rs
index 8eeb448..5ee9a1a 100644
--- a/spatialbench-cli/src/tbl.rs
+++ b/spatialbench-cli/src/tbl.rs
@@ -1,3 +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
+//
+// 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.
+
//! Implementations of [`Source`] for generating data in TBL format
use super::generate::Source;
diff --git a/spatialbench-cli/src/zone/config.rs b/spatialbench-cli/src/zone/config.rs
index 92890a6..9594c8b 100644
--- a/spatialbench-cli/src/zone/config.rs
+++ b/spatialbench-cli/src/zone/config.rs
@@ -1,3 +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
+//
+// 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.
+
use anyhow::{anyhow, Result};
use parquet::basic::Compression as ParquetCompression;
use std::path::PathBuf;
diff --git a/spatialbench-cli/src/zone/datasource.rs b/spatialbench-cli/src/zone/datasource.rs
index 1866460..d3c2ea9 100644
--- a/spatialbench-cli/src/zone/datasource.rs
+++ b/spatialbench-cli/src/zone/datasource.rs
@@ -1,3 +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
+//
+// 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.
+
use anyhow::Result;
use datafusion::{
common::config::ConfigOptions,
diff --git a/spatialbench-cli/src/zone/main.rs b/spatialbench-cli/src/zone/main.rs
index cfa59e3..83fb017 100644
--- a/spatialbench-cli/src/zone/main.rs
+++ b/spatialbench-cli/src/zone/main.rs
@@ -1,3 +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
+//
+// 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.
+
use log::info;
use parquet::basic::Compression as ParquetCompression;
use std::io;
diff --git a/spatialbench-cli/src/zone/mod.rs b/spatialbench-cli/src/zone/mod.rs
index 5d8d3ee..4071454 100644
--- a/spatialbench-cli/src/zone/mod.rs
+++ b/spatialbench-cli/src/zone/mod.rs
@@ -1,3 +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
+//
+// 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.
+
//! Zone table generation module using DataFusion and remote Parquet files
mod config;
diff --git a/spatialbench-cli/src/zone/partition.rs b/spatialbench-cli/src/zone/partition.rs
index b1f3a1d..dd3cfc4 100644
--- a/spatialbench-cli/src/zone/partition.rs
+++ b/spatialbench-cli/src/zone/partition.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::zone::stats::ZoneTableStats;
use arrow_array::RecordBatch;
use datafusion::prelude::*;
diff --git a/spatialbench-cli/src/zone/stats.rs b/spatialbench-cli/src/zone/stats.rs
index 5ba8ba0..5062af5 100644
--- a/spatialbench-cli/src/zone/stats.rs
+++ b/spatialbench-cli/src/zone/stats.rs
@@ -1,3 +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
+//
+// 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.
+
use log::debug;
const SUBTYPE_ROWS: &[(&str, i64)] = &[
diff --git a/spatialbench-cli/src/zone/transform.rs b/spatialbench-cli/src/zone/transform.rs
index 74d9365..f7815c6 100644
--- a/spatialbench-cli/src/zone/transform.rs
+++ b/spatialbench-cli/src/zone/transform.rs
@@ -1,3 +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
+//
+// 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.
+
use anyhow::Result;
use arrow_schema::Schema;
use datafusion::{prelude::*, sql::TableReference};
diff --git a/spatialbench-cli/src/zone/writer.rs b/spatialbench-cli/src/zone/writer.rs
index d8dc824..b22671a 100644
--- a/spatialbench-cli/src/zone/writer.rs
+++ b/spatialbench-cli/src/zone/writer.rs
@@ -1,3 +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
+//
+// 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.
+
use anyhow::Result;
use arrow_array::RecordBatch;
use arrow_schema::SchemaRef;
diff --git a/spatialbench-cli/tests/cli_integration.rs b/spatialbench-cli/tests/cli_integration.rs
index d1f325c..d840357 100644
--- a/spatialbench-cli/tests/cli_integration.rs
+++ b/spatialbench-cli/tests/cli_integration.rs
@@ -1,3 +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
+//
+// 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.
+
use arrow_array::RecordBatch;
use assert_cmd::Command;
use parquet::arrow::arrow_reader::{ArrowReaderOptions, ParquetRecordBatchReaderBuilder};
diff --git a/spatialbench/Cargo.toml b/spatialbench/Cargo.toml
index 5242d35..7ab2005 100644
--- a/spatialbench/Cargo.toml
+++ b/spatialbench/Cargo.toml
@@ -1,3 +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
+#
+# 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]
name = "spatialbench"
authors = ["Apache Sedona <de...@sedona.apache.org>"]
diff --git a/spatialbench/data/README.md b/spatialbench/data/README.md
index fa19d21..10306f1 100644
--- a/spatialbench/data/README.md
+++ b/spatialbench/data/README.md
@@ -1,3 +1,22 @@
+<!---
+ 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.
+-->
+
# TPCH Prepared Test Files
This folder stores test files used to ensure consistency with Apache Trino's and
diff --git a/spatialbench/src/csv.rs b/spatialbench/src/csv.rs
index 37eb9ab..8518a47 100644
--- a/spatialbench/src/csv.rs
+++ b/spatialbench/src/csv.rs
@@ -1,3 +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
+//
+// 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.
+
//! CSV formatting support for the row struct objects generated by the library.
use crate::generators::{Building, Customer, Driver, Trip, Vehicle};
diff --git a/spatialbench/src/dates.rs b/spatialbench/src/dates.rs
index d8ccaeb..fae9e79 100644
--- a/spatialbench/src/dates.rs
+++ b/spatialbench/src/dates.rs
@@ -1,3 +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
+//
+// 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.
+
//! [`TPCHDate`] and date handling
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
diff --git a/spatialbench/src/decimal.rs b/spatialbench/src/decimal.rs
index bcf2a27..b3ca3c4 100644
--- a/spatialbench/src/decimal.rs
+++ b/spatialbench/src/decimal.rs
@@ -1,3 +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
+//
+// 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.
+
//! [`TPCHDecimal`] and decimal handling
use std::fmt;
diff --git a/spatialbench/src/distribution.rs b/spatialbench/src/distribution.rs
index e6455d6..711075a 100644
--- a/spatialbench/src/distribution.rs
+++ b/spatialbench/src/distribution.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::random::RowRandomInt;
use std::{
io::{self},
diff --git a/spatialbench/src/dists.dss b/spatialbench/src/dists.dss
index badb3dd..1299c15 100644
--- a/spatialbench/src/dists.dss
+++ b/spatialbench/src/dists.dss
@@ -1,3 +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.
#
# $Id: dists.dss,v 1.2 2005/01/03 20:08:58 jms Exp $
#
diff --git a/spatialbench/src/generators.rs b/spatialbench/src/generators.rs
index 122718f..073e525 100644
--- a/spatialbench/src/generators.rs
+++ b/spatialbench/src/generators.rs
@@ -1,3 +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
+//
+// 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.
+
//! Generators for each Spatial Bench Tables
use crate::dates;
use crate::dates::{GenerateUtils, TPCHDate};
diff --git a/spatialbench/src/kde.rs b/spatialbench/src/kde.rs
index 07b7a0b..7d92e0a 100644
--- a/spatialbench/src/kde.rs
+++ b/spatialbench/src/kde.rs
@@ -1,3 +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
+//
+// 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.
+
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
diff --git a/spatialbench/src/lib.rs b/spatialbench/src/lib.rs
index fc33931..97dcfdd 100644
--- a/spatialbench/src/lib.rs
+++ b/spatialbench/src/lib.rs
@@ -1,3 +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
+//
+// 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.
+
//! Rust Spatial Bench Data Generator
//!
//! This crate provides a native Rust implementation of functions and utilities
diff --git a/spatialbench/src/q_and_a/answers_sf1.rs b/spatialbench/src/q_and_a/answers_sf1.rs
index 4844b44..dcc0285 100644
--- a/spatialbench/src/q_and_a/answers_sf1.rs
+++ b/spatialbench/src/q_and_a/answers_sf1.rs
@@ -1,3 +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
+//
+// 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.
+
//! TPC-H benchmark answers for scale factor of 1.
//!
//! Module for exposing the TPC-H answers in TBL format for Scale Factor 1 (SF 1).
diff --git a/spatialbench/src/q_and_a/mod.rs b/spatialbench/src/q_and_a/mod.rs
index 763ba72..cae4ad7 100644
--- a/spatialbench/src/q_and_a/mod.rs
+++ b/spatialbench/src/q_and_a/mod.rs
@@ -1,3 +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
+//
+// 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.
+
//! TPC-H Queries and Answers.
//!
//! This module exposes a bundled query and answer tuple that makes it
diff --git a/spatialbench/src/q_and_a/queries.rs b/spatialbench/src/q_and_a/queries.rs
index 9f37c69..80d1421 100644
--- a/spatialbench/src/q_and_a/queries.rs
+++ b/spatialbench/src/q_and_a/queries.rs
@@ -1,3 +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
+//
+// 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.
+
//! TPC-H benchmark queries.
/// TPC-H Pricing Summary Report Query (Q1).
diff --git a/spatialbench/src/random.rs b/spatialbench/src/random.rs
index 2123652..9932ddc 100644
--- a/spatialbench/src/random.rs
+++ b/spatialbench/src/random.rs
@@ -1,3 +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
+//
+// 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.
+
//! Implementation of the core random number generators.
use crate::{distribution::Distribution, text::TextPool};
diff --git a/spatialbench/src/spatial/cache.rs b/spatialbench/src/spatial/cache.rs
index ee434c1..ca7d1b5 100644
--- a/spatialbench/src/spatial/cache.rs
+++ b/spatialbench/src/spatial/cache.rs
@@ -1,3 +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
+//
+// 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.
+
#[derive(Clone, Debug)]
pub struct ThomasCache {
pub cdf: Vec<f64>,
diff --git a/spatialbench/src/spatial/config.rs b/spatialbench/src/spatial/config.rs
index b31fd1e..fdff2e7 100644
--- a/spatialbench/src/spatial/config.rs
+++ b/spatialbench/src/spatial/config.rs
@@ -1,3 +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
+//
+// 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.
+
#[derive(Debug, Clone, Copy)]
pub enum DistributionType {
Uniform,
diff --git a/spatialbench/src/spatial/defaults.rs b/spatialbench/src/spatial/defaults.rs
index 4fadc96..91cb2d8 100644
--- a/spatialbench/src/spatial/defaults.rs
+++ b/spatialbench/src/spatial/defaults.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::{
ContinentAffines, DistributionParams, DistributionType, GeomType, SpatialConfig,
SpatialGenerator,
diff --git a/spatialbench/src/spatial/distributions.rs b/spatialbench/src/spatial/distributions.rs
index b80ba8a..40d5e7a 100644
--- a/spatialbench/src/spatial/distributions.rs
+++ b/spatialbench/src/spatial/distributions.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::cache::{HierThomasCache, ThomasCache};
use crate::spatial::geometry::emit_geom;
use crate::spatial::utils::{
diff --git a/spatialbench/src/spatial/generator.rs b/spatialbench/src/spatial/generator.rs
index 5fcd176..e38b304 100644
--- a/spatialbench/src/spatial/generator.rs
+++ b/spatialbench/src/spatial/generator.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::cache::{HierThomasCache, ThomasCache};
use crate::spatial::distributions::*;
use crate::spatial::{DistributionType, SpatialConfig};
diff --git a/spatialbench/src/spatial/geometry.rs b/spatialbench/src/spatial/geometry.rs
index b753d57..bbac543 100644
--- a/spatialbench/src/spatial/geometry.rs
+++ b/spatialbench/src/spatial/geometry.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::utils::{
apply_affine, clamp_polygon_to_dateline, crosses_dateline, round_coordinates,
wrap_around_longitude,
diff --git a/spatialbench/src/spatial/mod.rs b/spatialbench/src/spatial/mod.rs
index 2990cbc..8a1cacc 100644
--- a/spatialbench/src/spatial/mod.rs
+++ b/spatialbench/src/spatial/mod.rs
@@ -1,3 +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
+//
+// 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.
+
pub mod cache;
pub mod config;
pub mod defaults;
diff --git a/spatialbench/src/spatial/overrides.rs b/spatialbench/src/spatial/overrides.rs
index e087943..8e03bfc 100644
--- a/spatialbench/src/spatial/overrides.rs
+++ b/spatialbench/src/spatial/overrides.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::SpatialGenerator;
use once_cell::sync::OnceCell;
diff --git a/spatialbench/src/spatial/utils/affine.rs b/spatialbench/src/spatial/utils/affine.rs
index 5100cad..4083533 100644
--- a/spatialbench/src/spatial/utils/affine.rs
+++ b/spatialbench/src/spatial/utils/affine.rs
@@ -1,3 +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
+//
+// 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.
+
#[inline]
pub fn apply_affine(x: f64, y: f64, m: &[f64; 6]) -> (f64, f64) {
(m[0] * x + m[1] * y + m[2], m[3] * x + m[4] * y + m[5])
diff --git a/spatialbench/src/spatial/utils/antimeridian.rs b/spatialbench/src/spatial/utils/antimeridian.rs
index 22e9190..89b0a54 100644
--- a/spatialbench/src/spatial/utils/antimeridian.rs
+++ b/spatialbench/src/spatial/utils/antimeridian.rs
@@ -1,3 +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
+//
+// 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.
+
use geo::{Centroid, LineString, Polygon};
/// Normalizes longitude values to the valid range [-180, 180] by wrapping around the antimeridian.
diff --git a/spatialbench/src/spatial/utils/continent.rs b/spatialbench/src/spatial/utils/continent.rs
index 4abee17..ed7ff6d 100644
--- a/spatialbench/src/spatial/utils/continent.rs
+++ b/spatialbench/src/spatial/utils/continent.rs
@@ -1,3 +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
+//
+// 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.
+
use crate::spatial::ContinentAffines;
use std::f64::consts::PI;
diff --git a/spatialbench/src/spatial/utils/mod.rs b/spatialbench/src/spatial/utils/mod.rs
index ab79032..2989ad0 100644
--- a/spatialbench/src/spatial/utils/mod.rs
+++ b/spatialbench/src/spatial/utils/mod.rs
@@ -1,3 +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
+//
+// 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.
+
pub mod affine;
mod antimeridian;
pub mod continent;
diff --git a/spatialbench/src/spatial/utils/random.rs b/spatialbench/src/spatial/utils/random.rs
index 6eeb1d4..c59c572 100644
--- a/spatialbench/src/spatial/utils/random.rs
+++ b/spatialbench/src/spatial/utils/random.rs
@@ -1,3 +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
+//
+// 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.
+
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
use std::f64::consts::PI;
diff --git a/spatialbench/src/text.rs b/spatialbench/src/text.rs
index af14539..e0f6d8e 100644
--- a/spatialbench/src/text.rs
+++ b/spatialbench/src/text.rs
@@ -1,3 +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
+//
+// 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.
+
//! Implementation of text pool and text generation.
//!
//! Most of this code has been ported from the Apache Trino SpatialBench generator
diff --git a/spatialbench/tests/geometry_tests.rs b/spatialbench/tests/geometry_tests.rs
index 3c484e4..8eec747 100644
--- a/spatialbench/tests/geometry_tests.rs
+++ b/spatialbench/tests/geometry_tests.rs
@@ -1,3 +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
+//
+// 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.
+
//! Geometry validation tests for generated spatial data.
//!
//! This test suite validates that all generated geometries meet quality and correctness standards:
diff --git a/spatialbench/tests/integration_tests.rs b/spatialbench/tests/integration_tests.rs
index 1880d79..528cbc0 100644
--- a/spatialbench/tests/integration_tests.rs
+++ b/spatialbench/tests/integration_tests.rs
@@ -1,3 +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
+//
+// 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.
+
//! Consistence test suite to test the `IntoIterator` trait implementation
//! for the generators in the `spatialbench` crate.
(sedona-spatialbench) 01/02: Update release script
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch branch-0.1.0
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
commit 219658c73cf92ab31e1467f9ffad8c6f51714954
Author: Jia Yu <ji...@gmail.com>
AuthorDate: Tue Nov 25 22:13:28 2025 -0800
Update release script
---
dev/release/README.md | 37 ++++++++++++++++++++++++++++-----
dev/release/check-rat-report.py | 1 +
dev/release/rat_exclude_files.txt | 1 +
dev/release/run-rat.sh | 17 ++++++++-------
dev/release/sign-assets.sh | 1 +
dev/release/upload-candidate.sh | 1 +
dev/release/upload-release.sh | 1 +
dev/release/verify-release-candidate.sh | 26 ++++++++++++++++++++---
8 files changed, 70 insertions(+), 15 deletions(-)
diff --git a/dev/release/README.md b/dev/release/README.md
index 745bc93..2d2ef9e 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -21,18 +21,45 @@
## Verifying a release candidate
-Release candidates are verified using the script `verify-release-candidate.sh <version> <rc_num>`.
-For example, to verify SpatialBench 0.1.0 RC1, run:
+### Testing locally (before creating a release candidate)
+
+Before creating a release candidate, you should test your local checkout:
```shell
# git clone https://github.com/apache/sedona-spatialbench.git && cd sedona-spatialbench
# or
# cd existing/sedona-spatialbench && git fetch upstream && git switch main && git pull upstream main
+dev/release/verify-release-candidate.sh
+```
+
+This will run all verification tests on your local checkout without requiring any release artifacts.
+
+### Testing a local tarball
+
+If you have a tarball you want to test before uploading:
+
+```shell
+dev/release/verify-release-candidate.sh /path/to/apache-sedona-spatialbench-0.1.0.tar.gz
+```
+
+### Verifying an official release candidate
+
+Once a release candidate has been uploaded to Apache dist, verify it using:
+
+```shell
dev/release/verify-release-candidate.sh 0.1.0 1
```
-Release verification requires a recent Rust toolchain. This toolchain can be installed
-by following instructions from <https://rustup.rs/>.
+This will download the release candidate from `https://dist.apache.org/repos/dist/dev/sedona/` and verify it.
+
+Release verification requires:
+- A recent Rust toolchain (can be installed from <https://rustup.rs/>)
+- Java (for Apache RAT license checking)
+- Python (for RAT report filtering)
+
+The verification script will:
+1. Run Apache RAT to check all files have proper license headers
+2. Build and test all Rust crates in the workspace
When verifying via Docker or on a smaller machine it may be necessary to limit the
number of parallel jobs to avoid running out of memory:
@@ -64,7 +91,7 @@ When the state of the `branch-x.x.x` branch is clean and checks are complete,
the release candidate tag can be created:
```shell
-git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache SpatialBench 0.1.0-rc1"
+git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache Sedona SpatialBench 0.1.0-rc1"
git push upstream sedona-spatialbench-0.1.0-rc1
```
diff --git a/dev/release/check-rat-report.py b/dev/release/check-rat-report.py
index b9fd85a..6a6da09 100644
--- a/dev/release/check-rat-report.py
+++ b/dev/release/check-rat-report.py
@@ -57,3 +57,4 @@ if not all_ok:
print("OK")
sys.exit(0)
+
diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index c3a17d7..5a4c249 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -9,3 +9,4 @@ spatialbench/data/sf-v1/*.tbl.gz
spatialbench/data/sf-v1/*.parquet
dev/release/rat_exclude_files.txt
+
diff --git a/dev/release/run-rat.sh b/dev/release/run-rat.sh
index 78eba22..d5230c7 100755
--- a/dev/release/run-rat.sh
+++ b/dev/release/run-rat.sh
@@ -18,19 +18,21 @@
# under the License.
RAT_VERSION=0.13
+RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+RAT_JAR="${RELEASE_DIR}/apache-rat-${RAT_VERSION}.jar"
# 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
+if [ ! -f "${RAT_JAR}" ]; then
+ curl -s https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar > "${RAT_JAR}"
fi
-RAT="java -jar apache-rat-${RAT_VERSION}.jar -x "
-
-RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+RAT="java -jar ${RAT_JAR} -x "
# 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
+# Run RAT from inside the target directory so it produces relative paths
+cd "$1"
+$RAT . > rat.txt
+python3 $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`
@@ -41,3 +43,4 @@ else
exit 1
fi
+
diff --git a/dev/release/sign-assets.sh b/dev/release/sign-assets.sh
index 18f56c8..1e51d5c 100755
--- a/dev/release/sign-assets.sh
+++ b/dev/release/sign-assets.sh
@@ -147,3 +147,4 @@ upload_asset_signatures() {
main "$@"
+
diff --git a/dev/release/upload-candidate.sh b/dev/release/upload-candidate.sh
index bffba60..d381497 100755
--- a/dev/release/upload-candidate.sh
+++ b/dev/release/upload-candidate.sh
@@ -82,3 +82,4 @@ header() {
main "$@"
+
diff --git a/dev/release/upload-release.sh b/dev/release/upload-release.sh
index 71bf530..abe03ad 100755
--- a/dev/release/upload-release.sh
+++ b/dev/release/upload-release.sh
@@ -53,3 +53,4 @@ main() {
main "$@"
+
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 4a55d9b..3192014 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -28,7 +28,7 @@ fi
check_dependencies() {
local missing_deps=0
- local required_deps=("curl" "git" "gpg" "cargo")
+ local required_deps=("curl" "git" "gpg" "cargo" "java" "python")
for dep in "${required_deps[@]}"; do
if ! command -v $dep &> /dev/null; then
echo "Error: $dep is not installed or not in PATH"
@@ -102,12 +102,19 @@ show_info() {
SPATIALBENCH_DIST_URL='https://dist.apache.org/repos/dist/dev/sedona'
download_dist_file() {
- curl \
+ local url="${SPATIALBENCH_DIST_URL}/$1"
+ if ! curl \
--silent \
--show-error \
--fail \
--location \
- --remote-name $SPATIALBENCH_DIST_URL/$1
+ --remote-name "$url"; then
+ echo "Error: Failed to download $url"
+ echo "This usually means the release candidate has not been uploaded yet."
+ echo "To test locally, run: $0"
+ echo "Or to test a local tarball: $0 /path/to/tarball.tar.gz"
+ exit 1
+ fi
}
download_rc_file() {
@@ -196,6 +203,14 @@ test_rust() {
popd
}
+test_rat() {
+ show_header "Running Apache RAT license check"
+
+ # Use SOURCE_DIR which was computed at script startup (before any directory changes)
+ # Run RAT check using the run-rat.sh script from the repo
+ bash "${SOURCE_DIR}/run-rat.sh" "${SPATIALBENCH_SOURCE_DIR}"
+}
+
ensure_source_directory() {
show_header "Ensuring source directory"
@@ -234,6 +249,10 @@ ensure_source_directory() {
test_source_distribution() {
pushd $SPATIALBENCH_SOURCE_DIR
+ if [ ${TEST_RAT} -gt 0 ]; then
+ test_rat
+ fi
+
if [ ${TEST_RUST} -gt 0 ]; then
test_rust
fi
@@ -247,6 +266,7 @@ test_source_distribution() {
: ${TEST_DEFAULT:=1}
: ${TEST_SOURCE:=${TEST_DEFAULT}}
+: ${TEST_RAT:=${TEST_SOURCE}}
: ${TEST_RUST:=${TEST_SOURCE}}
TEST_SUCCESS=no