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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 72bb64ff4491fa13e58c120507433af2fca29089
Author: daidai <2017501...@qq.com>
AuthorDate: Sat Sep 2 01:11:37 2023 +0800

    [fix](json)Fix the bug that read json file Out of bounds access (#23411)
---
 be/src/vec/exec/format/json/new_json_reader.cpp            |  1 -
 .../preinstalled_data/json_format_test/nest_json.json      | 10 +++++-----
 .../data/external_table_p0/tvf/test_hdfs_tvf.out           | 14 +++++++-------
 regression-test/pipeline/p0/conf/regression-conf.groovy    |  2 +-
 4 files changed, 13 insertions(+), 14 deletions(-)

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 5dbd8fa8bc..85c10065ba 100644
--- a/be/src/vec/exec/format/json/new_json_reader.cpp
+++ b/be/src/vec/exec/format/json/new_json_reader.cpp
@@ -712,7 +712,6 @@ Status NewJsonReader::_parse_json_doc(size_t* size, bool* 
eof) {
         if (*size == 0) {
             *eof = true;
         }
-        _current_offset += *size;
     }
 
     _bytes_read_counter += *size;
diff --git 
a/docker/thirdparties/docker-compose/hive/scripts/preinstalled_data/json_format_test/nest_json.json
 
b/docker/thirdparties/docker-compose/hive/scripts/preinstalled_data/json_format_test/nest_json.json
index b28159b2a0..9be283f5d8 100644
--- 
a/docker/thirdparties/docker-compose/hive/scripts/preinstalled_data/json_format_test/nest_json.json
+++ 
b/docker/thirdparties/docker-compose/hive/scripts/preinstalled_data/json_format_test/nest_json.json
@@ -1,5 +1,5 @@
-{"no": 1, "item": {"id": 1, "city": "beijing", "code": 2345671}}
-{"no": 2, "item": {"id": 2, "city": "shanghai", "code": 2345672}}
-{"no": 3, "item": {"id": 3, "city": "hangzhou", "code": 2345673}}
-{"no": 4, "item": {"id": 4, "city": "shenzhen", "code": 2345674}}
-{"no": 5, "item": {"id": 5, "city": "guangzhou", "code": 2345675}}
+{"no": 1, "item": {"id":1,"city":"beijing","code":2345671}}
+{"no": 2, "item": {"id":2,"city":"shanghai","code":2345672}}
+{"no": 3, "item": {"id":3,"city":"hangzhou","code":2345673}}
+{"no": 4, "item": {"id":4,"city":"shenzhen","code":2345674}}
+{"no": 5, "item": {"id":5,"city":"guangzhou","code":2345675}}
diff --git a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out 
b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out
index 9ae369b977..3b92df238b 100644
--- a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out
+++ b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out
@@ -284,15 +284,15 @@
 9      xian    2345675
 
 -- !json_limit3 --
-1      {"id": 1, "city": "beijing", "code": 2345671}
-2      {"id": 2, "city": "shanghai", "code": 2345672}
-3      {"id": 3, "city": "hangzhou", "code": 2345673}
-4      {"id": 4, "city": "shenzhen", "code": 2345674}
-5      {"id": 5, "city": "guangzhou", "code": 2345675}
+1      {"id":1,"city":"beijing","code":2345671}
+2      {"id":2,"city":"shanghai","code":2345672}
+3      {"id":3,"city":"hangzhou","code":2345673}
+4      {"id":4,"city":"shenzhen","code":2345674}
+5      {"id":5,"city":"guangzhou","code":2345675}
 
 -- !json_limit4 --
-1      {"id": 1, "city": "beijing", "code": 2345671}
-2      {"id": 2, "city": "shanghai", "code": 2345672}
+1      {"id":1,"city":"beijing","code":2345671}
+2      {"id":2,"city":"shanghai","code":2345672}
 
 -- !json_root --
 1      beijing 2345671
diff --git a/regression-test/pipeline/p0/conf/regression-conf.groovy 
b/regression-test/pipeline/p0/conf/regression-conf.groovy
index 3ff7428dab..688267754c 100644
--- a/regression-test/pipeline/p0/conf/regression-conf.groovy
+++ b/regression-test/pipeline/p0/conf/regression-conf.groovy
@@ -54,7 +54,7 @@ testDirectories = ""
 // this groups will not be executed
 excludeGroups = ""
 // this suites will not be executed
-excludeSuites = 
"test_pk_uk_index_change,test_pk_uk_case,window_function,test_profile,test_broker_load_p2,test_spark_load,test_analyze_stats_p1,test_refresh_mtmv,test_bitmap_filter,test_export_parquet,test_doris_jdbc_catalog,test_hdfs_tvf"
+excludeSuites = 
"test_pk_uk_index_change,test_pk_uk_case,window_function,test_profile,test_broker_load_p2,test_spark_load,test_analyze_stats_p1,test_refresh_mtmv,test_bitmap_filter,test_export_parquet,test_doris_jdbc_catalog"
 
 // this directories will not be executed
 excludeDirectories = 
"nereids_tpcds_shape_sf100_p0,nereids_tpch_shape_sf1000_p0,nereids_tpch_shape_sf500_p0,workload_manager_p1"


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

Reply via email to