Java Code Examples for org.apache.kylin.query.relnode.OLAPContext#getThreadLocalContextById()
The following examples show how to use
org.apache.kylin.query.relnode.OLAPContext#getThreadLocalContextById() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OLAPQuery.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
public Enumerator<Object[]> enumerator() { OLAPContext olapContext = OLAPContext.getThreadLocalContextById(contextId); switch (type) { case OLAP: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new OLAPEnumerator(olapContext, optiqContext); case LOOKUP_TABLE: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new LookupTableEnumerator(olapContext); case COL_DICT: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new DictionaryEnumerator(olapContext); case HIVE: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new HiveEnumerator(olapContext); default: throw new IllegalArgumentException("Wrong type " + type + "!"); } }
Example 2
Source File: OLAPQuery.java From kylin with Apache License 2.0 | 6 votes |
public Enumerator<Object[]> enumerator() { OLAPContext olapContext = OLAPContext.getThreadLocalContextById(contextId); switch (type) { case OLAP: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new OLAPEnumerator(olapContext, optiqContext); case LOOKUP_TABLE: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new LookupTableEnumerator(olapContext); case COL_DICT: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new DictionaryEnumerator(olapContext); case HIVE: return BackdoorToggles.getPrepareOnly() ? new EmptyEnumerator() : new HiveEnumerator(olapContext); default: throw new IllegalArgumentException("Wrong type " + type + "!"); } }
Example 3
Source File: OLAPQuery.java From Kylin with Apache License 2.0 | 5 votes |
public Enumerator<Object[]> enumerator() { OLAPContext olapContext = OLAPContext.getThreadLocalContextById(contextId); switch (type) { case INDEX: return new CubeEnumerator(olapContext, optiqContext); case LOOKUP_TABLE: return new LookupTableEnumerator(olapContext); case HIVE: return new HiveEnumerator(olapContext); default: throw new IllegalArgumentException("Wrong type " + type + "!"); } }