Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3630

Remove unused fields in the implementations of MeasureType

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v2.6.0
    • None
    • None

    Description

      In code RawMeasureType#RawMeasureType, we can see that both funcName and dataType are use, and this can be remove cuz there's no constraint on its constructor.

          @SuppressWarnings("unused")
          private final DataType dataType;
      
          public RawMeasureType(String funcName, DataType dataType) {
              this.dataType = dataType;
          }
      

      And after we done that, we can more easily test MeasureType without passing in meaningless args(AggregatorMemEstimateTest#112).

      Like codes in org.apache.kylin.measure.dim.DimCountDistinctMeasureType, other implementations can be cleaner.

              @Override
              public MeasureType<Object> createMeasureType(String funcName, DataType dataType) {
                  return new DimCountDistinctMeasureType();
              }
      

      Attachments

        Issue Links

          Activity

            People

              Aron.tao Jiatao Tao
              Aron.tao Jiatao Tao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: