[
https://issues.apache.org/jira/browse/CALCITE-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397750#comment-16397750
]
Shuyi Chen edited comment on CALCITE-2211 at 3/14/18 1:39 AM:
--------------------------------------------------------------
Good point. java.math.BigInteger has unlimited precision, I dont think there is
a sql type equivalent to it. The close I think is decimal.
In JavaToSqlTypeConversionRules, we are mapping BigDecimal(unlimited precision)
to Sql.Decimal already, so I think we can convert BigInteger to Sql.Decimal as
well. Transact-SQL do conversion of integer to Decimal if it's outside the
integer range.
([https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql#converting-integer-data]
was (Author: suez1224):
Good point. java.math.BigInteger has unlimited decision, I dont think there is
a sql type equivalent to it. The close I think is decimal.
In JavaToSqlTypeConversionRules, we are mapping BigDecimal(unlimited precision)
to Sql.Decimal already, so I think we can convert BigInteger to Sql.Decimal as
well. Transact-SQL do conversion of integer to Decimal if it's outside the
integer range.
(https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql#converting-integer-data
> Type of BigInteger should be BIGINT
> -----------------------------------
>
> Key: CALCITE-2211
> URL: https://issues.apache.org/jira/browse/CALCITE-2211
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.15.0
> Reporter: Eyal Segal
> Assignee: Julian Hyde
> Priority: Major
>
> Vertica DB returns BigInteger values as BigInteger. It seems that
> JavaToSqlTypeConversionRules doesn't support mapping between BigInteger to
> BIGINT.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)