Class BeamSqlEnv
java.lang.Object
org.apache.beam.sdk.extensions.sql.impl.BeamSqlEnv
Contains the metadata of tables/UDF functions, and exposes APIs to
query/validate/optimize/translate SQL statements.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic BeamSqlEnv.BeamSqlEnvBuilder
builder
(CatalogManager catalogManager) Creates a builder with the default schema backed by the catalog manager.static BeamSqlEnv.BeamSqlEnvBuilder
builder
(TableProvider tableProvider) Creates a builder with the default schema backed by the table provider.void
executeDdl
(String sqlStatement) org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.jdbc.CalcitePrepare.Context
static BeamSqlEnv
inMemory
(TableProvider... tableProviders) This method createsBeamSqlEnv
using empty * Pipeline Options.boolean
parseQuery
(String query) parseQuery
(String query, QueryPlanner.QueryParameters queryParameters) static BeamSqlEnv
readOnly
(String tableType, Map<String, BeamSqlTable> tables) This method createsBeamSqlEnv
using empty Pipeline Options.static BeamSqlEnv
withTableProvider
(TableProvider tableProvider) This method createsBeamSqlEnv
using empty Pipeline Options.
-
Method Details
-
builder
Creates a builder with the default schema backed by the table provider. -
builder
Creates a builder with the default schema backed by the catalog manager. -
readOnly
This method createsBeamSqlEnv
using empty Pipeline Options. It should only be used in tests. -
withTableProvider
This method createsBeamSqlEnv
using empty Pipeline Options. It should only be used in tests. -
inMemory
This method createsBeamSqlEnv
using empty * Pipeline Options. It should only be used in tests. -
parseQuery
- Throws:
ParseException
-
parseQuery
public BeamRelNode parseQuery(String query, QueryPlanner.QueryParameters queryParameters) throws ParseException - Throws:
ParseException
-
isDdl
- Throws:
ParseException
-
executeDdl
- Throws:
ParseException
-
getContext
public org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.jdbc.CalcitePrepare.Context getContext() -
getPipelineOptions
-
explain
- Throws:
ParseException
-