Class CEPUtils
java.lang.Object
org.apache.beam.sdk.extensions.sql.impl.cep.CEPUtils
Some utility methods for transforming Calcite's constructs into our own Beam constructs (for
serialization purpose).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List
<CEPFieldRef> getCEPFieldRefFromParKeys
(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.util.ImmutableBitSet partitionKeys) Transform the partition columns into serializable CEPFieldRef.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 ofCEPPattern
s from aRexNode
.static CEPFieldRef
getFieldRef
(CEPOperation opr) a function that finds a pattern reference recursively.static Schema.FieldType
getFieldType
(Schema streamSchema, CEPOperation measureOperation) static String
getRegexFromPattern
(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rex.RexNode call) Recursively construct a regular expression from aRexNode
.makeOrderKeysFromCollation
(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.RelCollation orderKeys) Transform a list of keys in Calcite toORDER BY
toOrderKey
s.
-
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 ofCEPPattern
s from aRexNode
. -
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 aRexNode
. -
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 toORDER BY
toOrderKey
s. -
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
a function that finds a pattern reference recursively. -
getFieldType
-