Class TimestampIndexUtils


  • public class TimestampIndexUtils
    extends Object
    • Method Detail

      • getColumnWithGranularity

        public static String getColumnWithGranularity​(String timestampColumn,
                                                      TimestampIndexGranularity granularity)
        Returns the column name with granularity, e.g. $ts$DAY.
      • getColumnWithGranularity

        public static String getColumnWithGranularity​(String timestampColumn,
                                                      String granularity)
        Returns the column name with granularity, e.g. $ts$DAY.
      • isValidGranularity

        public static boolean isValidGranularity​(String granularity)
        Returns whether the given string is a valid granularity.
      • isValidColumnWithGranularity

        public static boolean isValidColumnWithGranularity​(String column)
        Returns whether the given column nane is a column name with granularity.
      • extractColumnsWithGranularity

        public static Set<String> extractColumnsWithGranularity​(TableConfig tableConfig)
        Extracts all columns with granularity based on the TIMESTAMP index config.
      • applyTimestampIndex

        public static void applyTimestampIndex​(TableConfig tableConfig,
                                               Schema schema)
        Applies the TIMESTAMP index configured in the table config: - Adds the derived timestamp columns with granularity to the schema - Adds transform for the derived timestamp columns with granularity - Adds range index to the derived timestamp columns with granularity