Github user squito commented on the pull request:
https://github.com/apache/spark/pull/4039#issuecomment-70036236
I think finding & fixing a bug in current behavior is a great reason to add
a unit test. Some part of the implementation is confusing enough to have
allowed a bug in the first place, a test will help prevent that bug from
cropping up again in future changes.
From the description you gave me, this seems like a minimal test case:
```
class SpecificMutableRowTest extends FunSuite with Matchers {
test("update MutableAny") {
val row = new SpecificMutableRow(Seq(StringType))
row.update(0, 1)
row.getInt(0) should be (1)
}
}
```
I agree that this does seem kinda suspicious that maybe there is something
deeper going on ... why is a field that is supposed to be an int getting
assigned a type of `MutableAny` instead of `MutableInt`, though apparently
`CatalystPrimitiveConverter` has decided to call the `int` specific methods
like `setInt` etc.?
---
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]