Uh oh!
There was an error while loading. Please reload this page.
[SPARK-17761][SQL] Remove MutableRow - #15333
Conversation
hvanhovell
commented
Oct 3, 2016
cc @cloud-fan we have discussed this in your MutableProjection PR. |
SparkQA
commented
Oct 3, 2016
Test build #66270 has finished for PR 15333 at commit
|
SparkQA
commented
Oct 3, 2016
Test build #66275 has finished for PR 15333 at commit
|
SparkQA
commented
Oct 3, 2016
Test build #66277 has finished for PR 15333 at commit
|
SparkQA
commented
Oct 4, 2016
Test build #66286 has finished for PR 15333 at commit
|
Would be nice to add a simple example in the PR description to illustrate why we can't ensure that a |
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateMutableProjection.scala
SparkQA
commented
Oct 4, 2016
Test build #66327 has finished for PR 15333 at commit
|
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateMutableProjection.scala
marmbrus
commented
Oct 4, 2016
This seems like a reasonable simplification to me. A little bit of history (though this has diverged significantly, so don't take this authoritative): I think this complexity all stems from |
SparkQA
commented
Oct 4, 2016
Test build #66330 has finished for PR 15333 at commit
|
hvanhovell
commented
Oct 7, 2016
Merging to master. Thanks for commenting. |
## What changes were proposed in this pull request? In practice we cannot guarantee that an `InternalRow` is immutable. This makes the `MutableRow` almost redundant. This PR folds `MutableRow` into `InternalRow`. The code below illustrates the immutability issue with InternalRow: ```scala import org.apache.spark.sql.catalyst.InternalRow import org.apache.spark.sql.catalyst.expressions.GenericMutableRow val struct = new GenericMutableRow(1) val row = InternalRow(struct, 1) println(row) scala> [[null], 1] struct.setInt(0, 42) println(row) scala> [[42], 1] ``` This might be somewhat controversial, so feedback is appreciated. ## How was this patch tested? Existing tests. Author: Herman van Hovell <hvanhovell@databricks.com> Closesapache#15333 from hvanhovell/SPARK-17761.
What changes were proposed in this pull request?
In practice we cannot guarantee that an
InternalRowis immutable. This makes theMutableRowalmost redundant. This PR foldsMutableRowintoInternalRow.The code below illustrates the immutability issue with InternalRow:
This might be somewhat controversial, so feedback is appreciated.
How was this patch tested?
Existing tests.