Class CEPUtils


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

      Constructors 
      Constructor Description
      CEPUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<CEPFieldRef> getCEPFieldRefFromParKeys​(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.util.ImmutableBitSet partitionKeys)
      Transform the partition columns into serializable CEPFieldRef.
      static java.util.ArrayList<CEPPattern> getCEPPatternFromPattern​(org.apache.beam.sdk.schemas.Schema upStreamSchema, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode call, java.util.Map<java.lang.String,​org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode> patternDefs)
      Construct a list of CEPPatterns from a RexNode.
      static CEPFieldRef getFieldRef​(CEPOperation opr)
      a function that finds a pattern reference recursively.
      static org.apache.beam.sdk.schemas.Schema.FieldType getFieldType​(org.apache.beam.sdk.schemas.Schema streamSchema, CEPOperation measureOperation)  
      static java.lang.String getRegexFromPattern​(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode call)
      Recursively construct a regular expression from a RexNode.
      static java.util.ArrayList<OrderKey> makeOrderKeysFromCollation​(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.RelCollation orderKeys)
      Transform a list of keys in Calcite to ORDER BY to OrderKeys.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CEPUtils

        public CEPUtils()
    • Method Detail

      • getCEPPatternFromPattern

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

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

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

        public static java.util.List<CEPFieldRef> getCEPFieldRefFromParKeys​(org.apache.beam.vendor.calcite.v1_40_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 org.apache.beam.sdk.schemas.Schema.FieldType getFieldType​(org.apache.beam.sdk.schemas.Schema streamSchema,
                                                                                CEPOperation measureOperation)