You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/10/17 23:05:58 UTC

[jira] [Resolved] (CALCITE-1442) SqlIntervalQualifer#getFractionalSecondPrecisionPreservingDefault() returns the wrong field

     [ https://issues.apache.org/jira/browse/CALCITE-1442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-1442.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.11.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/25a7d938; thanks for the PR, [~laurentgo]!

> SqlIntervalQualifer#getFractionalSecondPrecisionPreservingDefault() returns the wrong field
> -------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1442
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1442
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Laurent Goujon
>            Assignee: Julian Hyde
>            Priority: Minor
>             Fix For: 1.11.0
>
>
> Unless I'm wrong, I believe {{SqlIntervalQualifer#getFractionalSecondPrecisionPreservingDefault()}} returns the wrong field:
> {code:java}
>   public int getFractionalSecondPrecision(RelDataTypeSystem typeSystem) {
>     if (fractionalSecondPrecision == RelDataType.PRECISION_NOT_SPECIFIED) {
>       return typeName().getDefaultScale();
>     } else {
>       return fractionalSecondPrecision;
>     }
>   }
>   public int getFractionalSecondPrecisionPreservingDefault() {
>     if (useDefaultFractionalSecondPrecision()) {
>       return RelDataType.PRECISION_NOT_SPECIFIED;
>     } else {
>       return startPrecision;
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)