bersprockets opened a new pull request, #51395:
URL: https://github.com/apache/spark/pull/51395
### What changes were proposed in this pull request?
Update `InternalRow#getWriter` to return the correct writer for the TIME
type.
### Why are the changes needed?
Without this PR, aggregating the TIME type in interpreted mode fails.
Consider the below query:
```
set spark.sql.codegen.factoryMode=NO_CODEGEN;
create or replace temp view v1(col1) as values
(time'22:33:01'),
(time'01:33:01'),
(null);
select max(col1), min(col1) from v1;
```
Without this change, the query fails with the following error:
```
Exception in task 0.0 in stage 0.0 (TID 0)
org.apache.spark.SparkUnsupportedOperationException:
[UNSUPPORTED_CALL.WITHOUT_SUGGESTION] Cannot call the method "update" of the
class "org.apache.spark.sql.catalyst.expressions.UnsafeRow". SQLSTATE: 0A000
at
org.apache.spark.SparkUnsupportedOperationException$.apply(SparkException.scala:266)
~[spark-common-utils_2.13-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
```
### Does this PR introduce _any_ user-facing change?
No. The TIME type is not released yet.
### How was this patch tested?
Updated unit test.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]