| 778 | } |
| 779 | |
| 780 | void AdjustInputPointer() { |
| 781 | if (input_exhausted) { |
| 782 | return; |
| 783 | } |
| 784 | while (true) { |
| 785 | // Skip exhausted layout (might be empty layout) |
| 786 | while (in_buffer_idx >= in_layouts[in_layout_idx].buffers.size()) { |
| 787 | in_buffer_idx = 0; |
| 788 | ++in_layout_idx; |
| 789 | if (in_layout_idx >= in_layouts.size()) { |
| 790 | input_exhausted = true; |
| 791 | return; |
| 792 | } |
| 793 | } |
| 794 | const auto& in_spec = in_layouts[in_layout_idx].buffers[in_buffer_idx]; |
| 795 | if (in_spec.kind != DataTypeLayout::ALWAYS_NULL) { |
| 796 | return; |
| 797 | } |
| 798 | // Skip always-null input buffers |
| 799 | // (e.g. buffer 0 of a null type or buffer 2 of a sparse union) |
| 800 | ++in_buffer_idx; |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | Status CheckInputAvailable() { |
| 805 | if (input_exhausted) { |