public static class BeamSqlEnv.BeamSqlEnvBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
BeamSqlEnv.BeamSqlEnvBuilder |
addSchema(java.lang.String name,
TableProvider tableProvider)
Add a top-level schema backed by the table provider.
|
BeamSqlEnv.BeamSqlEnvBuilder |
addUdaf(java.lang.String functionName,
Combine.CombineFn combineFn)
Register a UDAF function which can be used in GROUP-BY expression.
|
BeamSqlEnv.BeamSqlEnvBuilder |
addUdf(java.lang.String functionName,
java.lang.Class<?> clazz,
java.lang.String method)
Register a UDF function which can be used in SQL expression.
|
BeamSqlEnv.BeamSqlEnvBuilder |
addUdf(java.lang.String functionName,
java.lang.Class<? extends BeamSqlUdf> clazz)
Register a UDF function which can be used in SQL expression.
|
BeamSqlEnv.BeamSqlEnvBuilder |
addUdf(java.lang.String functionName,
SerializableFunction sfn)
Register a UDF function which can be used in SQL expression.
|
BeamSqlEnv.BeamSqlEnvBuilder |
autoLoadBuiltinFunctions()
Load Beam SQL built-in functions defined in
BeamBuiltinFunctionProvider . |
BeamSqlEnv.BeamSqlEnvBuilder |
autoLoadUserDefinedFunctions()
Load UDF/UDAFs from
UdfUdafProvider . |
BeamSqlEnv |
build()
Build function to create an instance of BeamSqlEnv based on preset fields.
|
BeamSqlEnv.BeamSqlEnvBuilder |
setCurrentSchema(java.lang.String name)
Set the current (default) schema.
|
BeamSqlEnv.BeamSqlEnvBuilder |
setPipelineOptions(PipelineOptions pipelineOptions) |
BeamSqlEnv.BeamSqlEnvBuilder |
setQueryPlannerClassName(java.lang.String name) |
BeamSqlEnv.BeamSqlEnvBuilder |
setRuleSets(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet[] ruleSets)
Set the ruleSet used for query optimizer.
|
public BeamSqlEnv.BeamSqlEnvBuilder addSchema(java.lang.String name, TableProvider tableProvider)
public BeamSqlEnv.BeamSqlEnvBuilder setCurrentSchema(java.lang.String name)
public BeamSqlEnv.BeamSqlEnvBuilder setRuleSets(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet[] ruleSets)
public BeamSqlEnv.BeamSqlEnvBuilder addUdf(java.lang.String functionName, java.lang.Class<?> clazz, java.lang.String method)
public BeamSqlEnv.BeamSqlEnvBuilder addUdf(java.lang.String functionName, java.lang.Class<? extends BeamSqlUdf> clazz)
public BeamSqlEnv.BeamSqlEnvBuilder addUdf(java.lang.String functionName, SerializableFunction sfn)
public BeamSqlEnv.BeamSqlEnvBuilder addUdaf(java.lang.String functionName, Combine.CombineFn combineFn)
See Combine.CombineFn
on how to implement a UDAF.
public BeamSqlEnv.BeamSqlEnvBuilder autoLoadUserDefinedFunctions()
UdfUdafProvider
.public BeamSqlEnv.BeamSqlEnvBuilder autoLoadBuiltinFunctions()
BeamBuiltinFunctionProvider
.public BeamSqlEnv.BeamSqlEnvBuilder setQueryPlannerClassName(java.lang.String name)
public BeamSqlEnv.BeamSqlEnvBuilder setPipelineOptions(PipelineOptions pipelineOptions)
public BeamSqlEnv build()