viirya opened a new issue, #5886:
URL: https://github.com/apache/datafusion-comet/issues/5886

   ### What is the problem the feature request solves?
   
   `spark_map_sort` currently slices keys and invokes Arrow sorting for every 
nonempty map, including maps with exactly one entry. A singleton already has 
its only possible ordering, so this per-row allocation and kernel dispatch adds 
avoidable normalization cost before nested-key hashing.
   
   ### Describe the potential solution
   
   For supported flat key types, append a singleton's original entry index 
directly to the global permutation. Keep Arrow sorting for other rows and for 
key types whose sorting can report errors. Use a batch-level check and a 
specialized fallback loop to avoid adding a singleton branch to each row of 
batches without eligible singletons.
   
   Preserve output values, offsets, null buffers, schema metadata, early 
returns, and unsupported-key errors, including sliced maps and physical entries 
under null maps. Hashing behavior and configuration defaults should remain 
unchanged.
   
   ### Additional context
   
   Follow-up to the benchmark isolation work in #5822 (which closed #5818). 
Validate normalization-only, hash-only, and combined execution separately, 
including singleton, empty, mixed and larger maps, nulls, long strings, and 
sliced inputs. Independently remeasure flagged regressions.
   


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