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

Add UUID support in import/export templates #2145

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lagarwal1
Copy link

@lagarwal1 lagarwal1 commented Jan 23, 2025

feat: Add support for importing/exporting UUID columns as strings

Manual Tests in Cloud Devel

Avro

GSQL

Export
Import

Postgres

Export
Import

CSV

GSQL

Export
Import

Postgres

Export
Import

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 51.85185% with 39 lines in your changes missing coverage. Please review.

Project coverage is 46.89%. Comparing base (2631a1d) to head (baae898).

Files with missing lines Patch % Lines
...e/beam/it/gcp/spanner/matchers/SpannerAsserts.java 0.00% 13 Missing ⚠️
...d/teleport/templates/common/SpannerConverters.java 0.00% 4 Missing and 4 partials ⚠️
...oud/teleport/spanner/AvroSchemaToDdlConverter.java 20.00% 3 Missing and 1 partial ⚠️
...le/cloud/teleport/spanner/TextImportTransform.java 0.00% 2 Missing and 2 partials ⚠️
.../apache/beam/sdk/io/gcp/spanner/SpannerSchema.java 0.00% 2 Missing and 2 partials ⚠️
...le/cloud/teleport/spanner/CSVRecordToMutation.java 0.00% 2 Missing ⚠️
...google/cloud/teleport/spanner/ExportTransform.java 0.00% 2 Missing ⚠️
...cloud/teleport/spanner/SpannerRecordConverter.java 77.77% 0 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (63.93%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2145   +/-   ##
=========================================
  Coverage     46.88%   46.89%           
- Complexity     4343     4346    +3     
=========================================
  Files           874      874           
  Lines         52070    52106   +36     
  Branches       5461     5485   +24     
=========================================
+ Hits          24415    24434   +19     
- Misses        25910    25921   +11     
- Partials       1745     1751    +6     
Components Coverage Δ
spanner-templates 68.80% <63.93%> (+<0.01%) ⬆️
spanner-import-export 65.63% <63.93%> (+0.02%) ⬆️
spanner-live-forward-migration 76.50% <ø> (ø)
spanner-live-reverse-replication 78.67% <ø> (ø)
spanner-bulk-migration 87.87% <ø> (ø)
Files with missing lines Coverage Δ
...le/cloud/teleport/spanner/AvroRecordConverter.java 99.69% <ø> (ø)
...teleport/spanner/BuildReadFromTableOperations.java 44.92% <100.00%> (+9.33%) ⬆️
...oud/teleport/spanner/DdlToAvroSchemaConverter.java 93.05% <100.00%> (+0.02%) ⬆️
...gle/cloud/teleport/spanner/TextImportPipeline.java 0.00% <ø> (ø)
...oogle/cloud/teleport/spanner/common/SizedType.java 92.10% <100.00%> (+0.25%) ⬆️
...com/google/cloud/teleport/spanner/common/Type.java 90.74% <100.00%> (+0.42%) ⬆️
.../com/google/cloud/teleport/spanner/ddl/Column.java 84.68% <100.00%> (+0.57%) ⬆️
...google/cloud/teleport/templates/TextToSpanner.java 23.43% <100.00%> (+0.40%) ⬆️
...le/cloud/teleport/spanner/CSVRecordToMutation.java 78.44% <0.00%> (-1.38%) ⬇️
...google/cloud/teleport/spanner/ExportTransform.java 16.00% <0.00%> (ø)
... and 6 more

... and 3 files with indirect coverage changes

@lagarwal1 lagarwal1 changed the title Add UUID support in import/export templates [WIP] Add UUID support in import/export templates Jan 23, 2025
@lagarwal1 lagarwal1 marked this pull request as draft January 23, 2025 08:58
.forEach(
(key, value) -> {
Object newValue = value;
if (value.isNull()) {
Copy link
Author

Choose a reason for hiding this comment

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

this is needed since Value objects null value string rep gives capital NULL which fails with java null value comparison in tests

@lagarwal1 lagarwal1 marked this pull request as ready for review January 29, 2025 17:01
@lagarwal1 lagarwal1 changed the title [WIP] Add UUID support in import/export templates Add UUID support in import/export templates Jan 29, 2025
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.

2 participants