Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

feat: support float32#1518

Merged
olavloite merged 8 commits into
mainfrom
float32
Mar 7, 2024
Merged

feat: support float32#1518
olavloite merged 8 commits into
mainfrom
float32

Conversation

@olavloite

Copy link
Copy Markdown
Collaborator

Adds support for the FLOAT32 / real data type.

Adds support for the FLOAT32 / real data type.
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Feb 29, 2024
@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Mar 5, 2024
@olavloite olavloite marked this pull request as ready for review March 5, 2024 09:29
@olavloite olavloite requested review from a team March 5, 2024 09:29
@olavloite olavloite added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 5, 2024
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 5, 2024
@olavloite olavloite requested a review from ankiaga March 5, 2024 11:18
public void setFloat(int parameterIndex, float value) throws SQLException {
checkClosed();
parameters.setParameter(parameterIndex, value, Types.FLOAT);
parameters.setParameter(parameterIndex, value, Types.REAL);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Types.FLOAT is a synonym for Types.DOUBLE in JDBC. Both represent a 64-bit floating point value. Types.REAL is the type code that should be used for 32-bit floating point values.

@olavloite olavloite requested a review from arawind March 5, 2024 11:51

@arawind arawind left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM with minor comments

Comment thread src/main/java/com/google/cloud/spanner/jdbc/JdbcParameterStore.java Outdated
Comment thread src/test/java/com/google/cloud/spanner/jdbc/JdbcParameterStoreTest.java Outdated
Comment thread src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPgNumericTest.java Outdated
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels Mar 7, 2024
@olavloite olavloite added the automerge Merge the pull request once unit tests and other checks pass. label Mar 7, 2024
@olavloite olavloite merged commit 635ac41 into main Mar 7, 2024
@olavloite olavloite deleted the float32 branch March 7, 2024 15:24
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner-jdbc API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants