Add source ddl classes#2525
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2525 +/- ##
============================================
+ Coverage 49.59% 54.71% +5.12%
+ Complexity 4809 1855 -2954
============================================
Files 942 452 -490
Lines 57751 25142 -32609
Branches 6241 2594 -3647
============================================
- Hits 28640 13757 -14883
+ Misses 27063 10560 -16503
+ Partials 2048 825 -1223
🚀 New features to boost your workflow:
|
bharadwaj-aditya
left a comment
There was a problem hiding this comment.
Some of these abstract classes seem like shell implementations. They can be interfaces as well to simplify the structure.
Please add some test cases with edge cases , null handling, missing fields etc.
...main/java/com/google/cloud/teleport/v2/spanner/sourceddl/SourceInformationSchemaScanner.java
Outdated
Show resolved
Hide resolved
...panner-common/src/main/java/com/google/cloud/teleport/v2/spanner/sourceddl/SourceSchema.java
Show resolved
Hide resolved
Thanks, added more test cases and removed the AbstractSourceInformationSchemaScanner for simplicity. The data model classes (SourceSchema, SourceTable, SourceColumn) are abstract classes because they use AutoValue, which allows us to avoid a lot of boiler plate code, so those I have kept as is. |
* Add source ddl classes * Update soruceddl with columna and table getter * Resolve comments
Create classes similar to spanner ddl but for source databases which allows storing the schema for migrations. This would be useful to remove dependency on session file for identifying source types.