Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/17880#discussion_r115244928
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
---
@@ -484,24 +484,50 @@ class TypeCoercionSuite extends PlanTest {
}
test("coalesce casts") {
- ruleTest(TypeCoercion.FunctionArgumentConversion,
- Coalesce(Literal(1.0)
- :: Literal(1)
- :: Literal.create(1.0, FloatType)
- :: Nil),
- Coalesce(Cast(Literal(1.0), DoubleType)
- :: Cast(Literal(1), DoubleType)
- :: Cast(Literal.create(1.0, FloatType), DoubleType)
- :: Nil))
- ruleTest(TypeCoercion.FunctionArgumentConversion,
- Coalesce(Literal(1L)
- :: Literal(1)
- :: Literal(new java.math.BigDecimal("1000000000000000000000"))
- :: Nil),
- Coalesce(Cast(Literal(1L), DecimalType(22, 0))
- :: Cast(Literal(1), DecimalType(22, 0))
- :: Cast(Literal(new
java.math.BigDecimal("1000000000000000000000")), DecimalType(22, 0))
- :: Nil))
+ val rule = TypeCoercion.FunctionArgumentConversion
+
+ val intLit = Literal(1)
+ val LongLit = Literal.create(1L)
--- End diff --
(I guess this should be `longLit `)
---
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]