Commit 79d6458
authored
### Rationale for this change
The `arrow::compute::MakeExecBatch` function calls `DataType::id()` on `partial.type()` which could be a null pointer when `partial` is a datum representing a table. `MakeExecBatch` fails to check for this and thus null pointer dereference indeed happen.
### What changes are included in this PR?
This patch adds a simple check in `MakeExecBatch` before calling `DataType::id()` to make sure it won't gets called on a null pointer.
### Are these changes tested?
Yes. This patch updates the unit test `ExpressionUtils.MakeExecBatch` and includes a case that calls `MakeExecBatch` with a table.
### Are there any user-facing changes?
No.
This PR indeed resolve a crash problem, but I'm not quite sure whether this should be classified as a "critical fix".
Resolve #48062 .
* GitHub Issue: #48062
Authored-by: Sirui Mu <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
1 parent 60b976b commit 79d6458
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
| 691 | + | |
691 | 692 | | |
692 | 693 | | |
693 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
0 commit comments