From 09b7b5cbf84058c92f22e1de814552f64468835c Mon Sep 17 00:00:00 2001 From: YANGDB Date: Wed, 11 Dec 2024 14:51:26 -0800 Subject: [PATCH] update PR to only inclide json_delete json_append Signed-off-by: YANGDB --- ...PlanJsonFunctionsTranslatorTestSuite.scala | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanJsonFunctionsTranslatorTestSuite.scala b/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanJsonFunctionsTranslatorTestSuite.scala index 23f6ba5d2..5a09af992 100644 --- a/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanJsonFunctionsTranslatorTestSuite.scala +++ b/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanJsonFunctionsTranslatorTestSuite.scala @@ -235,31 +235,7 @@ class PPLLogicalPlanJsonFunctionsTranslatorTestSuite val expectedPlan = Project(Seq(UnresolvedStar(None)), eval) comparePlans(expectedPlan, logPlan, false) } - - test("test json_extend()") { - val context = new CatalystPlanContext - val logPlan = - planTransformer.visit( - plan( - pplParser, - """source=t | eval result = json_extend('{"a":[{"b":1},{"c":2}]}', array('a.b', 'c','d'))"""), - context) - - val table = UnresolvedRelation(Seq("t")) - val keysExpression = - UnresolvedFunction( - "array", - Seq(Literal("a.b"), Literal("c"), Literal("d")), - isDistinct = false) - val jsonObjExp = - Literal("""{"a":[{"b":1},{"c":2}]}""") - val jsonFunc = - Alias(visit("json_extend", util.List.of(jsonObjExp, keysExpression)), "result")() - val eval = Project(Seq(UnresolvedStar(None), jsonFunc), table) - val expectedPlan = Project(Seq(UnresolvedStar(None)), eval) - comparePlans(expectedPlan, logPlan, false) - } - + test("test json_keys()") { val context = new CatalystPlanContext val logPlan =