Skip to content

Commit 9e453bf

Browse files
committed
rename
1 parent 08fc7ed commit 9e453bf

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ColumnVector.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ public abstract class ColumnVector implements AutoCloseable {
6969
public abstract void close();
7070

7171
/**
72-
* Cleans up memory for this column vector if it's not writable. The column vector is not usable
73-
* after this.
72+
* Cleans up memory for this column vector if it's resources are freeable bewteen batches.
73+
* The column vector is not usable after this.
7474
*
75-
* If this is a writable column vector, it is a no-op.
75+
* If this is a writable column vector or constant column vector, it is a no-op.
7676
*/
77-
public void closeIfNotWritable() {
78-
// By default, we just call close() for all column vectors. If a column vector is writable, it
79-
// should override this method and do nothing.
77+
public void closeIfFreeable() {
78+
// By default, we just call close() for all column vectors. If a column vector is writable or
79+
// constant, it should override this method and do nothing.
8080
close();
8181
}
8282

sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ColumnarBatch.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public void close() {
4646
}
4747

4848
/**
49-
* Called to close all the columns if they are not writable. This is used to clean up memory
50-
* allocated during columnar processing.
49+
* Called to close all the columns if their resources are freeable between batches.
50+
* This is used to clean up memory allocated during columnar processing.
5151
*/
52-
public void closeIfNotWritable() {
52+
public void closeIfFreeable() {
5353
for (ColumnVector c: columns) {
54-
c.closeIfNotWritable();
54+
c.closeIfFreeable();
5555
}
5656
}
5757

sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void close() {
9797
}
9898

9999
@Override
100-
public void closeIfNotWritable() {
100+
public void closeIfFreeable() {
101101
// no-op
102102
}
103103

sql/core/src/main/scala/org/apache/spark/sql/execution/Columnar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ case class ColumnarToRowExec(child: SparkPlan) extends ColumnarToRowTransition w
194194
| $shouldStop
195195
| }
196196
| $idx = $numRows;
197-
| $batch.closeIfNotWritable();
197+
| $batch.closeIfFreeable();
198198
| $batch = null;
199199
| $nextBatchFuncName();
200200
|}

0 commit comments

Comments
 (0)