Literal#

public final class Literal extends AstExpression#

A literal value in an AST expression.

Method Summary

ofBoolean(Boolean value)

Construct a boolean literal with the specified value or null.

ofBoolean(boolean value)

Construct a boolean literal with the specified value.

ofByte(Byte value)

Construct a byte literal with the specified value or null.

ofByte(byte value)

Construct a byte literal with the specified value.

ofDecimal(DType type, BigInteger unscaledValue)

Construct a decimal literal with the specified type and unscaled value.

ofDouble(Double value)

Construct a double literal with the specified value or null.

ofDouble(double value)

Construct a double literal with the specified value.

ofDurationDaysFromInt(Integer value)

Construct a duration days literal with the specified value or null.

ofDurationDaysFromInt(int value)

Construct a duration days literal with the specified value.

ofDurationFromLong(DType type, Long value)

Construct a long-based duration literal with the specified value or null.

ofDurationFromLong(DType type, long value)

Construct a long-based duration literal with the specified value.

ofFloat(Float value)

Construct a float literal with the specified value or null.

ofFloat(float value)

Construct a float literal with the specified value.

ofInt(Integer value)

Construct an integer literal with the specified value or null.

ofInt(int value)

Construct an integer literal with the specified value.

ofLong(Long value)

Construct a long literal with the specified value or null.

ofLong(long value)

Construct a long literal with the specified value.

ofNull(DType type)

Construct a null literal of the specified type.

ofShort(Short value)

Construct a short literal with the specified value or null.

ofShort(short value)

Construct a short literal with the specified value.

ofString(String value)

Construct a string literal with the specified value or null.

ofTimestampDaysFromInt(Integer value)

Construct a timestamp days literal with the specified value or null.

ofTimestampDaysFromInt(int value)

Construct a timestamp days literal with the specified value.

ofTimestampFromLong(DType type, Long value)

Construct a long-based timestamp literal with the specified value or null.

ofTimestampFromLong(DType type, long value)

Construct a long-based timestamp literal with the specified value.

ofUTF8String(byte[] stringBytes)

Construct a string literal directly with byte array to skip transcoding.

toString()

Methods inherited from class ai.rapids.cudf.ast.AstExpression: compile, compileJit

Methods

public String toString()#

Static Methods

public static Literal ofNull(DType type)#

Construct a null literal of the specified type.

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.

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.

public static Literal ofShort(Short value)#

Construct a short literal with the specified value or null.

public static Literal ofInt(int value)#

Construct an integer literal with the specified value.

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.

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.

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.

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 unscaledValue produces a null literal of the requested type. Root literals of type DECIMAL32 or DECIMAL64 can use either compilation mode. A DECIMAL128 root literal is rejected by AstExpression.compile() with an IllegalArgumentException and must use AstExpression.compileJit(), because the default AST executor cannot materialize it correctly. Nested DECIMAL128 literals are not checked at compile time.

Parameters:
  • type – decimal storage type and scale

  • unscaledValue – unscaled decimal value, or null

Throws:
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.

public static Literal ofString(String value)#

Construct a string literal with the specified value or null.

public static Literal ofUTF8String(byte[] stringBytes)#

Construct a string literal directly with byte array to skip transcoding.