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

Workaround Bulk Copy for batch insert operation against specific datatypes. #912

Merged
merged 12 commits into from
Jan 4, 2019

Conversation

peterbae
Copy link
Contributor

For now, these datatypes don't seem to work against Azure DW when using bulk copy:
Money/Smallmoney
Temporal data types (Date, Datetime, Datetime2, SmallDateTime, DateTimeOffset, Time).

This PR puts a workaround that makes tables with those columns present fallback to the original batch insert operation.

Also, Binary/Varbinary data types also used to fail, but I fixed that part in this PR as well.

@codecov-io
Copy link

codecov-io commented Dec 20, 2018

Codecov Report

Merging #912 into dev will increase coverage by 0.25%.
The diff coverage is 22.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #912      +/-   ##
============================================
+ Coverage     50.17%   50.43%   +0.25%     
- Complexity     2919     2929      +10     
============================================
  Files           120      120              
  Lines         28085    28117      +32     
  Branches       4688     4696       +8     
============================================
+ Hits          14093    14180      +87     
+ Misses        11711    11637      -74     
- Partials       2281     2300      +19
Flag Coverage Δ Complexity Δ
#JDBC42 49.98% <22.72%> (+0.33%) 2890 <0> (+19) ⬆️
#JDBC43 50.33% <22.72%> (+0.29%) 2920 <0> (+7) ⬆️
Impacted Files Coverage Δ Complexity Δ
...om/microsoft/sqlserver/jdbc/SQLServerResource.java 100% <ø> (ø) 4 <0> (ø) ⬇️
...sqlserver/jdbc/SQLServerBulkBatchInsertRecord.java 30.71% <0%> (-9.68%) 18 <0> (-7)
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 53.41% <31.25%> (+1.12%) 216 <0> (+3) ⬆️
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 46.2% <0%> (-2.17%) 111% <0%> (-1%)
...om/microsoft/sqlserver/jdbc/SimpleInputStream.java 52.94% <0%> (-1.48%) 11% <0%> (-1%)
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 38.14% <0%> (-1.3%) 42% <0%> (-3%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 55.82% <0%> (-0.37%) 0% <0%> (ø)
...n/java/com/microsoft/sqlserver/jdbc/DataTypes.java 79.68% <0%> (-0.2%) 5% <0%> (-1%)
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 51.55% <0%> (-0.13%) 256% <0%> (-1%)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a14861...b6590db. Read the comment docs.

@cheenamalhotra cheenamalhotra added this to the 7.1.4 milestone Jan 2, 2019
rene-ye
rene-ye previously approved these changes Jan 4, 2019
@peterbae peterbae merged commit d639870 into microsoft:dev Jan 4, 2019
rbygrave pushed a commit to ebean-orm/ebean that referenced this pull request Feb 3, 2019
* FIX: mysql index sizes

* FIX: osolete whitespace in sqlserver tests

* Updated mssql-jdbc, this fixes problems in the batch insert (microsoft/mssql-jdbc#912)

* fix tablename  (reserved word in mariadb)

* ignored failing tests for sqlserver
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.

5 participants