pepijnve commented on code in PR #18152:
URL: https://github.com/apache/datafusion/pull/18152#discussion_r2466665681
##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -383,15 +396,15 @@ impl ResultBuilder {
///
/// ```text
/// ┌─────────┐ ┌─────────┐┌───────────┐
┌─────────┐┌───────────┐
- /// │ C │ │ MAX ││┌─────────┐│ │
MAX ││┌─────────┐│
+ /// │ C │ │ None ││┌─────────┐│ │
None ││┌─────────┐│
/// ├─────────┤ ├─────────┤││ A ││
├─────────┤││ A ││
- /// │ D │ │ MAX ││└─────────┘│ │
2 ││└─────────┘│
+ /// │ D │ │ None ││└─────────┘│ │
2 ││└─────────┘│
/// └─────────┘ ├─────────┤│┌─────────┐│ add_branch_result(
├─────────┤│┌─────────┐│
/// value │ 0 │││ B ││ row indices, │
0 │││ B ││
/// ├─────────┤│└─────────┘│ value
├─────────┤│└─────────┘│
- /// │ MAX ││ │ ) │
MAX ││┌─────────┐│
+ /// │ None ││ │ ) │
None ││┌─────────┐│
/// ┌─────────┐ ├─────────┤│ │ ─────────────────────────▶
├─────────┤││ C ││
- /// │ 1 │ │ MAX ││ │ │
2 ││├─────────┤│
+ /// │ 1 │ │ None ││ │ │
2 ││├─────────┤│
/// ├─────────┤ ├─────────┤│ │
├─────────┤││ D ││
/// │ 4 │ │ 1 ││ │ │
1 ││└─────────┘│
Review Comment:
Checked the diagram and it is actually correct. The 1 and 4 row index values
are used as the indexes into `partial indices`. So cells `1` and `4` of that
array get populated with the value `2` which is the index of the array
containing the values in `partial arrays`.
I've tried to clarify the diagram by adding the indices. Does that help?
--
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]