public class EnumUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
LEFT_RIGHT |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.calcite.linq4j.tree.MethodCallExpression |
call(@Nullable org.apache.calcite.linq4j.tree.Expression targetExpression,
Class clazz,
String methodName,
List<? extends org.apache.calcite.linq4j.tree.Expression> arguments)
A more powerful version of
Expressions.call(Type, String, Iterable). |
static org.apache.calcite.linq4j.tree.Expression |
convert(org.apache.calcite.linq4j.tree.Expression operand,
Type toType)
Convert
operand to target type toType. |
static org.apache.calcite.linq4j.tree.Expression |
convert(org.apache.calcite.linq4j.tree.Expression operand,
Type fromType,
Type toType)
Convert
operand to target type toType. |
static <T> T |
evaluate(Object o,
Class<T> clazz)
Converts a value to a given class.
|
static @Nullable org.apache.calcite.linq4j.tree.Expression |
generateCollatorExpression(@Nullable SqlCollation collation) |
static org.apache.calcite.linq4j.Enumerable<Object[]> |
hopping(org.apache.calcite.linq4j.Enumerator<Object[]> inputEnumerator,
int indexOfWatermarkedColumn,
long emitFrequency,
long windowSize,
long offset)
Create enumerable implementation that applies hopping on each element from the input
enumerator and produces at least one element for each input element.
|
static org.apache.calcite.linq4j.tree.MethodDeclaration |
overridingMethodDecl(Method method,
Iterable<org.apache.calcite.linq4j.tree.ParameterExpression> parameters,
org.apache.calcite.linq4j.tree.BlockStatement body)
Declares a method that overrides another method.
|
static org.apache.calcite.linq4j.Enumerable<Object[]> |
sessionize(org.apache.calcite.linq4j.Enumerator<Object[]> inputEnumerator,
int indexOfWatermarkedColumn,
int indexOfKeyColumn,
long gap)
Creates enumerable implementation that applies sessionization to elements from the input
enumerator based on a specified key.
|
static Function<Object[],List<Object>> |
toExternal(List<RelDataType> types,
TimeZone timeZone)
Returns a function that converts an array of internal values to
a list of external values.
|
static Function<Object,Object> |
toExternal(RelDataType type,
TimeZone timeZone)
Returns a function that converts an internal value to an external
value.
|
static <TSource,TResult> |
tumbling(org.apache.calcite.linq4j.Enumerable<TSource> inputEnumerable,
org.apache.calcite.linq4j.function.Function1<TSource,TResult> outSelector)
Apply tumbling per row from the enumerable input.
|
public static org.apache.calcite.linq4j.tree.MethodDeclaration overridingMethodDecl(Method method, Iterable<org.apache.calcite.linq4j.tree.ParameterExpression> parameters, org.apache.calcite.linq4j.tree.BlockStatement body)
public static org.apache.calcite.linq4j.tree.Expression convert(org.apache.calcite.linq4j.tree.Expression operand,
Type toType)
operand to target type toType.operand - The expression to converttoType - Target typetoType or original if there
is no need to convertpublic static org.apache.calcite.linq4j.tree.Expression convert(org.apache.calcite.linq4j.tree.Expression operand,
Type fromType,
Type toType)
operand to target type toType.operand - The expression to convertfromType - Field typetoType - Target typetoType or original if there
is no need to convertpublic static org.apache.calcite.linq4j.tree.MethodCallExpression call(@Nullable org.apache.calcite.linq4j.tree.Expression targetExpression,
Class clazz,
String methodName,
List<? extends org.apache.calcite.linq4j.tree.Expression> arguments)
Expressions.call(Type, String, Iterable).
Tries best effort to convert the
accepted arguments to match parameter type.targetExpression - Target expression, or null if method is staticclazz - Class against which method is invokedmethodName - Name of methodarguments - Argument expressionsRuntimeException - if no suitable method foundpublic static org.apache.calcite.linq4j.Enumerable<Object[]> sessionize(org.apache.calcite.linq4j.Enumerator<Object[]> inputEnumerator, int indexOfWatermarkedColumn, int indexOfKeyColumn, long gap)
public static org.apache.calcite.linq4j.Enumerable<Object[]> hopping(org.apache.calcite.linq4j.Enumerator<Object[]> inputEnumerator, int indexOfWatermarkedColumn, long emitFrequency, long windowSize, long offset)
public static <TSource,TResult> org.apache.calcite.linq4j.Enumerable<TResult> tumbling(org.apache.calcite.linq4j.Enumerable<TSource> inputEnumerable,
org.apache.calcite.linq4j.function.Function1<TSource,TResult> outSelector)
public static @Nullable org.apache.calcite.linq4j.tree.Expression generateCollatorExpression(@Nullable SqlCollation collation)
public static Function<Object,Object> toExternal(RelDataType type, TimeZone timeZone)
Datetime values' internal representations have no time zone,
and their external values are moments (relative to UTC epoch),
so the timeZone parameter supplies the implicit time zone of
the internal representation. If you specify the local time zone of the
JVM, then Timestamp.toString(), Date.toString(), and
Time.toString() on the external values will give a value
consistent with the internal values.
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.