public class DruidTable extends AbstractTable implements TranslatableTable
| Modifier and Type | Class and Description |
|---|---|
private static class |
DruidTable.MapRelProtoDataType
Creates a
RelDataType from a map of
field names and types. |
| Modifier and Type | Field and Description |
|---|---|
(package private) String |
dataSource |
static org.joda.time.Interval |
DEFAULT_INTERVAL |
static String |
DEFAULT_TIMESTAMP_COLUMN |
(package private) com.google.common.collect.ImmutableList<org.joda.time.Interval> |
intervals |
(package private) com.google.common.collect.ImmutableSet<String> |
metricFieldNames |
(package private) RelProtoDataType |
protoRowType |
(package private) DruidSchema |
schema |
(package private) String |
timestampFieldName |
| Constructor and Description |
|---|
DruidTable(DruidSchema schema,
String dataSource,
RelProtoDataType protoRowType,
Set<String> metricFieldNames,
String timestampFieldName,
List<org.joda.time.Interval> intervals)
Creates a Druid table.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static Table |
create(DruidSchema druidSchema,
String dataSourceName,
List<org.joda.time.Interval> intervals,
Map<String,SqlTypeName> fieldMap,
Set<String> metricNameSet,
String timestampColumnName,
DruidConnectionImpl connection)
Creates a
DruidTable |
RelDataType |
getRowType(RelDataTypeFactory typeFactory) |
RelNode |
toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable) |
getJdbcTableType, getStatisticclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJdbcTableType, getStatisticpublic static final String DEFAULT_TIMESTAMP_COLUMN
public static final org.joda.time.Interval DEFAULT_INTERVAL
final DruidSchema schema
final String dataSource
final RelProtoDataType protoRowType
final com.google.common.collect.ImmutableSet<String> metricFieldNames
final com.google.common.collect.ImmutableList<org.joda.time.Interval> intervals
final String timestampFieldName
public DruidTable(DruidSchema schema, String dataSource, RelProtoDataType protoRowType, Set<String> metricFieldNames, String timestampFieldName, List<org.joda.time.Interval> intervals)
schema - Druid schema that contains this tabledataSource - Druid data source nameprotoRowType - Field names and typesmetricFieldNames - Names of fields that are metricsintervals - Default interval if query does not constrain the time, or nulltimestampFieldName - Name of the column that contains the timeintervals - Intervals for the given tablestatic Table create(DruidSchema druidSchema, String dataSourceName, List<org.joda.time.Interval> intervals, Map<String,SqlTypeName> fieldMap, Set<String> metricNameSet, String timestampColumnName, DruidConnectionImpl connection)
DruidTabledruidSchema - Druid schemadataSourceName - Data source name in Druid, also table nameintervals - Intervals, or null to use defaultfieldMap - Mutable map of fields (dimensions plus metrics);
may be partially populated alreadymetricNameSet - Mutable set of metric names;
may be partially populated alreadytimestampColumnName - Name of timestamp column, or nullconnection - If not null, use this connection to find column
definitionspublic RelDataType getRowType(RelDataTypeFactory typeFactory)
getRowType in interface Tablepublic RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
toRel in interface TranslatableTableCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.