Class AggregationPolicy

java.lang.Object
dev.frostlake.metastore.SqlObject
dev.frostlake.metastore.model.AggregationPolicy
All Implemented Interfaces:
Taggable

public class AggregationPolicy extends SqlObject
Snowflake AGGREGATION POLICY — attached to a TABLE, it forbids reading individual rows: a query must aggregate, may not use the aggregates that would leak a single value (MIN, MAX, MEDIAN, MODE, ANY_VALUE, VARIANCE, LISTAGG, ARRAY_AGG, PERCENTILE_*), and sees groups smaller than the policy's minimum folded into one remainder group. All live-verified.

The policy takes no arguments and its body answers either AGGREGATION_CONSTRAINT( MIN_GROUP_SIZE => n) or NO_AGGREGATION_CONSTRAINT(), so a conditional body is an expression choosing between them.

  • Constructor Details

    • AggregationPolicy

      public AggregationPolicy(String name, String body)
  • Method Details

    • getBody

      public String getBody()
    • setBody

      public void setBody(String body)
    • getObjectType

      public String getObjectType()
      Description copied from class: SqlObject
      Get the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific type
      Specified by:
      getObjectType in class SqlObject
      Returns:
      The object type as a string