Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/17436#discussion_r108994791
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnarBatch.java
---
@@ -430,12 +430,15 @@ public int numValidRows() {
/**
* Sets (replaces) the column at `ordinal` with column. This can be used
to do very efficient
* projections.
+ * Note: Caller must ensure that ColumnVector in column[ordinal] is not
used in other places
*/
public void setColumn(int ordinal, ColumnVector column) {
- if (column instanceof OffHeapColumnVector) {
- throw new UnsupportedOperationException("Need to ref count
columns.");
- }
+ ColumnVector oldColumn = columns[ordinal];
columns[ordinal] = column;
+ if (oldColumn instanceof OffHeapColumnVector) {
--- End diff --
Sure, done
---
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]