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 6dcc1b0 [Doris on ES] Fix query failed when ES field value is null
(#5363)
6dcc1b0 is described below
commit 6dcc1b0a55d74aef02541083412cf9c493c49823
Author: Hao Tan <[email protected]>
AuthorDate: Tue Feb 23 10:42:25 2021 +0800
[Doris on ES] Fix query failed when ES field value is null (#5363)
* Update fe-idea-dev.md
use `brew install [email protected]` to install thrift 0.9.3.1
`brew edit thrift090 | head` shows [email protected] uses thrift 0.9.3.1
* [Refactor] Remove the unnecessary if statement
Future<?> submit(Runnable task)
Submits a Runnable task for execution and returns a Future representing
that task. The Future's get method will return null upon successful completion.
* Fix null type
* add comment
Co-authored-by: tanhao <[email protected]>
---
be/src/exec/es/es_scroll_parser.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/be/src/exec/es/es_scroll_parser.cpp
b/be/src/exec/es/es_scroll_parser.cpp
index 0a4c5c7..5cdaf0c 100644
--- a/be/src/exec/es/es_scroll_parser.cpp
+++ b/be/src/exec/es/es_scroll_parser.cpp
@@ -319,6 +319,12 @@ Status ScrollParser::fill_tuple(const TupleDescriptor*
tuple_desc, Tuple* tuple,
void* slot = tuple->get_slot(slot_desc->tuple_offset());
PrimitiveType type = slot_desc->type().type;
+
+ // when the column value is null, the subsequent type casting will
report an error
+ if (col.IsNull()) {
+ slot = nullptr;
+ continue;
+ }
switch (type) {
case TYPE_CHAR:
case TYPE_VARCHAR: {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]