Skip to content

Indicate if this expression is a literal value (optionally aliased)

Source code

Description

Indicate if this expression is a literal value (optionally aliased)

Usage

<Expr>$meta$is_literal(..., allow_aliasing = FALSE)

Arguments

These dots are for future extensions and must be empty.
allow_aliasing If FALSE (default), only a bare literal will match. Set to TRUE to also allow for aliased literals.

Value

A polars expression

Examples

library("polars")

e <- pl$lit(123)
e$meta$is_literal()
#> [1] TRUE
e <- pl$lit(123)$alias("foo")
e$meta$is_literal()
#> [1] FALSE
e$meta$is_literal(allow_aliasing = TRUE)
#> [1] TRUE