-
Notifications
You must be signed in to change notification settings - Fork 428
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
SQLServerBulkCopy expects ISQLServerBulkData implementation to return sorted set #1391
Comments
Seems like duplicate of #1265 |
Well, I find it strange that the code makes some assumptions about the data not stated in a contract (sets are usually unordered) and more importantly fails in the most basic case - when importing all columns in the same order they are declared in |
Thanks @PavelPenkov for reporting this. I agree that this seems strange, and we will soon work on a fix to solve this issue. |
Hi @PavelPenkov, I have a fix ready in PR #1406, and I've attached a zip containing the Java 11 version of the driver that contains this fix. Could you give this a try and let me know if it fixes your problem? |
@PavelPenkov have you had a chance to test out the changes? |
Pr #1406 merged. |
Driver version
8.2.2.jre11
SQL Server version
Doesn't matter, it fails before making a query
Client Operating System
Doesn't matter
JAVA/JVM version
Amazon Corretto 11, but doesn't matter
Table schema
Doesn't matter
Problem description
validateColumnMappings
method is expectinggetColumnOrdinals
to returns said ordinals in order. So it fails if an unsorted set is returned by an implementation.Reproduction code
Could be found here https://gist.github.com/PavelPenkov/99cb94d4b674afca626640aecbe3c50e (in Scala, though)
The text was updated successfully, but these errors were encountered: