Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-3039] Fix Custom Deterministic Expression for rand() UDF #2845

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ import org.apache.spark.sql.types.{DataType, StringType}
* Custom expression to override the deterministic property .
*/
case class CustomDeterministicExpression(nonDt: Expression ) extends Expression with Serializable{
override def nullable: Boolean = true
override def nullable: Boolean = nonDt.nullable

override def eval(input: InternalRow): Any = null
override def eval(input: InternalRow): Any = nonDt.eval(input)

override def dataType: DataType = StringType
override def dataType: DataType = nonDt.dataType

override def children: Seq[Expression] = Seq()
override def children: Seq[Expression] = nonDt.children

def childexp : Expression = nonDt
def childexp: Expression = nonDt

override def genCode(ctx: CodegenContext): ExprCode = nonDt.genCode(ctx)

override protected def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = ev.copy("")
}