This is an automated email from the ASF dual-hosted git repository.
liuneng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 1ed835848 [GLUTEN-6111][CH]Fix core problem of get_json_object #6113
1ed835848 is described below
commit 1ed835848cc091e63e4137a92af08589d6b5b0de
Author: KevinyhZou <[email protected]>
AuthorDate: Tue Jun 18 13:47:09 2024 +0800
[GLUTEN-6111][CH]Fix core problem of get_json_object #6113
What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
(Fixes: #6111)
How was this patch tested?
test by ut
---
.../src/test/resources/text-data/abnormal-json/data2.txt | Bin 36 -> 50 bytes
.../local-engine/Functions/SparkFunctionGetJsonObject.h | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git
a/backends-clickhouse/src/test/resources/text-data/abnormal-json/data2.txt
b/backends-clickhouse/src/test/resources/text-data/abnormal-json/data2.txt
index 485fb6d72..e323f5986 100644
Binary files
a/backends-clickhouse/src/test/resources/text-data/abnormal-json/data2.txt and
b/backends-clickhouse/src/test/resources/text-data/abnormal-json/data2.txt
differ
diff --git a/cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
b/cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
index 1d9b9a0fd..22b395536 100644
--- a/cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
+++ b/cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
@@ -232,7 +232,7 @@ private:
tmp.push('{');
else if (ch == '}')
{
- if (tmp.top() == '{')
+ if (!tmp.empty() && tmp.top() == '{')
tmp.pop();
}
if (tmp.empty())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]