@Test
  public void minByDistinctTest() {
    String[] expectedHeader =
        new String[] {
          "device_id", "_col1", "_col2", "_col3", "_col4", "_col5", "_col6", "_col7", "_col8"
        };
    String[] retArray =
        new String[] {
          "d01,2024-09-24T06:15:30.000Z,2024-09-24T06:15:35.000Z,2024-09-24T06:15:30.000Z,2024-09-24T06:15:35.000Z,2024-09-24T06:15:50.000Z,2024-09-24T06:15:30.000Z,2024-09-24T06:15:30.000Z,2024-09-24T06:15:35.000Z,",
        };

    tableResultSetEqualTest(
        "select device_id, min_by(distinct time, s1), min_by(distinct time, s2), min_by(distinct time, s3), min_by(distinct time, s4), min_by(distinct time, s5), min_by(distinct time, s6), min_by(distinct time, s9), min_by(distinct time, s10) "
            + "from table1 group by 1 order by 1",
        expectedHeader,
        retArray,
        DATABASE_NAME);
  }
In this Class, we construct the scenario using DistinctAccumulator for
AggregationFunctionDistinct. Other cases are covered by {@link IoTDBTableViewAggregationIT}.
integration-test/src/test/java/org/apache/iotdb/relational/it/query/view/recent/IoTDBTableViewAggregationFunctionDistinctIT.java