Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/9203#discussion_r42701316
--- Diff:
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeArrayWriter.java
---
@@ -64,29 +63,72 @@ public void setOffset(int ordinal) {
Platform.putInt(holder.buffer, getElementOffset(ordinal),
relativeOffset);
}
- public void writeCompactDecimal(int ordinal, Decimal input, int
precision, int scale) {
- // make sure Decimal object has the same scale as DecimalType
- if (input.changePrecision(precision, scale)) {
- Platform.putLong(holder.buffer, holder.cursor,
input.toUnscaledLong());
- setOffset(ordinal);
- holder.cursor += 8;
- } else {
- setNullAt(ordinal);
+ public void write(int ordinal, boolean value) {
--- End diff --
Those in UnsafeRowWriter are needed for ColumnAccessor. The purpose of
these *Writer is to simplify generated code (which is already hard to
understand), these method also go in this direction.
---
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]