Class DefaultValue
Object
org.apache.spark.sql.connector.catalog.DefaultValue
- Direct Known Subclasses:
ColumnDefaultValue
A class that represents default value expressions.
Connectors can define default values using either a SQL string (Spark SQL dialect) or a more
portable connector expression, whose semantics follow the ANSI SQL standard.
If both the SQL string and the expression are provided, Spark first attempts to convert the given expression to its internal representation. If the expression cannot be converted, and a SQL string is provided, Spark will fall back to parsing the SQL string.
- Since:
- 4.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultValue(String sql) DefaultValue(String sql, Expression expr) DefaultValue(Expression expr) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal ExpressionReturns the connector expression, if provided.final StringgetSql()Returns the SQL representation, if provided.inthashCode()toString()
-
Constructor Details
-
DefaultValue
-
DefaultValue
-
DefaultValue
-
-
Method Details