Class Predicate
Object
org.apache.spark.sql.internal.connector.ExpressionWithToString
org.apache.spark.sql.connector.expressions.GeneralScalarExpression
org.apache.spark.sql.connector.expressions.filter.Predicate
- All Implemented Interfaces:
Serializable
,Expression
,scala.Serializable
- Direct Known Subclasses:
AlwaysFalse
,AlwaysTrue
,And
,Not
,Or
The general representation of predicate expressions, which contains the upper-cased expression
name and all the children expressions. You can also use these concrete subclasses for better
type safety:
And
, Or
, Not
, AlwaysTrue
, AlwaysFalse
.
The currently supported predicate expressions:
- Name:
IS_NULL
- SQL semantic:
expr IS NULL
- Since version: 3.3.0
- SQL semantic:
- Name:
IS_NOT_NULL
- SQL semantic:
expr IS NOT NULL
- Since version: 3.3.0
- SQL semantic:
- Name:
STARTS_WITH
- SQL semantic:
expr1 LIKE 'expr2%'
- Since version: 3.3.0
- SQL semantic:
- Name:
ENDS_WITH
- SQL semantic:
expr1 LIKE '%expr2'
- Since version: 3.3.0
- SQL semantic:
- Name:
CONTAINS
- SQL semantic:
expr1 LIKE '%expr2%'
- Since version: 3.3.0
- SQL semantic:
- Name:
IN
- SQL semantic:
expr IN (expr1, expr2, ...)
- Since version: 3.3.0
- SQL semantic:
- Name:
=
- SQL semantic:
expr1 = expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
<>
- SQL semantic:
expr1 <> expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
<=>
- SQL semantic: null-safe version of
expr1 = expr2
- Since version: 3.3.0
- SQL semantic: null-safe version of
- Name:
<
- SQL semantic:
expr1 < expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
<=
- SQL semantic:
expr1 <= expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
>
- SQL semantic:
expr1 > expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
>=
- SQL semantic:
expr1 >= expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
AND
- SQL semantic:
expr1 AND expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
OR
- SQL semantic:
expr1 OR expr2
- Since version: 3.3.0
- SQL semantic:
- Name:
NOT
- SQL semantic:
NOT expr
- Since version: 3.3.0
- SQL semantic:
- Name:
ALWAYS_TRUE
- SQL semantic:
TRUE
- Since version: 3.3.0
- SQL semantic:
- Name:
ALWAYS_FALSE
- SQL semantic:
FALSE
- Since version: 3.3.0
- SQL semantic:
- Since:
- 3.3.0
- See Also:
-
Field Summary
Fields inherited from interface org.apache.spark.sql.connector.expressions.Expression
EMPTY_EXPRESSION, EMPTY_NAMED_REFERENCE
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.spark.sql.connector.expressions.GeneralScalarExpression
children, equals, hashCode, name
Methods inherited from class org.apache.spark.sql.internal.connector.ExpressionWithToString
describe, references, toString
-
Constructor Details
-
Predicate
-