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

refactor(cdc): refactor parsing of non-builtin Postgres data types #16589

Merged
merged 28 commits into from May 10, 2024

Conversation

StrikeW
Copy link
Contributor

@StrikeW StrikeW commented May 6, 2024

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

What's changed and what's your intention?

close #16580

close #16366

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.

Copy link

gitguardian bot commented May 6, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9425213 Triggered Generic Password 70134ff e2e_test/source/cdc/cdc.validate.postgres.slt View secret
9425213 Triggered Generic Password a99dad6 e2e_test/source/cdc/cdc.validate.postgres.slt View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@StrikeW StrikeW marked this pull request as draft May 6, 2024 14:29
@StrikeW StrikeW changed the title refactor(cdc): refactor parsing of non-builtin Postgres data types (WIP) refactor(cdc): refactor parsing of non-builtin Postgres data types May 7, 2024
@StrikeW StrikeW marked this pull request as ready for review May 7, 2024 05:55
@StrikeW StrikeW added the need-cherry-pick-release-1.9 Open a cherry-pick PR to branch release-1.8 after the current PR is merged label May 7, 2024
@StrikeW StrikeW requested a review from BugenZhao May 8, 2024 02:37
Copy link
Contributor

@xiangjinwu xiangjinwu left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +112 to +113
match ty.kind() {
Kind::Simple => match *ty {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put a comment here:

For array types (Kind::Array), ScalarAdapter is only meant to work as its elements rather than the whole array. The caller shall use Option<Vec<Option<ScalarAdapter>>> rather than Option<ScalarAdapter>.

src/connector/src/parser/scalar_adapter.rs Outdated Show resolved Hide resolved
src/connector/src/parser/scalar_adapter.rs Outdated Show resolved Hide resolved
@StrikeW StrikeW enabled auto-merge May 10, 2024 06:38
@StrikeW StrikeW added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit f343eba May 10, 2024
26 of 28 checks passed
@StrikeW StrikeW deleted the siyuan/cdc-refactor-extra-types branch May 10, 2024 07:45
github-merge-queue bot pushed a commit that referenced this pull request May 10, 2024
@StrikeW StrikeW mentioned this pull request May 14, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-cherry-pick-release-1.9 Open a cherry-pick PR to branch release-1.8 after the current PR is merged type/refactor
Projects
None yet
2 participants