-
Notifications
You must be signed in to change notification settings - Fork 423
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
Extended bulk copy support for Azure DW #1331
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulvii
reviewed
May 11, 2020
src/test/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopySendTemporalDataTypesAsString.java
Outdated
Show resolved
Hide resolved
Please apply the formatter to your changes. |
ulvii
reviewed
May 11, 2020
ulvii
reviewed
May 11, 2020
src/test/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopySendTemporalDataTypesAsString.java
Outdated
Show resolved
Hide resolved
ulvii
reviewed
May 11, 2020
...va/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/BulkCopySendTemporalDataTypesAsStringAE.java
Outdated
Show resolved
Hide resolved
ulvii
reviewed
May 12, 2020
ulvii
reviewed
May 12, 2020
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java
Outdated
Show resolved
Hide resolved
ulvii
reviewed
May 12, 2020
...st/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopySendTemporalDataTypesAsStringTest.java
Outdated
Show resolved
Hide resolved
...st/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopySendTemporalDataTypesAsStringTest.java
Show resolved
Hide resolved
rene-ye
reviewed
May 13, 2020
rene-ye
reviewed
May 13, 2020
rene-ye
reviewed
May 13, 2020
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java
Outdated
Show resolved
Hide resolved
ulvii
reviewed
May 15, 2020
ulvii
reviewed
May 15, 2020
...st/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopySendTemporalDataTypesAsStringTest.java
Show resolved
Hide resolved
ulvii
reviewed
May 15, 2020
Co-authored-by: ulvii <v-ulibra@microsoft.com>
ulvii
reviewed
May 15, 2020
ulvii
reviewed
May 19, 2020
ulvii
reviewed
May 19, 2020
ulvii
reviewed
May 19, 2020
src/test/resources/BulkCopyCSVSendTemporalDataTypesAsStringForBulkCopy2.csv
Show resolved
Hide resolved
ulvii
reviewed
May 19, 2020
src/test/resources/BulkCopyCSVSendTemporalDataTypesAsStringForBulkCopy2.csv
Show resolved
Hide resolved
ulvii
reviewed
May 19, 2020
...om/microsoft/sqlserver/jdbc/AlwaysEncrypted/BulkCopySendTemporalDataTypesAsStringAETest.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## dev #1331 +/- ##
============================================
- Coverage 57.38% 54.52% -2.87%
+ Complexity 3732 3624 -108
============================================
Files 133 133
Lines 30089 30204 +115
Branches 4979 5002 +23
============================================
- Hits 17267 16468 -799
- Misses 10415 11390 +975
+ Partials 2407 2346 -61 Continue to review full report at Codecov.
|
ulvii
approved these changes
May 21, 2020
lilgreenbird
approved these changes
May 22, 2020
rene-ye
approved these changes
May 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds new connection property
sendTemporalDataTypesAsStringForBulkCopy
.This connection property, when set to FALSE, will send DATE, DATETIME, DATIMETIME2 DATETIMEOFFSET, SMALLDATETIME, and TIME datatypes as their respective types instead of sending them as String.
Additionally, even without setting this connection string to FALSE, MONEY and SMALLMONEY datatypes will be sent as MONEY / SMALLMONEY datatypes instead of DECIMAL after these changes.
Note that with this connection property set to FALSE, the driver will only accept the default string literal formatof each temporal datatype, for example:
DATE: YYYY-MM-DD
DATETIME: YYYY-MM-DD hh:mm:ss[.nnn]
DATETIME2: YYYY-MM-DD hh:mm:ss[.nnnnnnn]
DATETIMEOFFSET: YYYY-MM-DD hh:mm:ss[.nnnnnnn] [{+|-}hh:mm]
SMALLDATETIME:YYYY-MM-DD hh:mm:ss
TIME: hh:mm:ss[.nnnnnnn]
I've created two separate test classes for this, one for normal cases and one for AE cases. The AE cases are not supported against Azure DW, but I wanted both normal and AE cases to be run against their respective supported servers without one of them not being run when they should be, therefore two separate test classes.
I also made a small change to AESetup.java so that it doesn't throw a NPE when I'm trying to debug/run tests locally through eclipse.