trino icon indicating copy to clipboard operation
trino copied to clipboard

Enforcing procedure name args only

Open aczajkowski opened this issue 3 years ago • 6 comments

Enforcing using named arguments when calling procedure

aczajkowski avatar Jan 11 '22 17:01 aczajkowski

@martint @electrum applied requested changes + added background on this change motivation. Let me know if this is ok to proceed ?

aczajkowski avatar Jan 21 '22 17:01 aczajkowski

@martint @electrum Rebased on top of master due to conflicts.

aczajkowski avatar Jan 24 '22 17:01 aczajkowski

@martint is there any update on this. Should i close this PR ?

aczajkowski avatar Mar 21 '22 14:03 aczajkowski

@martint is there any update on this. Should i close this PR ?

@martint bump

losipiuk avatar May 31 '22 10:05 losipiuk

@martint is there any update on this. Should i close this PR ?

@martint bump

@martint any update around your concern here https://github.com/trinodb/trino/pull/10545#discussion_r782365496

aczajkowski avatar Aug 18 '22 13:08 aczajkowski

@martint @electrum @losipiuk bump

aczajkowski avatar Sep 20 '22 15:09 aczajkowski

I like it. As @martint says it may be deviating from the SQL spec, but it makes sense in certain situations. In fact, there are entire languages which don't have positional arguments, only named ones.

Also we are not disallowing using positional arguments at all. It's just one procedure definition that disallows it's usage. So our spec is compatible but in some cases we just limit it for a specific use case.

aczajkowski avatar Sep 22 '22 10:09 aczajkowski

It's just one procedure definition that disallows it's usage.

From what I see the given procedure was already like that, it already required named arguments. We just remove hack and have dedicated support for such procedures.

@martint let me know if you have any more comments, otherwise I would like to merge it

kokosing avatar Sep 22 '22 10:09 kokosing

Merged, thanks!

kokosing avatar Sep 23 '22 12:09 kokosing

Hey, do we think this needs a release note, or is it just better and more clear error handling?

cc @kokosing

colebow avatar Sep 27 '22 17:09 colebow

@colebow my opinion is that is just internal mechanics.

aczajkowski avatar Sep 27 '22 19:09 aczajkowski