class V2ExpressionSQLBuilder extends AnyRef
The builder to generate SQL from V2 expressions.
- Source
- V2ExpressionSQLBuilder.java
- Since
3.3.0
- Alphabetic
- By Inheritance
- V2ExpressionSQLBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new V2ExpressionSQLBuilder()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def build(expr: Expression): String
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def escapeSpecialCharsForLikePattern(str: String): String
Escape the LIKE pattern special chars, using
as the escape character.Escape the LIKE pattern special chars, using
as the escape character. The LIKE patterns produced by#visitStartsWith,#visitEndsWithand#visitContainsdeclareESCAPE '', so the wildcards_and%and the escape characteritself must each be prefixed withto be matched literally.Note: This method adopts the escape representation within Spark and is not bound to any JDBC dialect. A JDBC dialect should overwrite this API if the underlying database has more LIKE special chars than
_,%and. Escaping that is instead needed because the database treats a character specially inside a SQL string literal belongs in#escapeStringLiteralForLikePattern.- Attributes
- protected[util]
- def escapeStringLiteralForLikePattern(str: String): String
Escape the characters that the target database treats specially inside a SQL string literal, applied to a LIKE pattern (and its ESCAPE character) when embedding it into a
'...'literal for predicate pushdown.Escape the characters that the target database treats specially inside a SQL string literal, applied to a LIKE pattern (and its ESCAPE character) when embedding it into a
'...'literal for predicate pushdown.The default returns the input unchanged: a standard SQL string literal is taken verbatim (the single-quote doubling is already applied when the literal is rendered), so the
that#escapeSpecialCharsForLikePatternuses as the LIKE escape character reaches the LIKE engine intact. A dialect whose string-literal syntax givesa special meaning (e.g. MySQL, which treatsas an escape character inside string literals) must override this to double the backslash, so the LIKE pattern survives string-literal parsing unchanged.- Attributes
- protected[util]
- def expressionsToStringArray(expressions: Array[Expression]): Array[String]
- Attributes
- protected[util]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def inputToSQL(input: Expression): String
- Attributes
- protected[util]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def visitAggregateFunction(funcName: String, isDistinct: Boolean, inputs: Array[String]): String
- Attributes
- protected[util]
- def visitAggregateFunction(funcName: String, isDistinct: Boolean, inputs: Array[Expression]): String
Builds SQL for an aggregate function.
Builds SQL for an aggregate function.
In V2ExpressionSQLBuilder, always use this override (with Expression[]) instead of the String[] version, as the String[] version does not validate whether the function is supported in JDBC dialects.
- Attributes
- protected[util]
- def visitAnd(name: String, l: String, r: String): String
- Attributes
- protected[util]
- def visitBinaryArithmetic(name: String, l: String, r: String): String
- Attributes
- protected[util]
- def visitBinaryComparison(name: String, l: String, r: String): String
- Attributes
- protected[util]
- def visitBinaryComparison(name: String, le: Expression, re: Expression): String
- Attributes
- protected[util]
- def visitCaseWhen(children: Array[String]): String
- Attributes
- protected[util]
- def visitCast(expr: String, exprDataType: DataType, targetDataType: DataType): String
- Attributes
- protected[util]
- def visitContains(l: String, r: String): String
- Attributes
- protected[util]
- def visitEndsWith(l: String, r: String): String
- Attributes
- protected[util]
- def visitExtract(field: String, source: String): String
- Attributes
- protected[util]
- def visitExtract(extract: Extract): String
- Attributes
- protected[util]
- def visitGetArrayItem(getArrayItem: GetArrayItem): String
- Attributes
- protected[util]
- def visitIn(v: String, list: List[String]): String
- Attributes
- protected[util]
- def visitInverseDistributionFunction(funcName: String, isDistinct: Boolean, inputs: Array[String], orderingWithinGroups: Array[String]): String
- Attributes
- protected[util]
- def visitIsNotNull(v: String): String
- Attributes
- protected[util]
- def visitIsNull(v: String): String
- Attributes
- protected[util]
- def visitLiteral(literal: Literal[_ <: AnyRef]): String
- Attributes
- protected[util]
- def visitNamedReference(namedRef: NamedReference): String
- Attributes
- protected[util]
- def visitNot(v: String): String
- Attributes
- protected[util]
- def visitOr(name: String, l: String, r: String): String
- Attributes
- protected[util]
- def visitOverlay(inputs: Array[String]): String
- Attributes
- protected[util]
- def visitPartitionPredicate(partitionPredicate: PartitionPredicate): String
- Attributes
- protected[util]
- def visitSQLFunction(funcName: String, inputs: Array[String]): String
- Attributes
- protected[util]
- def visitSQLFunction(funcName: String, inputs: Array[Expression]): String
- Attributes
- protected[util]
- def visitSortOrder(sortKey: String, sortDirection: SortDirection, nullOrdering: NullOrdering): String
- Attributes
- protected[util]
- def visitStartsWith(l: String, r: String): String
- Attributes
- protected[util]
- def visitTrim(direction: String, inputs: Array[String]): String
- Attributes
- protected[util]
- def visitUnaryArithmetic(name: String, v: String): String
- Attributes
- protected[util]
- def visitUnexpectedExpr(expr: Expression): String
- Attributes
- protected[util]
- def visitUserDefinedAggregateFunction(funcName: String, canonicalName: String, isDistinct: Boolean, inputs: Array[String]): String
- Attributes
- protected[util]
- def visitUserDefinedScalarFunction(funcName: String, canonicalName: String, inputs: Array[String]): String
- Attributes
- protected[util]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)