public class GlobalTableDataSource extends TableDataSource
TableDataSource variant for globally available 'broadcast' segments. If bound to a
JoinableFactory that can create an
IndexedTable using DruidBinders.joinableFactoryBinder, this allows
optimal usage of segments using this DataSource type in join operations (because they are global), and so can be
pushed down to historicals as a JoinDataSource, instead of requiring a subquery join using
InlineDataSource to construct an IndexedTable on the fly on the
broker. Because it is also a TableDataSource, when queried directly, or on the left hand side of a join,
they will be treated as any normal table datasource.| Constructor and Description |
|---|
GlobalTableDataSource(String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCacheable(boolean isBroker)
Query results from Broadcast datasources should not be cached on broker
https://github.com/apache/druid/issues/10444
|
boolean |
isGlobal()
Returns true if all servers have a full copy of this datasource.
|
String |
toString() |
create, createSegmentMapFunction, equals, getAnalysis, getCacheKey, getChildren, getName, getTableNames, hashCode, isConcrete, withChildren, withUpdatedDataSourcepublic GlobalTableDataSource(String name)
public boolean isGlobal()
DataSource
Currently this is coupled with joinability - if this returns true then the query engine expects there exists a
JoinableFactory which might build a
Joinable for this datasource directly. If a subquery 'inline' join is
required to join this datasource on the right hand side, then this value must be false for now.
In the future, instead of directly using this method, the query planner and engine should consider
JoinableFactory.isDirectlyJoinable(DataSource) when determining if the
right hand side is directly joinable, which would allow decoupling this property from joins.
isGlobal in interface DataSourceisGlobal in class TableDataSourcepublic boolean isCacheable(boolean isBroker)
isCacheable in interface DataSourceisCacheable in class TableDataSourcepublic String toString()
toString in class TableDataSourceCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.