Class GroupByLevelController


  • public class GroupByLevelController
    extends java.lang.Object
    This class is used to control the row number of group by level query. For example, selected series[root.sg.d1.s1, root.sg.d2.s1, root.sg2.d1.s1], level = 1; the result rows will be [root.sg.*.s1, root.sg2.*.s1], sLimit and sOffset will be used to control the result numbers rather than the selected series.
    • Field Detail

      • ALIAS_ERROR_MESSAGE1

        public static java.lang.String ALIAS_ERROR_MESSAGE1
      • ALIAS_ERROR_MESSAGE2

        public static java.lang.String ALIAS_ERROR_MESSAGE2
    • Constructor Detail

      • GroupByLevelController

        public GroupByLevelController​(int seriesLimit,
                                      int[] levels)
      • GroupByLevelController

        public GroupByLevelController​(QueryOperator operator)
    • Method Detail

      • getGroupedPath

        public java.lang.String getGroupedPath​(java.lang.String rawPath)
      • getAlias

        public java.lang.String getAlias​(java.lang.String originName)
      • generatePartialPathByLevel

        public java.lang.String generatePartialPathByLevel​(boolean isCountStar,
                                                           org.apache.iotdb.commons.path.PartialPath rawPath,
                                                           int[] pathLevels)
        Transform an originalPath to a partial path that satisfies given level. Path nodes don't satisfy the given level will be replaced by "*" except the sensor level, e.g. generatePartialPathByLevel("root.sg.dh.d1.s1", 2) will return "root.*.dh.*.s1".

        Especially, if count(*), then the sensor level will be replaced by "*" too.

        Returns:
        result partial path
      • serialize

        public void serialize​(java.nio.ByteBuffer byteBuffer)