Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(mssql-cdc): enrich tests and small refactor #18081

Merged
merged 10 commits into from
Aug 21, 2024

Conversation

KeXiangWang
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Add tests for

  1. INCLUDES
  2. Automatically retrieve upstream table schema
  3. More data types, mainly, binary types.

Refactor:

  1. Change SELECT * FROM {} WHERE 1 = 0 to INFORMATION_SCHEMA.COLUMNS-based SQL.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@KeXiangWang KeXiangWang requested a review from StrikeW August 19, 2024 01:29
@github-actions github-actions bot added the component/test Test related issue. label Aug 19, 2024
@KeXiangWang KeXiangWang added this to the release-2.0 milestone Aug 19, 2024
*
) from mssql_source table 'dbo.sqlserver_all_data_types';

sleep 5s
Copy link
Member

Choose a reason for hiding this comment

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

What's the intention of the sleep here? create - sleep - drop looks a little weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, I found if the types found by (*) are wrongly converted to RW types, RW will crash explicitly when consuming the data in the upstream table. I've fixed the found mismatch in this PR. This test sleep 5s is to ensure the data is consumed and the mismatch is encountered so that it can be exposed.

Copy link
Contributor

@StrikeW StrikeW left a comment

Choose a reason for hiding this comment

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

LGTM!

@StrikeW
Copy link
Contributor

StrikeW commented Aug 21, 2024

Shall we pick this PR to release-2.0?

@KeXiangWang
Copy link
Contributor Author

KeXiangWang commented Aug 21, 2024

Shall we pick this PR to release-2.0?

Yes, I think so. I'll confirm with jianwei.

@KeXiangWang KeXiangWang enabled auto-merge August 21, 2024 14:50
@KeXiangWang KeXiangWang disabled auto-merge August 21, 2024 14:57
@KeXiangWang KeXiangWang added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit a4a4583 Aug 21, 2024
34 of 35 checks passed
@KeXiangWang KeXiangWang deleted the wkx/enrich-sql-server-cdc-test branch August 21, 2024 15:43
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants