Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/7724#discussion_r35659200
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
---
@@ -683,13 +684,10 @@ class CastSuite extends SparkFunSuite with
ExpressionEvalHelper {
test("complex casting") {
val complex = Literal.create(
- InternalRow(
- Seq(UTF8String.fromString("123"), UTF8String.fromString("abc"),
UTF8String.fromString("")),
- Map(
- UTF8String.fromString("a") -> UTF8String.fromString("123"),
- UTF8String.fromString("b") -> UTF8String.fromString("abc"),
- UTF8String.fromString("c") -> UTF8String.fromString("")),
- InternalRow(0)),
+ Row(
+ Seq("123", "abc", ""),
+ Map("a" ->"123", "b" -> "abc", "c" -> ""),
+ Row(0)),
--- End diff --
I think we should avoid using `InternalRow` in test directly, which means
we are manually converting external type to internal type. Using `Row` and let
converter do this work seems better.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]