Class CEPUtils
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.impl.cep.CEPUtils
-
public class CEPUtils extends java.lang.ObjectSome 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 ofCEPPatterns from aRexNode.static CEPFieldRefgetFieldRef(CEPOperation opr)a function that finds a pattern reference recursively.static org.apache.beam.sdk.schemas.Schema.FieldTypegetFieldType(org.apache.beam.sdk.schemas.Schema streamSchema, CEPOperation measureOperation)static java.lang.StringgetRegexFromPattern(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode call)Recursively construct a regular expression from aRexNode.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 toORDER BYtoOrderKeys.
-
-
-
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 ofCEPPatterns from aRexNode.
-
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 aRexNode.
-
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 toORDER BYtoOrderKeys.
-
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)
-
-