-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31393][SQL] Show the correct alias in schema for expression #28164
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
Changes from 3 commits
08f0906
7b7f8bf
67c868b
d549c3c
2cd091e
f048601
cc4ee4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,8 @@ case class UnaryMinus(child: Expression) extends UnaryExpression | |
|
|
||
| override def toString: String = s"-$child" | ||
|
|
||
| override def prettyName: String = "-" | ||
|
||
|
|
||
| private lazy val numeric = TypeUtils.getNumeric(dataType, checkOverflow) | ||
|
|
||
| override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = dataType match { | ||
|
|
@@ -85,8 +87,6 @@ case class UnaryMinus(child: Expression) extends UnaryExpression | |
| case CalendarIntervalType => IntervalUtils.negate(input.asInstanceOf[CalendarInterval]) | ||
| case _ => numeric.negate(input) | ||
| } | ||
|
|
||
| override def sql: String = s"(- ${child.sql})" | ||
| } | ||
|
|
||
| @ExpressionDescription( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you can remove this and replace it to
prettyName.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I will replace it.
But wait for #28194 merged.
Then I could update golden file.