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

Adding NUMERIC type using refactoring improvements and code auto-generation #3

Draft
wants to merge 7 commits into
base: refactor2
Choose a base branch
from

Conversation

gunjan-juyal
Copy link
Owner

Adding NUMERIC type using refactoring improvements and code auto-generation. This type was previously manually removed, and adding it back using the auto-generation framework and refactored codebase will help with measuring the benefits of these changes

Individual commits in this PR will highlight the main steps in the workflow:

  1. Auto-generate code for a new NUMERIC type without any manual modifications to the generated code
  2. Review and tweaks (if needed) to the auto-generated code, along with adding the manual mappings and converters that will encapsulate most of the type-specific logic
  3. Add tests - As of now this is still manual, but improvements to tests is planned for a future improvement

…ns to the generated code; code tweaks will be done in a following commit.

This type was previously manually removed, and adding it back using the auto-generation framework and refactored codebase will help with measuring the benefits of these changes
This commit builds on top of the auto-generated code for NUMERIC type and adds:
 - A converter implementation containing most of the value-representation logic.
 - Code formatting cleanup and minor fixes in the autogenerated code
The NUMERIC type was deleted to demonstrate the Java library simplification changes when adding them back. Test simplification was out of scope of the initial work, hence the old tests are now being added back as-they-were.
…for wire-protocol-to-type conversion logic in Key construction
@gunjan-juyal gunjan-juyal marked this pull request as draft February 4, 2024 08:10
…g_new_framework

# Conflicts:
#	google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsTest.java
#	google-cloud-spanner/src/test/java/com/google/cloud/spanner/ValueBinderTest.java
#	google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RandomResultSetGenerator.java
#	google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ReadWriteTransactionTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant