Skip to content

Commit c137d53

Browse files
author
James Cor
committed
fix external procs
1 parent 981ed7f commit c137d53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/rowexec/rel.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,12 +730,17 @@ func (b *BaseBuilder) buildExternalProcedure(ctx *sql.Context, n *plan.ExternalP
730730
}
731731
for i, paramDefinition := range n.ParamDefinitions {
732732
if paramDefinition.Direction == plan.ProcedureParamDirection_Inout || paramDefinition.Direction == plan.ProcedureParamDirection_Out {
733+
// TODO: not sure if we should still be doing this
733734
exprParam := n.Params[i]
734735
funcParamVal := funcParams[i+1].Elem().Interface()
735736
err := exprParam.Set(funcParamVal, exprParam.Type())
736737
if err != nil {
737738
return nil, err
738739
}
740+
err = ctx.Session.SetStoredProcParam(exprParam.Name(), funcParamVal)
741+
if err != nil {
742+
return nil, err
743+
}
739744
}
740745
}
741746
// It's not invalid to return a nil RowIter, as having no rows to return is expected of many stored procedures.

0 commit comments

Comments
 (0)