Skip to content

feat: make guess types configurable #347

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

Merged
merged 5 commits into from
Sep 25, 2022
Merged

Conversation

olavloite
Copy link
Collaborator

@olavloite olavloite commented Sep 8, 2022

Makes the 'guess types' feature configurable and only enabled by default for JDBC. The reason that this is required for JDBC is that JDBC can use a couple of legacy date/time classes (java.sql.Date and java.sql.Timestamp). These are always sent as untyped parameters by JDBC, which means that we some times need to guess the type based purely on the value that we receive.

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #347 (850108b) into postgresql-dialect (0cedf15) will increase coverage by 0.07%.
The diff coverage is 96.96%.

@@                   Coverage Diff                    @@
##             postgresql-dialect     #347      +/-   ##
========================================================
+ Coverage                 86.32%   86.40%   +0.07%     
- Complexity                 1809     1816       +7     
========================================================
  Files                       121      121              
  Lines                      5975     6002      +27     
  Branches                    818      820       +2     
========================================================
+ Hits                       5158     5186      +28     
+ Misses                      592      589       -3     
- Partials                    225      227       +2     
Flag Coverage Δ
all_tests 86.40% <96.96%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../cloud/spanner/pgadapter/session/SessionState.java 95.53% <93.75%> (-0.18%) ⬇️
...google/cloud/spanner/pgadapter/parsers/Parser.java 84.09% <100.00%> (ø)
...pter/statements/IntermediatePreparedStatement.java 86.01% <100.00%> (+0.44%) ⬆️
...ud/spanner/pgadapter/utils/ClientAutoDetector.java 93.18% <100.00%> (+0.49%) ⬆️
...spanner/pgadapter/wireprotocol/StartupMessage.java 88.23% <100.00%> (+0.48%) ⬆️
...ava/com/google/cloud/spanner/pgadapter/Server.java 48.38% <0.00%> (ø)
...om/google/cloud/spanner/pgadapter/ProxyServer.java 80.92% <0.00%> (+1.31%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@olavloite olavloite marked this pull request as ready for review September 8, 2022 12:51
@olavloite olavloite merged commit 87415dd into postgresql-dialect Sep 25, 2022
@olavloite olavloite deleted the guess-types branch September 25, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant