Literal#
- public final class Literal extends AstExpression#
A literal value in an AST expression.
Method Summary
Construct a boolean literal with the specified value or null.
Construct a boolean literal with the specified value.
Construct a byte literal with the specified value or null.
Construct a byte literal with the specified value.
Construct a decimal literal with the specified type and unscaled value.
Construct a double literal with the specified value or null.
Construct a double literal with the specified value.
Construct a duration days literal with the specified value or null.
Construct a duration days literal with the specified value.
Construct a long-based duration literal with the specified value or null.
Construct a long-based duration literal with the specified value.
Construct a float literal with the specified value or null.
Construct a float literal with the specified value.
Construct an integer literal with the specified value or null.
Construct an integer literal with the specified value.
Construct a long literal with the specified value or null.
Construct a long literal with the specified value.
Construct a null literal of the specified type.
Construct a short literal with the specified value or null.
Construct a short literal with the specified value.
Construct a string literal with the specified value or null.
Construct a timestamp days literal with the specified value or null.
Construct a timestamp days literal with the specified value.
Construct a long-based timestamp literal with the specified value or null.
Construct a long-based timestamp literal with the specified value.
Construct a string literal directly with byte array to skip transcoding.
Methods inherited from class
ai.rapids.cudf.ast.AstExpression:compile,compileJitStatic Methods
- public static Literal ofBoolean(boolean value)#
Construct a boolean literal with the specified value.
- public static Literal ofBoolean(Boolean value)#
Construct a boolean literal with the specified value or null.
- public static Literal ofByte(Byte value)#
Construct a byte literal with the specified value or null.
- public static Literal ofShort(Short value)#
Construct a short literal with the specified value or null.
- public static Literal ofInt(Integer value)#
Construct an integer literal with the specified value or null.
- public static Literal ofLong(Long value)#
Construct a long literal with the specified value or null.
- public static Literal ofFloat(Float value)#
Construct a float literal with the specified value or null.
- public static Literal ofDouble(Double value)#
Construct a double literal with the specified value or null.
- public static Literal ofDecimal(DType type, BigInteger unscaledValue)#
Construct a decimal literal with the specified type and unscaled value.
A null
unscaledValueproduces a null literal of the requested type. Root literals of typeDECIMAL32orDECIMAL64can use either compilation mode. ADECIMAL128root literal is rejected byAstExpression.compile()with anIllegalArgumentExceptionand must useAstExpression.compileJit(), because the default AST executor cannot materialize it correctly. NestedDECIMAL128literals are not checked at compile time.- Parameters:
type – decimal storage type and scale
unscaledValue – unscaled decimal value, or null
- Throws:
IllegalArgumentException– iftypeis not a decimal typeArithmeticException– ifunscaledValuedoes not fit intype
- Returns:
decimal literal
- public static Literal ofTimestampDaysFromInt(int value)#
Construct a timestamp days literal with the specified value.
- public static Literal ofTimestampDaysFromInt(Integer value)#
Construct a timestamp days literal with the specified value or null.
- public static Literal ofTimestampFromLong(DType type, long value)#
Construct a long-based timestamp literal with the specified value.
- public static Literal ofTimestampFromLong(DType type, Long value)#
Construct a long-based timestamp literal with the specified value or null.
- public static Literal ofDurationDaysFromInt(int value)#
Construct a duration days literal with the specified value.
- public static Literal ofDurationDaysFromInt(Integer value)#
Construct a duration days literal with the specified value or null.
- public static Literal ofDurationFromLong(DType type, long value)#
Construct a long-based duration literal with the specified value.
- public static Literal ofDurationFromLong(DType type, Long value)#
Construct a long-based duration literal with the specified value or null.