Skip to content

Added VIRTUAL column support to PG dataflow#2167

Merged
darshan-sj merged 3 commits intoGoogleCloudPlatform:mainfrom
atask-g:pg-virtual
Feb 7, 2025
Merged

Added VIRTUAL column support to PG dataflow#2167
darshan-sj merged 3 commits intoGoogleCloudPlatform:mainfrom
atask-g:pg-virtual

Conversation

@atask-g
Copy link
Copy Markdown
Contributor

@atask-g atask-g commented Feb 6, 2025

  • added support for VIRTUAL keyword for PG non-stored columns
  • added unit and integration tests
  • ran manual tests in staging and prod

R:@n-d-joshi
R:@darshan-sj

@atask-g atask-g requested a review from a team as a code owner February 6, 2025 13:30
@n-d-joshi
Copy link
Copy Markdown
Contributor

LGTM on these changes. We will also need to have some tests for FTS - will follow up with you offline on those.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.94%. Comparing base (79c9fe9) to head (fc37842).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2167      +/-   ##
============================================
+ Coverage     46.91%   46.94%   +0.03%     
- Complexity     4027     4036       +9     
============================================
  Files           874      876       +2     
  Lines         52090    52128      +38     
  Branches       5468     5470       +2     
============================================
+ Hits          24436    24472      +36     
- Misses        25906    25907       +1     
- Partials       1748     1749       +1     
Components Coverage Δ
spanner-templates 68.87% <100.00%> (+0.05%) ⬆️
spanner-import-export 65.68% <100.00%> (-0.03%) ⬇️
spanner-live-forward-migration 76.50% <ø> (ø)
spanner-live-reverse-replication 78.67% <ø> (ø)
spanner-bulk-migration 87.94% <ø> (+0.06%) ⬆️
Files with missing lines Coverage Δ
.../com/google/cloud/teleport/spanner/ddl/Column.java 84.40% <100.00%> (+0.29%) ⬆️

... and 10 files with indirect coverage changes

Copy link
Copy Markdown
Contributor

@darshan-sj darshan-sj left a comment

Choose a reason for hiding this comment

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

No changes are required in InformationSchemaScanner?
Is the feature released in production?
Also, no keyword at the end of the expression currently is defaulted to VIRTUAL ? If so, I'm trying to understand why this change is needed.

@atask-g
Copy link
Copy Markdown
Contributor Author

atask-g commented Feb 7, 2025

Replying to previous comment inline:

  • No changes are required in InformationSchemaScanner?
    • No, this is only needed in the pretty printing of the column to indicate a non-stored generated column. In INFORMATION_SCHEMA it's represented as isStored == false.
  • Is the feature released in production?
    • Yes, I also confirmed by manually testing in prod.
  • Also, no keyword at the end of the expression currently is defaulted to VIRTUAL ? If so, I'm trying to understand why this change is needed.
    • This change is only needed for PG, in GSQL the absence of STORED indicates non-stored. In PG, VIRTUAL indicates non-stored. So, if the STORED keyword is not specified, then the VIRTUAL keyword must be provided.

Copy link
Copy Markdown
Contributor

@darshan-sj darshan-sj left a comment

Choose a reason for hiding this comment

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

LGTM

@darshan-sj darshan-sj added improvement Making existing code better and removed ignore-for-release labels Feb 7, 2025
@darshan-sj darshan-sj merged commit 33e76c6 into GoogleCloudPlatform:main Feb 7, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants