Class Column
Snowpark builds an expression tree and renders it when the plan runs; the stub renders eagerly and
keeps the text, which is the same thing for every purpose a handler can observe — col("a").gt(lit(1))
is (A > 1) either way. Operators parenthesise their operands so precedence survives nesting.
Each operator has a symbolic spelling and the word spelling Snowpark gives it (Java has no operator
overloading, so equal_to and gt are the real API, not a convenience).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasc()BETWEEN, inclusive on both ends as in SQL.desc()equal_null(Column other) NULL-safe equality — two NULLs compare equal, unlike=.booleangetName()The column's name when it has one — measured to returnOptional<String>.inthashCode()is_null()isNull()The real Column carries BOTH spellings;is_null()is the other one.subField(int index) An element of a semi-structured array:v[0].A field of a semi-structured value:v['name'].toString()
-
Constructor Details
-
Column
-
-
Method Details
-
as
-
alias
-
plus
-
minus
-
multiply
-
divide
-
mod
-
equal_to
-
not_equal
-
gt
-
lt
-
geq
-
leq
-
and
-
or
-
unary_not
-
is_null
-
is_not_null
-
like
-
in
-
cast
-
between
BETWEEN, inclusive on both ends as in SQL. -
isNull
The real Column carries BOTH spellings;is_null()is the other one. -
unary_minus
-
equal_null
NULL-safe equality — two NULLs compare equal, unlike=. -
asc_nulls_first
-
asc_nulls_last
-
desc_nulls_first
-
desc_nulls_last
-
bitand
-
bitor
-
bitxor
-
collate
-
regexp
-
subField
A field of a semi-structured value:v['name']. -
subField
An element of a semi-structured array:v[0]. -
getName
The column's name when it has one — measured to returnOptional<String>.Frostlake answers it from the SQL this column carries: a bare identifier IS its name, and anything composed (an expression, a function call, a literal) has none, which is what the empty Optional says.
The name comes back QUOTED and folded —
col("name").getName()is"NAME", quotes included — because that is what live answers, and it is the resolved identifier rather than the text the caller typed. -
asc
-
desc
-
toString
-
equals
-
hashCode
public int hashCode()
-