You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/02/23 02:42:42 UTC

[incubator-doris] branch master updated: [Doris on ES] Fix query failed when ES field value is null (#5363)

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 <45...@users.noreply.github.com>
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 thrift@0.9` to install thrift 0.9.3.1
    `brew edit thrift090 | head` shows thrift@0.9 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 <ta...@bytedance.com>
---
 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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org