Skip to content

Cassandra Bulk - List and Set - Avro Mapping.#2165

Merged
VardhanThigle merged 2 commits intoGoogleCloudPlatform:mainfrom
VardhanThigle:cassandra
Feb 6, 2025
Merged

Cassandra Bulk - List and Set - Avro Mapping.#2165
VardhanThigle merged 2 commits intoGoogleCloudPlatform:mainfrom
VardhanThigle:cassandra

Conversation

@VardhanThigle
Copy link
Copy Markdown
Contributor

@VardhanThigle VardhanThigle commented Feb 4, 2025

Cassandra Bulk - List and Set - Avro Mapping.

Overview

In bulk migration pipeline, the source rows are mapped to Avro following the unified type mapping (this has been extended by bulk template for Cassandra). The Avro objects are further written to spanner.

This change Discovers and Extracts non-nested List and Set Collections from Cassandra and map them to Avro Array.
Nested list and set collections will unsupported and hence mapped to null as of now.

TODO (In future PRs)

  1. Spanner Writer for Avro Array
  2. Handle Map types

TODO (post MVP)

  1. Handling nested collections

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 55.13%. Comparing base (79c9fe9) to head (3bb82b2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../cassandra/mappings/CassandraMappingsProvider.java 96.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2165      +/-   ##
============================================
+ Coverage     46.91%   55.13%   +8.21%     
+ Complexity     4027     1636    -2391     
============================================
  Files           874      409     -465     
  Lines         52090    22171   -29919     
  Branches       5468     2198    -3270     
============================================
- Hits          24436    12223   -12213     
+ Misses        25906     9232   -16674     
+ Partials       1748      716    -1032     
Components Coverage Δ
spanner-templates 70.37% <98.30%> (+1.54%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 76.50% <ø> (ø)
spanner-live-reverse-replication 78.67% <ø> (ø)
spanner-bulk-migration 87.94% <98.30%> (+0.06%) ⬆️
Files with missing lines Coverage Δ
...eader/io/cassandra/mappings/CassandraMappings.java 100.00% <100.00%> (ø)
...der/io/cassandra/rowmapper/CassandraRowMapper.java 100.00% <ø> (ø)
...sandra/rowmapper/CassandraRowValueArrayMapper.java 100.00% <100.00%> (ø)
.../io/cassandra/schema/CassandraSchemaDiscovery.java 98.30% <100.00%> (+0.05%) ⬆️
...eader/io/schema/typemapping/UnifiedTypeMapper.java 100.00% <ø> (ø)
.../io/schema/typemapping/provider/unified/Array.java 100.00% <100.00%> (ø)
...pping/provider/unified/UnifiedMappingProvider.java 100.00% <100.00%> (ø)
.../cassandra/mappings/CassandraMappingsProvider.java 98.11% <96.00%> (+0.11%) ⬆️

... and 484 files with indirect coverage changes

@VardhanThigle VardhanThigle marked this pull request as ready for review February 4, 2025 10:17
@VardhanThigle VardhanThigle requested a review from a team as a code owner February 4, 2025 10:17
@VardhanThigle VardhanThigle requested review from asthamohta, bharadwaj-aditya and shreyakhajanchi and removed request for asthamohta February 4, 2025 10:17
@Deep1998
Copy link
Copy Markdown
Contributor

Deep1998 commented Feb 5, 2025

Looks good overall, minor nits

@VardhanThigle VardhanThigle merged commit 2adaab6 into GoogleCloudPlatform:main Feb 6, 2025
7 checks passed
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