[
https://issues.apache.org/jira/browse/CALCITE-5549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-5549:
------------------------------------
Labels: pull-request-available (was: )
> Appropriately set `DATA_TYPE` and `IS_GENERATEDCOLUMN` metadata values for
> `MEASURE` types
> ------------------------------------------------------------------------------------------
>
> Key: CALCITE-5549
> URL: https://issues.apache.org/jira/browse/CALCITE-5549
> Project: Calcite
> Issue Type: Improvement
> Components: avatica, core
> Reporter: TJ Banghart
> Assignee: TJ Banghart
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{MEASURE}} types (introduced in
> [CALCITE-5105|https://issues.apache.org/jira/browse/CALCITE-5105]) currently
> present themselves as {{java.sql.Types#OTHER}}
> ({{1111}})([ref|https://docs.oracle.com/javase/8/docs/api/java/sql/Types.html#OTHER])
> It would be advantageous to surface the underlying data type of the
> {{MEASURE}} rather than catch all {{OTHER}} since the underlying data type is
> returned in result sets.
> For example a {{MEASURE<INTEGER>}} (a measure of type integer) would appear
> as {{java.sql.Types#INTEGER}} ({{4}}).
> We should also set the {{IS_GENERATEDCOLUMN}} metadata value with this
> change. All {{MEASURE}} types would populate the column with {{"YES"}}
> otherwise {{"NO"}}.
> [Here's|https://github.com/apache/calcite/blob/2dba40e7a0a5651eac5a30d9e0a72f178bd9bff2/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java#L466]
> where the JDBC type gets set in {{CalciteMetaImpl}}.
> For {{IS_GENERATEDCOLUMN}} we will need a change to the {{MetaColumn}}
> [constructor in
> Avatica|https://github.com/apache/calcite-avatica/blob/b57eb7cd31a90d3f46b65c13832b398be5b0dad9/core/src/main/java/org/apache/calcite/avatica/MetaImpl.java#L359-L386]
> that will allow us to set this value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)