java.lang.Object
org.apache.beam.sdk.extensions.sql.impl.cep.CEPUtils

public class CEPUtils extends Object
Some utility methods for transforming Calcite's constructs into our own Beam constructs (for serialization purpose).
  • Constructor Details

    • CEPUtils

      public CEPUtils()
  • Method Details

    • getCEPPatternFromPattern

      public static ArrayList<CEPPattern> getCEPPatternFromPattern(Schema upStreamSchema, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rex.RexNode call, Map<String,org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rex.RexNode> patternDefs)
      Construct a list of CEPPatterns from a RexNode.
    • getRegexFromPattern

      public static String getRegexFromPattern(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rex.RexNode call)
      Recursively construct a regular expression from a RexNode.
    • makeOrderKeysFromCollation

      public static ArrayList<OrderKey> makeOrderKeysFromCollation(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.RelCollation orderKeys)
      Transform a list of keys in Calcite to ORDER BY to OrderKeys.
    • getCEPFieldRefFromParKeys

      public static List<CEPFieldRef> getCEPFieldRefFromParKeys(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.util.ImmutableBitSet partitionKeys)
      Transform the partition columns into serializable CEPFieldRef.
    • getFieldRef

      public static CEPFieldRef getFieldRef(CEPOperation opr)
      a function that finds a pattern reference recursively.
    • getFieldType

      public static Schema.FieldType getFieldType(Schema streamSchema, CEPOperation measureOperation)