Class ExternalTable
java.lang.Object
org.apache.druid.sql.calcite.table.DruidTable
org.apache.druid.sql.calcite.table.ExternalTable
- All Implemented Interfaces:
org.apache.calcite.schema.Table,org.apache.calcite.schema.TranslatableTable
Represents an source of data external to Druid: a CSV file, an HTTP request, etc.
Each such table represents one of Druid's
DataSource types. Since SQL
requires knowledge of the schema of that input source, the user must provide
that information in SQL (via the `EXTERN` or up-coming `STAGED` function) or
from the Druid Catalog.-
Constructor Summary
ConstructorsConstructorDescriptionExternalTable(DataSource dataSource, RowSignature rowSignature, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.google.common.base.Supplier<Set<String>> inputSourceTypesSupplier) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.rel.type.RelDataTypegetRowType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) booleanbooleanorg.apache.calcite.rel.RelNodetoRel(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable relOptTable) toString()Methods inherited from class org.apache.druid.sql.calcite.table.DruidTable
equals, getJdbcTableType, getRowSignature, getStatistic, hashCode, isRolledUp, rolledUpColumnValidInsideAgg
-
Constructor Details
-
ExternalTable
public ExternalTable(DataSource dataSource, RowSignature rowSignature, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.google.common.base.Supplier<Set<String>> inputSourceTypesSupplier)
-
-
Method Details
-
getDataSource
- Specified by:
getDataSourcein classDruidTable
-
isJoinable
public boolean isJoinable()- Specified by:
isJoinablein classDruidTable
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcastin classDruidTable
-
getRowType
public org.apache.calcite.rel.type.RelDataType getRowType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) - Specified by:
getRowTypein interfaceorg.apache.calcite.schema.Table- Overrides:
getRowTypein classDruidTable
-
getInputSourceTypeSupplier
-
toRel
public org.apache.calcite.rel.RelNode toRel(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable relOptTable) -
toString
- Overrides:
toStringin classDruidTable
-