Always map java.sql.Types.BIGINT to LongType#311
Always map java.sql.Types.BIGINT to LongType#311ngerstle wants to merge 4 commits intodatabricks:masterfrom
Conversation
java.sql.Types.BIGINT => LongType in all cases for Redshift. Redshift has no unsigned BigInt, and thus BigInt maps to Long without loss of resolution.
|
Thanks for the fix! Mind adding a regression test to an existing suite? If
you can't, I can tackle it in a followup. Code from your original issue
would be a good foundation for the test case. Check out RedshiftReadSuite,
since that's where I'd add it.
…On Fri, Dec 9, 2016 at 1:20 AM ngerstle ***@***.***> wrote:
java.sql.Types.BIGINT => LongType in all cases for Redshift.
Redshift has no unsigned BigInt, and thus BigInt maps to Long without loss
of resolution.
See issue #310 <#310>
------------------------------
You can view, comment on, or merge this pull request online at:
#311
Commit Summary
- Update RedshiftJDBCWrapper.scala
File Changes
- *M*
src/main/scala/com/databricks/spark/redshift/RedshiftJDBCWrapper.scala
<https://github.com/databricks/spark-redshift/pull/311/files#diff-0>
(2)
Patch Links:
- https://github.com/databricks/spark-redshift/pull/311.patch
- https://github.com/databricks/spark-redshift/pull/311.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#311>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AADGPO5Ox0OGiqp5pwDLug4_usBaAuAbks5rGR1AgaJpZM4LIulr>
.
|
Errors/unusually behavior is associated with BigInts. Specifically, a count(column) query sometimes returns doubles rather than longs, as would be expected from the count function (which only provides signed BigInts).
|
I'm not able to find any clear point at which a decimal would be converted to a double, meaning that issue #310 is unlikely to fixed by this, but the dead code should still be pruned. |
Current coverage is 88.55% (diff: 100%)@@ master #311 diff @@
==========================================
Files 15 15
Lines 769 769
Methods 614 615 +1
Messages 0 0
Branches 155 154 -1
==========================================
Hits 681 681
Misses 88 88
Partials 0 0
|
|
Regarding the double issue, is there a possibility that our call to ask Redshift the schema is returning a Double but then Redshift is actually turning around and unexpectedly giving us a Decimal? Do you have any test case which reproduces the Double behavior, even if you don't know how to actually fix the bug? |
|
Unfortunately, I'm still trying to get a consistent abstract case- as mentioned in #310, I have a |
java.sql.Types.BIGINT => LongType in all cases for Redshift.
Redshift has no unsigned BigInt, and thus BigInt maps to Long without loss of resolution.
See issue #310