Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/rules/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ paths:
- macOS Tests runs the Unit and UI plans in full, with no shard, parallel, iteration or retry flag.
- `core.yml` runs the core on Windows x64 and Arm64 and on macOS, where the same job builds and tests the Swift bindings, and SQL Server's integrated login on Windows x64. The SSH tunnel tests through Windows' OpenSSH Server run on x64; Arm64, whose image installs the server in about 20 minutes, runs them nightly.
- A `v*` tag runs only `release.yml`, a `linux-v*` tag only `release-linux.yml`, a `windows-v*` tag only `release-windows.yml`. The last two also run by dispatch: `release-windows.yml` then publishes nothing (`windows/RELEASING.md`), and `release-linux.yml` publishes nothing with `dry-run` and otherwise uploads a packaging fix (`linux/docs/releasing.md`).
- `windows.yml`'s live job runs the interop tests against MySQL, SQL Server, ClickHouse, Cassandra, MongoDB and Redis on `windows-2025`, beside the x64 job (`windows/docs/decisions/0014-live-server-tests.md`).
- `windows-grid-gate.yml` runs only by dispatch: the Windows data grid's timing and behavior gate on `windows-2025` and `windows-11-arm`, whose numbers vary too much between hosted runners to gate a merge (`windows/docs/decisions/0003-data-grid-control.md`, Gate). `windows.yml` runs the grid's tests on every change.

## Change detector
Expand All @@ -61,7 +62,7 @@ paths:
## Caches

- `~/.spm-cache`, keyed on the app's `Package.resolved`. macOS Tests saves it on a push or nightly miss; Release and the Release Build job only restore it. `~/.spm-cache-ios`, keyed on the iOS project's, is the same for iOS and Package Tests.
- `build-linux.yml`, `core.yml` and `windows.yml` cache Cargo through `Swatinem/rust-cache`, saved from main only (pushes and the nightly), since a pull request's cache serves that pull request alone and evicts main's. They build with line tables only (`CARGO_PROFILE_DEV_DEBUG`), about 30% less cache than full debug info, since every cache shares the repository's 10 GB and the least recently used goes first. A Docker suite's cache is the package's, whichever server release the job runs. `windows.yml` also caches the pinned uniffi-bindgen-cs. `release-windows.yml` restores no cache. No libs or DerivedData cache: the libs download takes about 16 seconds.
- `build-linux.yml`, `core.yml` and `windows.yml` cache Cargo through `Swatinem/rust-cache`, saved from main only (pushes and the nightly), since a pull request's cache serves that pull request alone and evicts main's. They build with line tables only (`CARGO_PROFILE_DEV_DEBUG`), about 30% less cache than full debug info, since every cache shares the repository's 10 GB and the least recently used goes first. A Docker suite's cache is the package's, whichever server release the job runs. `windows.yml`'s live job reads the x64 job's cache and saves none, and the macOS job caches the pinned uniffi-bindgen-cs. `release-windows.yml` restores no cache. No libs or DerivedData cache: the libs download takes about 16 seconds.

## Writing workflow and lint code

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,62 @@ jobs:
exit 1
fi

live:
name: Windows live servers (x64)
# The engines the interop tests reach on a server, beside the x64 job so the budget holds
# (windows/docs/decisions/0014-live-server-tests.md).
runs-on: windows-2025
timeout-minutes: 60
env:
RUSTFLAGS: -D warnings
AWS_LC_SYS_PREBUILT_NASM: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
with:
toolchain: "1.98"
targets: x86_64-pc-windows-msvc
# The x64 test job's cache, which builds the same core: its key is its key input and job id, and this job only reads it.
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
shared-key: windows-x86_64-pc-windows-msvc-test
save-if: false
- name: Drop the emptied DuckDB sources
shell: bash
run: rm -rf target/x86_64-pc-windows-msvc/duckdb-sources target/duckdb-sources
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: 10.0.x
- name: Start MySQL
run: windows/ci/live-servers.ps1 -Server MySql
- name: Start MongoDB
run: windows/ci/live-servers.ps1 -Server MongoDb
- name: Start Redis
run: windows/ci/live-servers.ps1 -Server Redis
- name: Start Cassandra
run: windows/ci/live-servers.ps1 -Server Cassandra
- name: Import a WSL 1 distribution
run: windows/ci/live-servers.ps1 -Server Wsl
- name: Start ClickHouse
run: windows/ci/live-servers.ps1 -Server ClickHouse
- name: Install SQL Server 2022 Express
run: windows/ci/live-servers.ps1 -Server SqlServer
# A missing server fails its tests rather than skipping them.
- name: Live-server tests
working-directory: windows
shell: bash
run: dotnet test --project tests/TablePro.Interop.Tests -- --filter-namespace TablePro.Interop.Tests.Live --fail-skips on
- name: The servers' logs
if: failure()
run: |
Get-Content (Join-Path $env:RUNNER_TEMP 'mysqld.log') -Tail 60 -ErrorAction Continue
Get-Content (Join-Path $env:RUNNER_TEMP 'cassandra-logs\system.log') -Tail 80 -ErrorAction Continue
wsl --distribution tablepro --user root -- tail -n 80 /var/lib/clickhouse/server.log
Get-Content "$env:ProgramFiles\MongoDB\Server\7.0\log\mongod.log" -Tail 40 -ErrorAction Continue
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 3 additions & 70 deletions core/crates/drivers/cassandra/tests/integration/value_corpus.rs
Original file line number Diff line number Diff line change
@@ -1,78 +1,11 @@
//! The CQL value corpus: every native type at its extremes, the
//! collections, and the text the grid shows for each.

use tablepro_test_support::conformance::{CorpusColumn, ValueCorpusEngine};
use tablepro_test_support::conformance::{ValueCorpus, ValueCorpusEngine};

use crate::conformance_engine::CqlEngine;
use crate::support::Server;

impl<S: Server> ValueCorpusEngine for CqlEngine<S> {
fn value_corpus(&self) -> Vec<CorpusColumn> {
vec![
CorpusColumn::new("v int")
.shows("-2147483648", "-2147483648")
.shows("2147483647", "2147483647")
.null(),
CorpusColumn::new("v bigint")
.shows("-9223372036854775808", "-9223372036854775808")
.shows("9223372036854775807", "9223372036854775807"),
CorpusColumn::new("v smallint").shows("-32768", "-32768"),
CorpusColumn::new("v tinyint").shows("127", "127"),
CorpusColumn::new("v varint").shows(
"-123456789012345678901234567890123456789",
"-123456789012345678901234567890123456789",
),
CorpusColumn::new("v decimal")
.shows("-12345.6789", "-12345.6789")
.shows("0.10", "0.10")
.null(),
CorpusColumn::new("v float").shows("1.5", "1.5"),
CorpusColumn::new("v double")
.shows("0.1", "0.1")
.shows("NaN", "NaN")
.shows("-Infinity", "-Infinity"),
CorpusColumn::new("v boolean")
.shows("true", "true")
.shows("false", "false"),
CorpusColumn::new("v text")
.shows("'naïve café'", "naïve café")
.shows("'日本語のテキスト'", "日本語のテキスト")
.shows("'🦀 emoji 👩‍💻'", "🦀 emoji 👩‍💻")
.shows("''", "")
.shows("'it''s'", "it's")
.null(),
CorpusColumn::new("v ascii").shows("'plain'", "plain"),
CorpusColumn::new("v blob")
.shows("0xff00fe", "0xff00fe")
.shows("0x", "0x"),
CorpusColumn::new("v uuid")
.shows(
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174000",
)
.null(),
CorpusColumn::new("v timeuuid").shows(
"50554d6e-29bb-11e5-b345-feff819cdc9f",
"50554d6e-29bb-11e5-b345-feff819cdc9f",
),
CorpusColumn::new("v inet")
.shows("'192.168.0.1'", "192.168.0.1")
.shows("'2001:db8::1'", "2001:db8::1"),
CorpusColumn::new("v date")
.shows("'1970-01-01'", "1970-01-01")
.shows("'2024-02-29'", "2024-02-29"),
CorpusColumn::new("v time")
.shows("'00:00:00'", "00:00:00.000000000")
.shows("'23:59:59.999999999'", "23:59:59.999999999"),
CorpusColumn::new("v timestamp")
.shows("'2024-02-29 12:00:00.123+0000'", "2024-02-29 12:00:00.123+00:00")
.shows("'1970-01-01 00:00:00+0000'", "1970-01-01 00:00:00.000+00:00"),
CorpusColumn::new("v duration").shows("1y2mo3d4h5m6s7ms", "P1Y2M3DT4H5M6.007S"),
CorpusColumn::new("v list<int>").shows("[1, 2, 3]", r#"["1","2","3"]"#),
CorpusColumn::new("v set<text>").shows("{'b', 'a'}", r#"["a","b"]"#),
CorpusColumn::new("v map<text, int>").shows("{'a': 1}", "{'a': 1}"),
CorpusColumn::new("v frozen<tuple<int, text>>").shows("(1, 'x')", r#"["1","x"]"#),
]
fn value_corpus(&self) -> ValueCorpus {
ValueCorpus::Cassandra
}
}

Expand Down
77 changes: 3 additions & 74 deletions core/crates/drivers/clickhouse/tests/integration/value_corpus.rs
Original file line number Diff line number Diff line change
@@ -1,81 +1,10 @@
//! ClickHouse's value corpus: the types a real schema holds, at their
//! extremes, and the text the grid shows for each.

use tablepro_test_support::conformance::{CorpusColumn, ValueCorpusEngine};
use tablepro_test_support::conformance::{ValueCorpus, ValueCorpusEngine};

use crate::conformance_engine::ClickHouseEngine;

impl ValueCorpusEngine for ClickHouseEngine {
fn value_corpus(&self) -> Vec<CorpusColumn> {
vec![
// A DateTime prints the wall time of its column's zone.
CorpusColumn::new("COLUMN v Nullable(DateTime('Asia/Kolkata'))")
.shows("'2024-03-10 02:30:00'", "2024-03-10 02:30:00")
.shows("'1970-01-01 05:30:00'", "1970-01-01 05:30:00")
.null(),
// Nanoseconds in an Int64 end in 2262.
CorpusColumn::new("COLUMN v DateTime64(9, 'UTC')")
.shows("'1900-01-01 00:00:00.000000001'", "1900-01-01 00:00:00.000000001")
.shows("'2262-04-11 23:47:16.854775807'", "2262-04-11 23:47:16.854775807")
.shows("'2024-02-29 12:00:00'", "2024-02-29 12:00:00.000000000"),
CorpusColumn::new("COLUMN v DateTime64(3)")
.shows("'2024-01-01 00:00:00.5'", "2024-01-01 00:00:00.500")
.shows("'2299-12-31 23:59:59.999'", "2299-12-31 23:59:59.999"),
CorpusColumn::new("COLUMN v Date")
.shows("'1970-01-01'", "1970-01-01")
.shows("'2149-06-06'", "2149-06-06"),
CorpusColumn::new("COLUMN v Date32")
.shows("'1900-01-01'", "1900-01-01")
.shows("'2299-12-31'", "2299-12-31"),
CorpusColumn::new("COLUMN v Decimal(76, 38)")
.shows(
"toDecimal256('-12345678901234567890123456789012345678.12345678901234567890123456789012345678', 38)",
"-12345678901234567890123456789012345678.12345678901234567890123456789012345678",
)
.shows("0", "0.00000000000000000000000000000000000000"),
CorpusColumn::new("COLUMN v Nullable(Decimal(9, 2))")
.shows("-1.5", "-1.50")
.null(),
CorpusColumn::new("COLUMN v Int128").shows(
"-170141183460469231731687303715884105728",
"-170141183460469231731687303715884105728",
),
CorpusColumn::new("COLUMN v UInt256").shows(
"'115792089237316195423570985008687907853269984665640564039457584007913129639935'",
"115792089237316195423570985008687907853269984665640564039457584007913129639935",
),
CorpusColumn::new("COLUMN v UInt64").shows("18446744073709551615", "18446744073709551615"),
CorpusColumn::new("COLUMN v Float64")
.shows("0.1", "0.1")
.shows("nan", "NaN")
.shows("-inf", "-Infinity"),
CorpusColumn::new("COLUMN v Float32").shows("1.5", "1.5"),
CorpusColumn::new("COLUMN v Bool").shows("true", "true").shows("false", "false"),
CorpusColumn::new("COLUMN v Nullable(UUID)")
.shows(
"'123e4567-e89b-12d3-a456-426614174000'",
"123e4567-e89b-12d3-a456-426614174000",
)
.null(),
CorpusColumn::new("COLUMN v IPv4").shows("'192.168.0.1'", "192.168.0.1"),
CorpusColumn::new("COLUMN v IPv6").shows("'2001:db8::1'", "2001:db8::1"),
CorpusColumn::new("COLUMN v Enum8('a' = 1, 'b c' = 2)").shows("'b c'", "b c"),
CorpusColumn::new("COLUMN v Nullable(String)")
.shows("'naïve café'", "naïve café")
.shows("'日本語のテキスト'", "日本語のテキスト")
.shows("'🦀 emoji 👩‍💻'", "🦀 emoji 👩‍💻")
.shows("''", "")
.shows("'it\\'s'", "it's")
.shows("'line\\nbreak'", "line\nbreak")
.null(),
CorpusColumn::new("COLUMN v LowCardinality(String)").shows("'low'", "low"),
CorpusColumn::new("COLUMN v FixedString(4)").shows("'ab'", "ab\0\0"),
// A String holds bytes; ones that are not UTF-8 stay bytes.
CorpusColumn::new("COLUMN v String").shows("unhex('FF00FE')", "0xff00fe"),
CorpusColumn::new("COLUMN v Array(Nullable(Int32))").shows("[1, NULL, 3]", r#"["1",null,"3"]"#),
CorpusColumn::new("COLUMN v Map(String, UInt8)").shows("map('a', 1)", r#"{"a":1}"#),
CorpusColumn::new("COLUMN v Tuple(String, Int8)").shows("('x', -1)", r#"["x",-1]"#),
]
fn value_corpus(&self) -> ValueCorpus {
ValueCorpus::Clickhouse
}
}

Expand Down
Loading
Loading