This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
The following commit(s) were added to refs/heads/main by this push:
new f122bf2 Prepare for pypi and cargo release (#58)
f122bf2 is described below
commit f122bf228be15114a13c998ef14f1717899e8dbc
Author: Pranav Toggi <[email protected]>
AuthorDate: Tue Oct 28 12:36:59 2025 -0700
Prepare for pypi and cargo release (#58)
* prepare for pypi and cargo release
* update cargo tomls
* update descriptions to reflect SpatialBench terminology
---
.github/ISSUE_TEMPLATE/feature_request.md | 2 +-
.github/workflows/build-py-packages.yml | 105 +++++++++++++++
.../workflows/spatialbench-cli-publish-pypi.yml | 146 +++------------------
.github/workflows/spatialbench-publish-crates.yml | 33 +++++
Cargo.toml | 6 +-
spatialbench-arrow/Cargo.toml | 6 +-
spatialbench-cli/Cargo.toml | 2 +-
spatialbench-cli/README.md | 2 +-
spatialbench-cli/pyproject.toml | 2 +-
spatialbench-cli/src/main.rs | 29 +---
spatialbench-cli/src/plan.rs | 4 +-
spatialbench/Cargo.toml | 6 +-
spatialbench/src/distribution.rs | 8 +-
spatialbench/src/generators.rs | 8 +-
spatialbench/src/lib.rs | 6 +-
spatialbench/src/random.rs | 22 ++--
spatialbench/src/text.rs | 4 +-
17 files changed, 199 insertions(+), 192 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md
b/.github/ISSUE_TEMPLATE/feature_request.md
index 8e84346..7e6c395 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -3,7 +3,7 @@ name: Feature request
about: 'Suggest a performance or feature improvement '
title: "[FEATURE]"
labels: enhancement
-assignees: clflushopt
+assignees: prantogg
---
diff --git a/.github/workflows/build-py-packages.yml
b/.github/workflows/build-py-packages.yml
new file mode 100644
index 0000000..f45f26e
--- /dev/null
+++ b/.github/workflows/build-py-packages.yml
@@ -0,0 +1,105 @@
+name: Build Python Packages
+
+on:
+ workflow_call:
+ inputs:
+ upload-artifacts:
+ description: "Whether to upload built distributions as artifacts"
+ required: false
+ default: false
+ type: boolean
+
+jobs:
+ wheels:
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ include:
+ # Linux manylinux
+ - runner: ubuntu-22.04
+ target: x86_64
+ manylinux: auto
+ os: linux
+ - runner: ubuntu-22.04
+ target: x86
+ manylinux: auto
+ os: linux
+ - runner: ubuntu-22.04
+ target: aarch64
+ manylinux: auto
+ os: linux
+ - runner: ubuntu-22.04
+ target: armv7
+ manylinux: auto
+ os: linux
+ - runner: ubuntu-22.04
+ target: ppc64le
+ manylinux: auto
+ os: linux
+
+ # Linux musllinux
+ - runner: ubuntu-22.04
+ target: x86_64
+ manylinux: musllinux_1_2
+ os: musllinux
+ - runner: ubuntu-22.04
+ target: x86
+ manylinux: musllinux_1_2
+ os: musllinux
+ - runner: ubuntu-22.04
+ target: aarch64
+ manylinux: musllinux_1_2
+ os: musllinux
+ - runner: ubuntu-22.04
+ target: armv7
+ manylinux: musllinux_1_2
+ os: musllinux
+
+ # Windows
+ - runner: windows-latest
+ target: x64
+ os: windows
+ - runner: windows-latest
+ target: x86
+ os: windows
+
+ # macOS
+ - runner: macos-13
+ target: x86_64
+ os: macos
+ - runner: macos-14
+ target: aarch64
+ os: macos
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Build wheels
+ uses: PyO3/maturin-action@v1
+ with:
+ target: ${{ matrix.target }}
+ args: --release --out dist
+ working-directory: spatialbench-cli
+ manylinux: ${{ matrix.manylinux || '' }}
+ - name: Upload wheels
+ if: ${{ inputs.upload-artifacts }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
+ path: spatialbench-cli/dist
+
+ sdist:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Build sdist
+ uses: PyO3/maturin-action@v1
+ with:
+ command: sdist
+ args: --out dist
+ working-directory: spatialbench-cli
+ - name: Upload sdist
+ if: ${{ inputs.upload-artifacts }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: wheels-sdist
+ path: spatialbench-cli/dist
\ No newline at end of file
diff --git a/.github/workflows/spatialbench-cli-publish-pypi.yml
b/.github/workflows/spatialbench-cli-publish-pypi.yml
index c95126e..679da96 100644
--- a/.github/workflows/spatialbench-cli-publish-pypi.yml
+++ b/.github/workflows/spatialbench-cli-publish-pypi.yml
@@ -9,144 +9,40 @@ permissions:
contents: read
jobs:
- linux:
- runs-on: ${{ matrix.platform.runner }}
- strategy:
- matrix:
- platform:
- - runner: ubuntu-22.04
- target: x86_64
- - runner: ubuntu-22.04
- target: x86
- - runner: ubuntu-22.04
- target: aarch64
- - runner: ubuntu-22.04
- target: armv7
- - runner: ubuntu-22.04
- target: s390x
- - runner: ubuntu-22.04
- target: ppc64le
- steps:
- - uses: actions/checkout@v4
- - name: Build wheels
- uses: PyO3/maturin-action@v1
- with:
- target: ${{ matrix.platform.target }}
- args: --release --out dist
- working-directory: spatialbench-cli
- manylinux: auto
- - name: Upload wheels
- uses: actions/upload-artifact@v4
- with:
- name: wheels-linux-${{ matrix.platform.target }}
- path: spatialbench-cli/dist
-
- musllinux:
- runs-on: ${{ matrix.platform.runner }}
- strategy:
- matrix:
- platform:
- - runner: ubuntu-22.04
- target: x86_64
- - runner: ubuntu-22.04
- target: x86
- - runner: ubuntu-22.04
- target: aarch64
- - runner: ubuntu-22.04
- target: armv7
- steps:
- - uses: actions/checkout@v4
- - name: Build wheels
- uses: PyO3/maturin-action@v1
- with:
- target: ${{ matrix.platform.target }}
- args: --release --out dist
- working-directory: spatialbench-cli
- manylinux: musllinux_1_2
- - name: Upload wheels
- uses: actions/upload-artifact@v4
- with:
- name: wheels-musllinux-${{ matrix.platform.target }}
- path: spatialbench-cli/dist
-
- windows:
- runs-on: ${{ matrix.platform.runner }}
- strategy:
- matrix:
- platform:
- - runner: windows-latest
- target: x64
- - runner: windows-latest
- target: x86
- steps:
- - uses: actions/checkout@v4
- - name: Build wheels
- uses: PyO3/maturin-action@v1
- with:
- target: ${{ matrix.platform.target }}
- args: --release --out dist
- working-directory: spatialbench-cli
- - name: Upload wheels
- uses: actions/upload-artifact@v4
- with:
- name: wheels-windows-${{ matrix.platform.target }}
- path: spatialbench-cli/dist
-
- macos:
- runs-on: ${{ matrix.platform.runner }}
- strategy:
- matrix:
- platform:
- - runner: macos-13
- target: x86_64
- - runner: macos-14
- target: aarch64
- steps:
- - uses: actions/checkout@v4
- - name: Build wheels
- uses: PyO3/maturin-action@v1
- with:
- target: ${{ matrix.platform.target }}
- args: --release --out dist
- working-directory: spatialbench-cli
- - name: Upload wheels
- uses: actions/upload-artifact@v4
- with:
- name: wheels-macos-${{ matrix.platform.target }}
- path: spatialbench-cli/dist
-
- sdist:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Build sdist
- uses: PyO3/maturin-action@v1
- with:
- command: sdist
- args: --out dist
- working-directory: spatialbench-cli
- - name: Upload sdist
- uses: actions/upload-artifact@v4
- with:
- name: wheels-sdist
- path: spatialbench-cli/dist
+ build:
+ uses: ./.github/workflows/build-py-packages.yml
+ with:
+ upload-artifacts: true
release:
name: Release
runs-on: ubuntu-latest
environment: pypi
- needs: [linux, musllinux, windows, macos, sdist]
+ needs: [build]
permissions:
id-token: write # Use to sign the release artifacts and for pypi trusted
publishing
attestations: write # Used to generate artifact attestation
steps:
- - uses: actions/download-artifact@v4
+ - name: Download all build artifacts
+ uses: actions/download-artifact@v4
+ with:
+ pattern: '*'
+ merge-multiple: true
+ path: dist
+
+ - name: Install twine
+ run: python -m pip install --upgrade twine
+
+ - name: Check distributions
+ run: python -m twine check --strict dist/*
+
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
- subject-path: 'wheels-*/*'
+ subject-path: 'dist/*'
+
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
- args: --non-interactive --skip-existing wheels-*/*
+ args: --non-interactive --skip-existing dist/*
\ No newline at end of file
diff --git a/.github/workflows/spatialbench-publish-crates.yml
b/.github/workflows/spatialbench-publish-crates.yml
new file mode 100644
index 0000000..fe9221e
--- /dev/null
+++ b/.github/workflows/spatialbench-publish-crates.yml
@@ -0,0 +1,33 @@
+name: spatialbench-publish-crates.yml
+
+on:
+ release:
+ types: [created]
+ workflow_dispatch:
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment: release
+ permissions:
+ id-token: write # Required for OIDC token exchange
+ strategy:
+ # Publish package one by one instead of flooding the registry
+ max-parallel: 1
+ matrix:
+ # Order here is sensitive, as it will be used to determine the order
of publishing
+ package:
+ - "spatialbench"
+ - "spatialbench-arrow"
+ - "spatialbench-cli"
+ steps:
+ - uses: actions/checkout@v5
+
+ - uses: rust-lang/crates-io-auth-action@v1
+ id: auth
+
+ - name: Publish ${{ matrix.package }}
+ working-directory: ${{ matrix.package }}
+ run: cargo publish
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
\ No newline at end of file
diff --git a/Cargo.toml b/Cargo.toml
index 19cbd9a..0d419ef 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,12 +5,12 @@ members = ["spatialbench", "spatialbench-arrow",
"spatialbench-cli"]
resolver = "2"
[workspace.package]
-authors = ["clflushopt", "alamb"]
+authors = ["Apache Sedona <[email protected]>"]
edition = "2021"
-homepage = "https://github.com/wherobots/sedona-spatialbench"
+homepage = "https://github.com/apache/sedona-spatialbench/"
license = "Apache-2.0"
readme = "README.md"
-repository = "https://github.com/wherobots/sedona-spatialbench"
+repository = "https://github.com/apache/sedona-spatialbench/"
version = "1.1.1"
[workspace.dependencies]
diff --git a/spatialbench-arrow/Cargo.toml b/spatialbench-arrow/Cargo.toml
index 5a6a686..8b0fbe6 100644
--- a/spatialbench-arrow/Cargo.toml
+++ b/spatialbench-arrow/Cargo.toml
@@ -2,9 +2,9 @@
name = "spatialbench-arrow"
version = "1.1.1"
edition = "2024"
-authors = ["clflushopt", "alamb"]
-description = "TPC-H data generator into Apache Arrow format"
-repository = "https://github.com/wherobots/sedona-spatialbench"
+authors = ["Apache Sedona <[email protected]>"]
+description = "SpatialBench data generator into Apache Arrow format"
+repository = "https://github.com/apache/sedona-spatialbench"
readme = "README.md"
license = "Apache-2.0"
diff --git a/spatialbench-cli/Cargo.toml b/spatialbench-cli/Cargo.toml
index 5c568b6..a3c8e87 100644
--- a/spatialbench-cli/Cargo.toml
+++ b/spatialbench-cli/Cargo.toml
@@ -2,7 +2,7 @@
name = "spatialbench-cli"
version = "1.1.1"
authors = { workspace = true }
-description = "Blazing fast pure Rust TPC-H data generator command line tool."
+description = "Blazing fast pure Rust SpatialBench data generator command line
tool."
readme = "README.md"
edition = { workspace = true }
homepage = { workspace = true }
diff --git a/spatialbench-cli/README.md b/spatialbench-cli/README.md
index 84f8cca..416a355 100644
--- a/spatialbench-cli/README.md
+++ b/spatialbench-cli/README.md
@@ -1,6 +1,6 @@
# SpatialBench Data Generator CLI
-See the main [README.md](https://github.com/wherobots/sedona-spatialbench) for
full documentation.
+See the main [README.md](https://github.com/apache/sedona-spatialbench) for
full documentation.
## Installation
diff --git a/spatialbench-cli/pyproject.toml b/spatialbench-cli/pyproject.toml
index 2edba14..54b7366 100644
--- a/spatialbench-cli/pyproject.toml
+++ b/spatialbench-cli/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "maturin"
[project]
name = "spatialbench-cli"
-dynamic = ["version"]
+dynamic = ["version", "readme", "license", "authors"]
description = "Python CLI for Spatial Bench data generator"
requires-python = ">=3.8"
diff --git a/spatialbench-cli/src/main.rs b/spatialbench-cli/src/main.rs
index 01a2f9d..e1b5c4c 100644
--- a/spatialbench-cli/src/main.rs
+++ b/spatialbench-cli/src/main.rs
@@ -39,34 +39,7 @@ use std::time::Instant;
#[derive(Parser)]
#[command(name = "spatialbench")]
#[command(version)]
-#[command(
- // -h output
- about = "TPC-H Data Generator",
- // --help output
- long_about = r#"
-TPCH Data Generator (https://github.com/clflushopt/spatialbench-rs)
-
-By default each table is written to a single file named
<output_dir>/<table>.<format>
-
-If `--part` option is specified, each table is written to a subdirectory in
-multiple files named <output_dir>/<table>/<table>.<part>.<format>
-
-Examples
-
-# Generate all tables at scale factor 1 (1GB) in TBL format to /tmp/tpch
directory:
-
-spatialbench-cli -s 1 --output-dir=/tmp/tpch
-
-# Generate the lineitem table at scale factor 100 in 10 Apache Parquet files to
-# /tmp/tpch/lineitem
-
-spatialbench-cli -s 100 --tables=lineitem --format=parquet --parts=10
--output-dir=/tmp/tpch
-
-# Generate scale factor one in current directory, seeing debug output
-
-RUST_LOG=debug spatialbench -s 1
-"#
-)]
+#[command(about = "SpatialBench Data Generator", long_about = None)]
struct Cli {
/// Scale factor to create
#[arg(short, long, default_value_t = 1.)]
diff --git a/spatialbench-cli/src/plan.rs b/spatialbench-cli/src/plan.rs
index a1d11f9..fceace9 100644
--- a/spatialbench-cli/src/plan.rs
+++ b/spatialbench-cli/src/plan.rs
@@ -237,7 +237,7 @@ impl OutputSize {
) -> Self {
let row_count = Self::row_count_for_table(table, scale_factor);
- // The average row size in bytes for each table in the TPC-H schema
+ // The average row size in bytes for each table in the SpatialBench
schema
// this was determined by sampling the data
let avg_row_size_bytes = match format {
OutputFormat::Tbl | OutputFormat::Csv => match table {
@@ -355,7 +355,7 @@ impl OutputSize {
mod tests {
use super::*;
- // Default layouts for generating TPC-H tables (tbl/csv format)
+ // Default layouts for generating SpatialBench tables (tbl/csv format)
// These tests explain the default layouts for each table (e.g. row groups
in parquet)
mod default_layouts {
diff --git a/spatialbench/Cargo.toml b/spatialbench/Cargo.toml
index a3c123c..5242d35 100644
--- a/spatialbench/Cargo.toml
+++ b/spatialbench/Cargo.toml
@@ -1,8 +1,8 @@
[package]
name = "spatialbench"
-authors = ["clflushopt", "alamb"]
-description = "Blazing fast pure Rust no dependency TPC-H data generation
library."
-repository = "https://github.com/wherobots/sedona-spatialbench"
+authors = ["Apache Sedona <[email protected]>"]
+description = "Blazing fast pure Rust Spatial Bench data generation library."
+repository = "https://github.com/apache/sedona-spatialbench"
readme = { workspace = true }
version = { workspace = true }
edition = { workspace = true }
diff --git a/spatialbench/src/distribution.rs b/spatialbench/src/distribution.rs
index 222800e..e6455d6 100644
--- a/spatialbench/src/distribution.rs
+++ b/spatialbench/src/distribution.rs
@@ -4,10 +4,10 @@ use std::{
sync::LazyLock,
};
-/// TPC-H distributions seed file.
+/// SpatialBench distributions seed file.
pub(crate) const DISTS_SEED: &str = include_str!("dists.dss");
-/// Distribution represents a weighted collection of string values from the
TPC-H specification.
+/// Distribution represents a weighted collection of string values from the
SpatialBench specification.
/// It provides methods to access values by index or randomly based on their
weights.
#[derive(Debug, Clone, Default)]
pub struct Distribution {
@@ -171,7 +171,7 @@ impl Distribution {
static DEFAULT_DISTRIBUTIONS: LazyLock<Distributions> =
LazyLock::new(|| Distributions::try_load_default().unwrap());
-/// Distributions wraps all TPC-H distributions and provides methods to access
them.
+/// Distributions wraps all SpatialBench distributions and provides methods to
access them.
#[derive(Debug, Clone, Default)]
pub struct Distributions {
articles: Distribution,
@@ -245,7 +245,7 @@ impl Distributions {
/// Loads distributions from a stream of lines.
///
- /// The format is expected to follow the TPC-H specification format where:
+ /// The format is expected to follow the SpatialBench specification format
where:
/// - Lines starting with `"#"` are comments
/// - Distributions start with `"BEGIN <name>"`
/// - Distribution entries are formatted as `"value|weight"`
diff --git a/spatialbench/src/generators.rs b/spatialbench/src/generators.rs
index 476cbd6..b7319e2 100644
--- a/spatialbench/src/generators.rs
+++ b/spatialbench/src/generators.rs
@@ -56,7 +56,7 @@ impl Display for VehicleBrandName {
/// The VEHICLE table
///
/// The Display trait is implemented to format the line item data as a string
-/// in the default TPC-H 'tbl' format.
+/// in the default SpatialBench 'tbl' format.
///
/// ```text
/// 1|goldenrod lavender spring chocolate lace|Manufacturer#1|Brand#13|PROMO
BURNISHED COPPER|7|JUMBO PKG|901.00|ly. slyly ironi|
@@ -316,7 +316,7 @@ impl Display for DriverName {
/// Records for the Driver table.
///
/// The Display trait is implemented to format the line item data as a string
-/// in the default TPC-H 'tbl' format.
+/// in the default SpatialBench 'tbl' format.
///
/// ```text
/// 1|Driver#000000001| N kD4on9OM
Ipw3,gf0JBoQDd7tgrzrddZ|17|27-918-335-1736|5755.94|each slyly above the careful|
@@ -607,7 +607,7 @@ impl Display for CustomerName {
/// The CUSTOMER table
///
/// The Display trait is implemented to format the line item data as a string
-/// in the default TPC-H 'tbl' format.
+/// in the default SpatialBench 'tbl' format.
///
/// ```text
/// 1|Customer#000000001|IVhzIApeRb
ot,c,E|15|25-989-741-2988|711.56|BUILDING|to the even, regular platelets.
regular, ironic epitaphs nag e|
@@ -818,7 +818,7 @@ impl<'a> Iterator for CustomerGeneratorIterator<'a> {
/// The TRIP table (fact table)
///
/// The Display trait is implemented to format the trip data as a string
-/// in the default TPC-H 'tbl' format.
+/// in the default SpatialBench 'tbl' format.
///
/// ```text
/// 1|150|342|78|2023-04-12 08:30:15|2023-04-12 09:15:42|25.50|4.50|30.00|12.7|
diff --git a/spatialbench/src/lib.rs b/spatialbench/src/lib.rs
index afbdcb9..fc33931 100644
--- a/spatialbench/src/lib.rs
+++ b/spatialbench/src/lib.rs
@@ -1,7 +1,7 @@
//! Rust Spatial Bench Data Generator
//!
//! This crate provides a native Rust implementation of functions and utilities
-//! necessary for generating the TPC-H benchmark dataset in several popular
+//! necessary for generating the SpatialBench benchmark dataset in several
popular
//! formats.
//!
//! # Example: TBL output format
@@ -27,7 +27,7 @@
//! );
//! ```
//!
-//! The TPC-H dataset is composed of several tables with foreign key relations
+//! The SpatialBench dataset is composed of several tables with foreign key
relations
//! between them. For each table we implement and expose a generator that uses
//! the iterator API to produce structs e.g [`Trip`] that represent a single
//! row.
@@ -49,7 +49,7 @@
//! on other Rust crates. It is focused entire on the core
//! generation logic.
//!
-//! If you want an easy way to generate the TPC-H dataset for usage with
external
+//! If you want an easy way to generate the SpatialBench dataset for usage
with external
//! systems you can use CLI tool instead.
pub mod csv;
pub mod dates;
diff --git a/spatialbench/src/random.rs b/spatialbench/src/random.rs
index 12222c6..2123652 100644
--- a/spatialbench/src/random.rs
+++ b/spatialbench/src/random.rs
@@ -11,9 +11,9 @@ pub struct RowRandomInt {
}
impl RowRandomInt {
- /// The default multiplier value is a TPC-H constant.
+ /// The default multiplier value is a SpatialBench constant.
const MULTIPLIER: i64 = 16807;
- /// Modulus value is a TPC-H constant 2^31 - 1.
+ /// Modulus value is a SpatialBench constant 2^31 - 1.
const MODULUS: i64 = 2147483647;
/// Default seed value as specified in CMU's benchbase.
const DEFAULT_SEED: i64 = 19620718;
@@ -105,14 +105,14 @@ pub struct RowRandomLong {
}
impl RowRandomLong {
- /// The default multiplier value is a TPC-H constant.
+ /// The default multiplier value is a SpatialBench constant.
const MULTIPLIER: i64 = 6364136223846793005;
/// The default increment used.
const INCREMENT: i64 = 1;
- /// The default multiplier for 32-bit seeds (a TPC-H oddity).
+ /// The default multiplier for 32-bit seeds (a SpatialBench oddity).
const MULTIPLIER_32: i64 = 16807;
- /// The default modulus for 32-bit seeds (a TPC-H oddity).
+ /// The default modulus for 32-bit seeds (a SpatialBench oddity).
const MODULUS_32: i64 = 2147483647;
/// Instantiates a new random number generator with the specified seed and
number of random
@@ -144,7 +144,7 @@ impl RowRandomLong {
/// Signals that all seeds for the current row have been consumed and we
need to start
/// generating new ones.
pub fn row_finished(&mut self) {
- // For the 64-bit case, TPC-H actually uses the 32-bit advance method
+ // For the 64-bit case, SpatialBench actually uses the 32-bit advance
method
self.advance_seed_32((self.seeds_per_row - self.usage) as i64);
self.usage = 0;
}
@@ -160,7 +160,7 @@ impl RowRandomLong {
self.advance_seed_32((self.seeds_per_row as i64) * row_count);
}
- // TPC-H uses this 32-bit method even for 64-bit numbers
+ // SpatialBench uses this 32-bit method even for 64-bit numbers
fn advance_seed_32(&mut self, mut count: i64) {
let mut multiplier: i64 = Self::MULTIPLIER_32;
@@ -308,7 +308,7 @@ impl RandomAlphaNumeric {
const ALPHA_NUMERIC: &'static [u8] =
b"0123456789abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ,";
- // Length multipliers from TPC-H spec
+ // Length multipliers from SpatialBench spec
const LOW_LENGTH_MULTIPLIER: f64 = 0.4;
const HIGH_LENGTH_MULTIPLIER: f64 = 1.6;
@@ -395,14 +395,14 @@ impl Display for RandomAlphaNumericInstance {
}
}
-/// Generates phone numbers according to TPC-H spec
+/// Generates phone numbers according to SpatialBench spec
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct RandomPhoneNumber {
inner: RowRandomInt,
}
impl RandomPhoneNumber {
- // Maximum number of nations in TPC-H
+ // Maximum number of nations in SpatialBench
const NATIONS_MAX: i32 = 90;
pub fn new(seed: i64) -> Self {
@@ -577,7 +577,7 @@ impl Display for StringSequenceInstance<'_> {
}
}
-/// Generates random text according to TPC-H spec
+/// Generates random text according to SpatialBench spec
#[derive(Debug, Clone)]
pub struct RandomText<'a> {
inner: RowRandomInt,
diff --git a/spatialbench/src/text.rs b/spatialbench/src/text.rs
index e3fbd7a..af14539 100644
--- a/spatialbench/src/text.rs
+++ b/spatialbench/src/text.rs
@@ -1,6 +1,6 @@
//! Implementation of text pool and text generation.
//!
-//! Most of this code has been ported from the Apache Trino TPC-H generator
+//! Most of this code has been ported from the Apache Trino SpatialBench
generator
//! implementation. The original code can be found in the following link:
//!
//!
<https://github.com/trinodb/tpch/blob/master/src/main/java/io/trino/tpch/TextPool.java>
@@ -8,7 +8,7 @@
use crate::{distribution::Distributions, random::RowRandomInt};
use std::sync::OnceLock;
-/// Pool of random text that follows TPC-H grammar.
+/// Pool of random text that follows SpatialBench grammar.
#[derive(Debug, Clone)]
pub struct TextPool {
/// Bytes making up the text pool, exact size.