pyflink.dataframe.dataframe.lit#
- lit(value: Any, data_type: DataType | None = None) Expression[source]#
Create a literal expression.
- Parameters:
value – The literal value.
data_type – Optional data type for the literal.
- Returns:
Expression representing the literal.
- Example::
>>> import pyflink.dataframe as pf >>> pf.lit(1) >>> pf.lit("hello") >>> pf.lit(1.5, DataTypes.DOUBLE())