-
Notifications
You must be signed in to change notification settings - Fork 466
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
[GLUTEN-8956][VL] Add support for casting binary to string #8957
base: main
Are you sure you want to change the base?
Conversation
7659f0f
to
e2f1275
Compare
@@ -249,6 +249,9 @@ bool SubstraitToVeloxPlanValidator::isAllowedCast(const TypePtr& fromType, const | |||
// 3. Timestamp to most categories except few supported types is not allowed. | |||
// 4. Certain complex types are not allowed. | |||
|
|||
auto fromKind = fromType->kind(); |
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.
fromKind is not used in anywhere.
import org.apache.spark.sql.types._ | ||
|
||
class VeloxCastSuite extends VeloxWholeStageTransformerSuite with ExpressionEvalHelper { | ||
def cast(v: Any, targetType: DataType, timeZoneId: Option[String] = None): Cast = { |
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.
timeZoneId is not used. Maybe you can pass a const value to function 'Cast()'.
def cast(v: Any, targetType: DataType, timeZoneId: Option[String] = None): Cast = { | ||
v match { | ||
case lit: Expression => | ||
logDebug(s"Cast from: ${lit.dataType.typeName}, to: ${targetType.typeName}") |
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.
It is not better to add logs in a unit test.
What changes were proposed in this pull request?
How was this patch tested?