Package org.apache.calcite.schema.impl
Class TableMacroImpl
- java.lang.Object
-
- org.apache.calcite.schema.impl.ReflectiveFunctionBase
-
- org.apache.calcite.schema.impl.TableMacroImpl
-
- All Implemented Interfaces:
Function
,TableMacro
public class TableMacroImpl extends ReflectiveFunctionBase implements TableMacro
Implementation ofTableMacro
based on a method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBase
ReflectiveFunctionBase.ParameterListBuilder
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBase
method, parameters
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TableMacroImpl(java.lang.reflect.Method method)
Private constructor; usecreate(java.lang.Class<?>)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TranslatableTable
apply(java.util.List<java.lang.Object> arguments)
Applies arguments to yield a table.static TableMacro
create(java.lang.Class<?> clazz)
Creates aTableMacro
from a class, looking for an "eval" method.static TableMacro
create(java.lang.reflect.Method method)
Creates aTableMacro
from a method.-
Methods inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBase
builder, classHasPublicZeroArgsConstructor, findMethod, getParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.schema.Function
getParameters
-
-
-
-
Constructor Detail
-
TableMacroImpl
private TableMacroImpl(java.lang.reflect.Method method)
Private constructor; usecreate(java.lang.Class<?>)
.
-
-
Method Detail
-
create
public static TableMacro create(java.lang.Class<?> clazz)
Creates aTableMacro
from a class, looking for an "eval" method. Returns null if there is no such method.
-
create
public static TableMacro create(java.lang.reflect.Method method)
Creates aTableMacro
from a method.
-
apply
public TranslatableTable apply(java.util.List<java.lang.Object> arguments)
Applies arguments to yield a table.- Specified by:
apply
in interfaceTableMacro
- Parameters:
arguments
- Arguments- Returns:
- Table
-
-