-
Notifications
You must be signed in to change notification settings - Fork 28.8k
[SPARK-50463][SQL] Fix ConstantColumnVector
with Columnar to Row conversion
#49021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,11 @@ public ConstantColumnVector(int numRows, DataType type) { | |
} | ||
} | ||
|
||
public void closeIfFreeable() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yeah my apologies - do you think Do you think Or do you have a preference for a different name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok for |
||
// no-op: `ConstantColumnVector`s reuse the data backing its value across multiple batches and | ||
// are freed at the end of execution in `close`. | ||
} | ||
|
||
@Override | ||
public void close() { | ||
stringData = null; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm
ColumnVector
is an API actually. Can we avoid direct renaming hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original PR which added this method 800faf0 was merged ~a month ago. is it too late to now change the method name?
If so, how do you suggest we go about this? I think
closeIfNotWritable
doesn't represent the purpose of the method well, so one option is to deprecatecloseIfNotWritable
and directly callcloseIfFreeable
inside it. This is pretty ugly, though, so I'm open to any suggestionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okie dokie then should be fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, it is a new API just added recently and not released yet.