Repository navigation
Return a borrowed scalar from as_constant - #10790
Conversation
Merging this PR will degrade performance by 9.52%4 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
`ArrayRef::as_constant`, `Array::as_constant` and `ReduceNode::as_constant` now return `Option<&Scalar>` instead of cloning the constant's scalar. Call sites that need ownership clone explicitly; the rest now borrow, which also avoids cloning list scalars in `list_contains` reduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxoTdLxRGNd2aWb6qz6EhC Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxoTdLxRGNd2aWb6qz6EhC Signed-off-by: Claude <noreply@anthropic.com>
7a81473 to
91e0833
Compare
ArrayRef::as_constant,Array::as_constantandReduceNode::as_constantnow returnOption<&Scalar>instead of cloning the constant's scalar. Let the callers decide if they need an owned scalar