Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1442

Interval fractional second precision returns wrong value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:
      None

      Description

      Unless I'm wrong, I believe SqlIntervalQualifer#getFractionalSecondPrecisionPreservingDefault() returns the wrong field:

        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;
          }
        }
      

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              laurentgo Laurent Goujon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: