Class SqlOperatorTest.CustomTimeFrameTypeSystem

java.lang.Object
org.apache.calcite.rel.type.DelegatingTypeSystem
org.apache.calcite.test.SqlOperatorTest.CustomTimeFrameTypeSystem
All Implemented Interfaces:
RelDataTypeSystem
Enclosing class:
SqlOperatorTest

public static class SqlOperatorTest.CustomTimeFrameTypeSystem extends DelegatingTypeSystem
Type system whose constructor reads from a thread-local. You must invoke the constructor in the same thread, but once constructed you can use from other threads.

It's a bit strange, but the best we can do to pass objects via Avatica's plugin system until [CALCITE-5295] Read the values of plugins (such as connect string properties) from ThreadLocal fields is fixed.

  • Field Details

    • DELEGATE

      public static final TryThreadLocal<RelDataTypeSystem> DELEGATE
      Assign to this thread-local before you instantiate a FooTypeSystem (in the same thread) and your FooTypeSystem will behave in the same way.
  • Constructor Details

    • CustomTimeFrameTypeSystem

      public CustomTimeFrameTypeSystem()
      Creates a CustomTimeFrameTypeSystem, taking a snapshot of DELEGATE.