bersprockets commented on PR #40615:
URL: https://github.com/apache/spark/pull/40615#issuecomment-1541016431

   As a follow-up, should you add a check to ensure a foldable `lgConfigK`?:
   
   ```
   spark-sql (default)> create or replace temp view v1 as
   select * from values
   (1, 12),
   (1, 12),
   (2, 12),
   (2, 12),
   (3, 12)
   as tab(col, logk);
   Time taken: 1.665 seconds
   spark-sql (default)> select hex(hll_sketch_agg(col, logk)) from v1;
   23/05/09 16:25:25 ERROR Executor: Exception in task 4.0 in stage 0.0 (TID 4)
   java.lang.NullPointerException
        at 
org.apache.spark.sql.catalyst.InternalRow$.$anonfun$getAccessor$4(InternalRow.scala:138)
        at 
org.apache.spark.sql.catalyst.InternalRow$.$anonfun$getAccessor$4$adapted(InternalRow.scala:138)
        at 
org.apache.spark.sql.catalyst.expressions.BoundReference.eval(BoundAttribute.scala:40)
        at 
org.apache.spark.sql.catalyst.expressions.aggregate.HllSketchAgg.lgConfigK$lzycompute(datasketchesAggregates.scala:65)
        at 
org.apache.spark.sql.catalyst.expressions.aggregate.HllSketchAgg.lgConfigK(datasketchesAggregates.scala:64)
        at 
org.apache.spark.sql.catalyst.expressions.aggregate.HllSketchAgg.createAggregationBuffer(datasketchesAggregates.scala:116)
        at 
org.apache.spark.sql.catalyst.expressions.aggregate.HllSketchAgg.createAggregationBuffer(datasketchesAggregates.scala:55)
   ...
   ```


-- 
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]

Reply via email to