Skip to content

Conversation

ptravers
Copy link
Contributor

@ptravers ptravers commented Aug 7, 2025

Motivation

Tips for reviewer

please note this was started on: #32241

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@ptravers ptravers requested a review from a team as a code owner August 7, 2025 19:11
@ptravers ptravers changed the title 9534 [sql_server] add full sql server test suite Aug 7, 2025
@ptravers ptravers force-pushed the 9534 branch 3 times, most recently from adbeb06 to a7f4bc4 Compare August 7, 2025 21:26
@ptravers ptravers marked this pull request as draft August 7, 2025 21:32
@ptravers ptravers force-pushed the 9534 branch 4 times, most recently from 10b169c to 381fe99 Compare August 13, 2025 13:12
@ptravers ptravers changed the title [sql_server] add full sql server test suite [sql_server] add sql-server-cdc-old-syntax test suite Aug 13, 2025
@ptravers ptravers marked this pull request as ready for review August 13, 2025 15:05
@ptravers ptravers force-pushed the 9534 branch 3 times, most recently from d8f3117 to aceab21 Compare August 13, 2025 21:05
Comment on lines +51 to +59
# SQL Server diverges from Postgres by returning numeric money.
> SELECT pg_typeof(f1) FROM t1 LIMIT 1;
"numeric"

> SELECT * FROM t1;
"922337203685477.58"
"922337203685477.58"
"-922337203685477.58"
"-922337203685477.58"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are deviating here from postgres. I'm assuming that this should be refactored to return text with dollar symbols?

@ptravers ptravers force-pushed the 9534 branch 5 times, most recently from 7c349dc to 41683db Compare August 14, 2025 20:00
@@ -234,7 +234,7 @@ def concurrent_updates(c: Composition) -> None:
args=["--no-reset"],
input=dedent(
f"""
> SELECT COUNT(*) >= {update_rows+initial_rows}, MIN(id), MAX(id) >= {update_rows + update_id_offset - 1} FROM t1;
> SELECT COUNT(*) >= {update_rows + initial_rows}, MIN(id), MAX(id) >= {update_rows + update_id_offset - 1} FROM t1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting changes from ruff when my editor wrote the file to fix some merge conflicts. is it okay to leave them in?

@@ -185,7 +185,7 @@ def workflow_snapshot_consistency(
update_val_offset = 100000
insert_delete = lambda i: dedent(
f"""
INSERT INTO t1 VALUES (999999999,666666666), ({i+update_id_offset}, {i+update_val_offset});
INSERT INTO t1 VALUES (999999999,666666666), ({i + update_id_offset}, {i + update_val_offset});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting changes from ruff when my editor wrote the file to fix some merge conflicts. is it okay to leave them in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind

@ptravers ptravers force-pushed the 9534 branch 2 times, most recently from 2b53b0b to 79a6f9c Compare August 14, 2025 21:15
# See: <https://github.com/microsoft/mssql-docker/issues/864>
queue: hetzner-x86-64-8cpu-16gb

- id: sql-server-cdc-old-syntax
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this to nightly once we have the same coverage in the sql-server-cdc (new syntax) tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha. makes sense.

@@ -185,7 +185,7 @@ def workflow_snapshot_consistency(
update_val_offset = 100000
insert_delete = lambda i: dedent(
f"""
INSERT INTO t1 VALUES (999999999,666666666), ({i+update_id_offset}, {i+update_val_offset});
INSERT INTO t1 VALUES (999999999,666666666), ({i + update_id_offset}, {i + update_val_offset});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind

# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.

# This file is not necessary for SQL Server but included for completeness.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think removing it is better, runs faster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should remove the empty mysql files with $nop in them then.

depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/sql-server-cdc-old-syntax]
parallelism: 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also parallelism: 3

parallelism: 2
plugins:
- ./ci/plugins/mzcompose:
composition: sql-server-cdc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same composition as the "SQL Server CDC tests"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, result of a merge conflict

@@ -695,6 +695,16 @@ steps:
queue: hetzner-aarch64-4cpu-8gb
# the mzbuild postgres version will be used, which depends on the Dockerfile specification

- id: sql-server-cdc-old-syntax
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it both in nightly and test pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure where we would want it.

@ptravers ptravers force-pushed the 9534 branch 2 times, most recently from e4f0718 to a52b205 Compare August 15, 2025 00:21
@def-
Copy link
Contributor

def- commented Aug 15, 2025

As for the timeout in https://buildkite.com/materialize/test/builds/107879#0198ab1a-f76e-4362-83e8-3b8f834ae588

max-slot-wal-keep-size.td:55:1: error: query timed out

You can do $ set-sql-timeout duration=60s if it's expected to take longer.

Copy link
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the flake

@ptravers ptravers enabled auto-merge August 15, 2025 14:10
@ptravers ptravers disabled auto-merge August 15, 2025 14:10
@ptravers ptravers merged commit 9130ef6 into MaterializeInc:main Aug 15, 2025
134 checks passed
@ptravers ptravers deleted the 9534 branch August 15, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants