@@ -722,12 +722,40 @@ public <S> T visit(JsonAggregateFunction jsonAggregateFunction, S context) {
722722 @ Override
723723 public <S > T visit (JsonFunction jsonFunction , S context ) {
724724 ArrayList <Expression > subExpressions = new ArrayList <>();
725+ for (JsonKeyValuePair keyValuePair : jsonFunction .getKeyValuePairs ()) {
726+ if (keyValuePair .getKey () instanceof Expression ) {
727+ subExpressions .add ((Expression ) keyValuePair .getKey ());
728+ }
729+ if (keyValuePair .getValue () instanceof Expression ) {
730+ subExpressions .add ((Expression ) keyValuePair .getValue ());
731+ }
732+ }
725733 for (JsonFunctionExpression expr : jsonFunction .getExpressions ()) {
726734 subExpressions .add (expr .getExpression ());
727735 }
736+ if (jsonFunction .getInputExpression () != null ) {
737+ subExpressions .add (jsonFunction .getInputExpression ().getExpression ());
738+ }
739+ if (jsonFunction .getJsonPathExpression () != null ) {
740+ subExpressions .add (jsonFunction .getJsonPathExpression ());
741+ }
742+ subExpressions .addAll (jsonFunction .getPassingExpressions ());
743+ if (jsonFunction .getOnEmptyBehavior () != null
744+ && jsonFunction .getOnEmptyBehavior ().getExpression () != null ) {
745+ subExpressions .add (jsonFunction .getOnEmptyBehavior ().getExpression ());
746+ }
747+ if (jsonFunction .getOnErrorBehavior () != null
748+ && jsonFunction .getOnErrorBehavior ().getExpression () != null ) {
749+ subExpressions .add (jsonFunction .getOnErrorBehavior ().getExpression ());
750+ }
728751 return visitExpressions (jsonFunction , context , subExpressions );
729752 }
730753
754+ @ Override
755+ public <S > T visit (JsonTableFunction jsonTableFunction , S context ) {
756+ return visitExpressions (jsonTableFunction , context , jsonTableFunction .getAllExpressions ());
757+ }
758+
731759 @ Override
732760 public <S > T visit (ConnectByRootOperator connectByRootOperator , S context ) {
733761 return connectByRootOperator .getColumn ().accept (this , context );
0 commit comments