delta-sharing icon indicating copy to clipboard operation
delta-sharing copied to clipboard

Document behavior if JSON body contains extra fields

Open polsm91 opened this issue 3 years ago • 1 comments

To my knowledge, the current protocol does not specify how to behave if extra attributes are sent as part of the JSON bodies.

As an example, the following succeeds (HTTP Code 200):

curl  -H 'content-type: application/json' -H "Authorization: Bearer XXX" \
https://sharing.delta.io/delta-sharing/shares/delta_sharing/schemas/default/tables/COVID_19_NYT/query \
--data '{"limitHint": 1000 , "abracadabra": 123}'

I feel that the expected behavior should be documented as part of the protocol to ensure compatibility. Personally, I would ignore the extra fields (current behavior), which allows for increased extensibility and compatibility between multiple clients/servers. It is a matter of trade-offs.

On a side note, I noticed that the link to the technical charter is not working.

polsm91 avatar Jun 14 '22 19:06 polsm91

Thanks! @polsm91
Yes extra fields will be ignored, that should be expected for most users. We can make a documentation change later.

We'll check the link and update it.

linzhou-db avatar Oct 21 '22 22:10 linzhou-db