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

Fixing exception in String .isSplittable #1755

Merged

Conversation

VardhanThigle
Copy link
Contributor

Overview

There's a bug in String handling that causes a typecasting exception which checkin if a string is splittable.

Root Cause of the Bug

For string, the boundary extractor was created of type long.
This did not trigger while testing a small migration of few strings in different languages as there was no need to check if the range is splittable.

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.46%. Comparing base (bbf744f) to head (538071b).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1755      +/-   ##
============================================
+ Coverage     42.58%   49.46%   +6.87%     
+ Complexity     3364     1092    -2272     
============================================
  Files           815      337     -478     
  Lines         47672    18204   -29468     
  Branches       5107     1844    -3263     
============================================
- Hits          20301     9004   -11297     
+ Misses        25717     8593   -17124     
+ Partials       1654      607    -1047     
Components Coverage Δ
spanner-templates 64.64% <100.00%> (+0.07%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 75.00% <ø> (ø)
spanner-live-reverse-replication 51.96% <ø> (ø)
spanner-bulk-migration 83.45% <100.00%> (ø)
Files Coverage Δ
...niformsplitter/range/BoundaryExtractorFactory.java 100.00% <100.00%> (ø)

... and 494 files with indirect coverage changes

@VardhanThigle VardhanThigle merged commit b15801a into GoogleCloudPlatform:main Jul 29, 2024
11 of 13 checks passed
damccorm pushed a commit that referenced this pull request Aug 3, 2024
* adding logging to test schemmap

* open schemmap prtection

* Handling for String Primary Keys in Bulk Reader. (#1743)

Limitation: For the current PR complete support only upto 3 byte code points.

* Add support for ALO in SpannerChangeStreamsToBigQuery template (#1750)

* Fixing exception in String .isSplittable (#1755)

* Remove PIP_NO_DEPS from YamlTemplate Dockerfile (#1748)

Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>

* Terraform template updates for custom transformation (#1746)

* terraform changes for end-to-end template

* terraform updates

* formatting fix

* Add string mapper case for IT (#1757)

* Fixing Index Discovery for 5.7 and removing innodb_parallel_read_threads from init sequences for MySql5.7 compliance. (#1758)

* adding schema map to dml handler

* removing logs for testing

* ut for reverse replication shadow tables (#1759)

* ut for reverse replication shadow tables

* incorporated review comments

* unit test for source writer (#1749)

* source writer unit test

* added git configs for new template

* added spanner pr workflow

* added spanner pr workflow

* added spanner pr workflow

* Adding autoReconnect parameters to URL (#1760)

* map should not be static

* merging

* adding logging to test schemmap

* open schemmap prtection

* adding schema map to dml handler

* removing logs for testing

* map should not be static

* linebreaks

---------

Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
Co-authored-by: Vardhan Vinay Thigle <39047439+VardhanThigle@users.noreply.github.com>
Co-authored-by: Dip Patel <37777672+Dippatel98@users.noreply.github.com>
Co-authored-by: Jeff Kinard <jeff@thekinards.com>
Co-authored-by: shreyakhajanchi <92910380+shreyakhajanchi@users.noreply.github.com>
Co-authored-by: Deep1998 <deepchowdhury1998@gmail.com>
Co-authored-by: aksharauke <126752897+aksharauke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants