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

exmy 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 00a5c2c19a [CH] Add GlutenJsonExpressionsSuite (#7064)
00a5c2c19a is described below

commit 00a5c2c19a85a5fc0e7f39aeae47f6c52941de7c
Author: exmy <[email protected]>
AuthorDate: Fri Aug 30 14:32:14 2024 +0800

    [CH] Add GlutenJsonExpressionsSuite (#7064)
---
 .../utils/clickhouse/ClickHouseTestSettings.scala  | 37 ++++++++++++++++++++++
 .../expressions/GlutenJsonExpressionsSuite.scala   | 21 ++++++++++++
 .../utils/clickhouse/ClickHouseTestSettings.scala  | 37 ++++++++++++++++++++++
 .../expressions/GlutenJsonExpressionsSuite.scala   | 21 ++++++++++++
 .../utils/clickhouse/ClickHouseTestSettings.scala  | 37 ++++++++++++++++++++++
 .../expressions/GlutenJsonExpressionsSuite.scala   | 21 ++++++++++++
 6 files changed, 174 insertions(+)

diff --git 
a/gluten-ut/spark33/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
 
b/gluten-ut/spark33/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
index e992b50444..ca7f19a0c5 100644
--- 
a/gluten-ut/spark33/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
+++ 
b/gluten-ut/spark33/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
@@ -387,6 +387,43 @@ class ClickHouseTestSettings extends BackendTestSettings {
   enableSuite[GlutenIntervalFunctionsSuite]
   enableSuite[GlutenJoinSuite].exclude(
     "SPARK-36794: Ignore duplicated key when building relation for semi/anti 
hash join")
+  enableSuite[GlutenJsonExpressionsSuite]
+    .exclude("$.store.book[*]")
+    .exclude("$.store.book[*].category")
+    .exclude("$.store.book[*].isbn")
+    .exclude("$.store.basket[*]")
+    .exclude("$.store.basket[*][0]")
+    .exclude("$.store.basket[0][*]")
+    .exclude("$.store.basket[*][*]")
+    .exclude("$.store.basket[0][*].b")
+    .exclude("$.zip code")
+    .exclude("$.fb:testid")
+    .exclude("from_json - invalid data")
+    .exclude("from_json - input=object, schema=array, output=array of single 
row")
+    .exclude("from_json - input=empty object, schema=array, output=array of 
single row with null")
+    .exclude("from_json - input=array of single object, schema=struct, 
output=single row")
+    .exclude("from_json - input=array, schema=struct, output=single row")
+    .exclude("from_json - input=empty array, schema=struct, output=single row 
with null")
+    .exclude("from_json - input=empty object, schema=struct, output=single row 
with null")
+    .exclude("SPARK-20549: from_json bad UTF-8")
+    .exclude("from_json with timestamp")
+    .exclude("to_json - struct")
+    .exclude("to_json - array")
+    .exclude("to_json - array with single empty row")
+    .exclude("to_json with timestamp")
+    .exclude("SPARK-21513: to_json support map[string, struct] to json")
+    .exclude("SPARK-21513: to_json support map[struct, struct] to json")
+    .exclude("parse date with locale")
+    .exclude("parse decimals using locale")
+    // NOT use gluten
+    .exclude("$..no_recursive")
+    .exclude("non foldable literal")
+    .exclude("some big value")
+    .exclude("from/to json - interval support")
+    .exclude("SPARK-24709: infer schema of json strings")
+    .exclude("infer schema of JSON strings by using options")
+    .exclude("inferring the decimal type using locale")
+    .exclude("json_object_keys")
   enableSuite[GlutenJsonFunctionsSuite]
     .exclude("from_json with option")
     .exclude("from_json missing columns")
diff --git 
a/gluten-ut/spark33/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
 
b/gluten-ut/spark33/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
new file mode 100644
index 0000000000..f9d314e508
--- /dev/null
+++ 
b/gluten-ut/spark33/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.sql.catalyst.expressions
+
+import org.apache.spark.sql.GlutenTestsTrait
+
+class GlutenJsonExpressionsSuite extends JsonExpressionsSuite with 
GlutenTestsTrait {}
diff --git 
a/gluten-ut/spark34/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
 
b/gluten-ut/spark34/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
index 6a5ce343b8..f0c1151b9a 100644
--- 
a/gluten-ut/spark34/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
+++ 
b/gluten-ut/spark34/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
@@ -386,6 +386,43 @@ class ClickHouseTestSettings extends BackendTestSettings {
   enableSuite[GlutenIntervalFunctionsSuite]
   enableSuite[GlutenJoinSuite].exclude(
     "SPARK-36794: Ignore duplicated key when building relation for semi/anti 
hash join")
+  enableSuite[GlutenJsonExpressionsSuite]
+    .exclude("$.store.book[*]")
+    .exclude("$.store.book[*].category")
+    .exclude("$.store.book[*].isbn")
+    .exclude("$.store.basket[*]")
+    .exclude("$.store.basket[*][0]")
+    .exclude("$.store.basket[0][*]")
+    .exclude("$.store.basket[*][*]")
+    .exclude("$.store.basket[0][*].b")
+    .exclude("$.zip code")
+    .exclude("$.fb:testid")
+    .exclude("from_json - invalid data")
+    .exclude("from_json - input=object, schema=array, output=array of single 
row")
+    .exclude("from_json - input=empty object, schema=array, output=array of 
single row with null")
+    .exclude("from_json - input=array of single object, schema=struct, 
output=single row")
+    .exclude("from_json - input=array, schema=struct, output=single row")
+    .exclude("from_json - input=empty array, schema=struct, output=single row 
with null")
+    .exclude("from_json - input=empty object, schema=struct, output=single row 
with null")
+    .exclude("SPARK-20549: from_json bad UTF-8")
+    .exclude("from_json with timestamp")
+    .exclude("to_json - struct")
+    .exclude("to_json - array")
+    .exclude("to_json - array with single empty row")
+    .exclude("to_json with timestamp")
+    .exclude("SPARK-21513: to_json support map[string, struct] to json")
+    .exclude("SPARK-21513: to_json support map[struct, struct] to json")
+    .exclude("parse date with locale")
+    .exclude("parse decimals using locale")
+    // NOT use gluten
+    .exclude("$..no_recursive")
+    .exclude("non foldable literal")
+    .exclude("some big value")
+    .exclude("from/to json - interval support")
+    .exclude("SPARK-24709: infer schema of json strings")
+    .exclude("infer schema of JSON strings by using options")
+    .exclude("inferring the decimal type using locale")
+    .exclude("json_object_keys")
   enableSuite[GlutenJsonFunctionsSuite]
     .exclude("from_json with option")
     .exclude("from_json missing columns")
diff --git 
a/gluten-ut/spark34/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
 
b/gluten-ut/spark34/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
new file mode 100644
index 0000000000..f9d314e508
--- /dev/null
+++ 
b/gluten-ut/spark34/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.sql.catalyst.expressions
+
+import org.apache.spark.sql.GlutenTestsTrait
+
+class GlutenJsonExpressionsSuite extends JsonExpressionsSuite with 
GlutenTestsTrait {}
diff --git 
a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
 
b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
index d7b6d509cd..9fb1f2d34f 100644
--- 
a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
+++ 
b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala
@@ -386,6 +386,43 @@ class ClickHouseTestSettings extends BackendTestSettings {
   enableSuite[GlutenIntervalFunctionsSuite]
   enableSuite[GlutenJoinSuite].exclude(
     "SPARK-36794: Ignore duplicated key when building relation for semi/anti 
hash join")
+  enableSuite[GlutenJsonExpressionsSuite]
+    .exclude("$.store.book[*]")
+    .exclude("$.store.book[*].category")
+    .exclude("$.store.book[*].isbn")
+    .exclude("$.store.basket[*]")
+    .exclude("$.store.basket[*][0]")
+    .exclude("$.store.basket[0][*]")
+    .exclude("$.store.basket[*][*]")
+    .exclude("$.store.basket[0][*].b")
+    .exclude("$.zip code")
+    .exclude("$.fb:testid")
+    .exclude("from_json - invalid data")
+    .exclude("from_json - input=object, schema=array, output=array of single 
row")
+    .exclude("from_json - input=empty object, schema=array, output=array of 
single row with null")
+    .exclude("from_json - input=array of single object, schema=struct, 
output=single row")
+    .exclude("from_json - input=array, schema=struct, output=single row")
+    .exclude("from_json - input=empty array, schema=struct, output=single row 
with null")
+    .exclude("from_json - input=empty object, schema=struct, output=single row 
with null")
+    .exclude("SPARK-20549: from_json bad UTF-8")
+    .exclude("from_json with timestamp")
+    .exclude("to_json - struct")
+    .exclude("to_json - array")
+    .exclude("to_json - array with single empty row")
+    .exclude("to_json with timestamp")
+    .exclude("SPARK-21513: to_json support map[string, struct] to json")
+    .exclude("SPARK-21513: to_json support map[struct, struct] to json")
+    .exclude("parse date with locale")
+    .exclude("parse decimals using locale")
+    // NOT use gluten
+    .exclude("$..no_recursive")
+    .exclude("non foldable literal")
+    .exclude("some big value")
+    .exclude("from/to json - interval support")
+    .exclude("SPARK-24709: infer schema of json strings")
+    .exclude("infer schema of JSON strings by using options")
+    .exclude("inferring the decimal type using locale")
+    .exclude("json_object_keys")
   enableSuite[GlutenJsonFunctionsSuite]
     .exclude("from_json with option")
     .exclude("from_json missing columns")
diff --git 
a/gluten-ut/spark35/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
 
b/gluten-ut/spark35/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
new file mode 100644
index 0000000000..f9d314e508
--- /dev/null
+++ 
b/gluten-ut/spark35/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenJsonExpressionsSuite.scala
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.sql.catalyst.expressions
+
+import org.apache.spark.sql.GlutenTestsTrait
+
+class GlutenJsonExpressionsSuite extends JsonExpressionsSuite with 
GlutenTestsTrait {}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to