This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 1f19644 [Bug] Fix the nullptr of core in schema change (#7003)
1f19644 is described below
commit 1f196442f73136f21a40e7ba0a1c7bbbf00450dd
Author: HappenLee <[email protected]>
AuthorDate: Fri Nov 5 09:44:08 2021 +0800
[Bug] Fix the nullptr of core in schema change (#7003)
schema change fail as memory allocation fail on row block sorting, however,
it should do internal sorting first before schema change fail as memory
allocation fail on row block sorting in case there are enough memory after
internal sorting.
---
be/src/olap/schema_change.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp
index 8b3fc49..3fe0daf 100644
--- a/be/src/olap/schema_change.cpp
+++ b/be/src/olap/schema_change.cpp
@@ -57,7 +57,7 @@ public:
explicit RowBlockSorter(RowBlockAllocator* allocator);
virtual ~RowBlockSorter();
size_t num_rows() {
- return _swap_row_block->capacity();
+ return _swap_row_block != nullptr ? _swap_row_block->capacity() : 0;
}
bool sort(RowBlock** row_block);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]