[
https://issues.apache.org/jira/browse/DRILL-2613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384892#comment-14384892
]
Daniel Barclay (Drill) edited comment on DRILL-2613 at 3/27/15 11:36 PM:
-------------------------------------------------------------------------
Notes on requirements, possibilities, considerations, etc:
- The JDBC specification (PDF file) does not seem to require any conversions.
It does have a matrix (in 4.1) or table (in 4.2) about conversions, but it
seems to specify _allowed_ conversions, not _required_ conversions. (Note that
it has a column labeled "Java Object Type" with entries such as "getFloat" (a
_method_ name), so ...)
- Other JDBC drivers implement some conversions. It is not yet clear what is
typical of JDBC drivers or is expected of them by tools calling JDBC.
- Conversion from a narrower type (e.g., INTEGER/int) to a wider type
(BIGINT/long) should work fine.
- For conversion from a wider type to a narrower type, there is the question of
what happens if the value of the wider type is not a value of the narrower type
(doesn't fit in the narrower type). Should that dynamic case throw an
exception? Should it ignore the overflow? Should it be a warning (returning a
truncated value and adding a SQLWarning to the ResultSet's list of warnings)?
Should conversion from a wide type to a narrower type not be supported?
was (Author: dsbos):
Notes on requirements, possibilities, considerations, etc:
- The JDBC specification (PDF file) does not seem to require any conversions.
It does have a matrix (in 4.1) or table (in 4.2) about conversions, but it
seems to specify _allowed_ conversions, not _required_ conversions. (Note that
it has a column labeled "Java Object Type" with entries such as "getFloat" (a
_method_ name), so ...)
- Other JDBC drivers implement some conversions. It is not yet clear what is
typical or is expected by tools calling JDBC.
- Conversion from a narrower type (e.g., INTEGER/int) to a wider type
(BIGINT/long) should work fine.
- For conversion from a wider type to a narrower type, there is the question of
what happens if the value of the wider type is not a value of the narrower type
(doesn't fit in the narrower type). Should that dynamic case throw an
exception? Should it ignore the overflow? Should it be a warning (returning a
truncated value and adding a SQLWarning to the ResultSet's list of warnings)?
Should conversion from a wide type to a narrower type not be supported?
> Implement (higher-priority) ResultSet.getXxx(...) data conversions
> ------------------------------------------------------------------
>
> Key: DRILL-2613
> URL: https://issues.apache.org/jira/browse/DRILL-2613
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Daniel Barclay (Drill)
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)