This is an automated email from the ASF dual-hosted git repository.

eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 48937fef485 [Performance](json reader) optimize filling default values 
(#25542)
48937fef485 is described below

commit 48937fef485c6a7c79d7c48dc982a84a64f5227c
Author: lihangyu <15605149...@163.com>
AuthorDate: Thu Dec 14 10:20:29 2023 +0800

    [Performance](json reader) optimize filling default values (#25542)
    
    Add a faster path for filling default values, since looking up value map is 
relatively slow
---
 be/src/vec/exec/format/json/new_json_reader.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/be/src/vec/exec/format/json/new_json_reader.cpp 
b/be/src/vec/exec/format/json/new_json_reader.cpp
index e7944e2da86..b6d849eef46 100644
--- a/be/src/vec/exec/format/json/new_json_reader.cpp
+++ b/be/src/vec/exec/format/json/new_json_reader.cpp
@@ -1358,6 +1358,12 @@ Status 
NewJsonReader::_simdjson_set_column_value(simdjson::ondemand::object* val
             continue;
         }
         auto* slot_desc = slot_descs[i];
+        // Quick path to insert default value, instead of using default values 
in the value map.
+        if (_col_default_value_map.empty() ||
+            _col_default_value_map.find(slot_desc->col_name()) == 
_col_default_value_map.end()) {
+            
block.get_by_position(i).column->assume_mutable()->insert_default();
+            continue;
+        }
         if (!slot_desc->is_materialized()) {
             continue;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to