-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve docs for shape and a la carte shaping functions #5172
Conversation
docs/language/functions/fill.md
Outdated
The order of newly added fields relative to fields already present is | ||
undefined. If maintaining relative order is important, consider applying the | ||
[`order`](./order.md) or [`shape`](./shape) function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stuck with "undefined" since I don't know the code. If we think there's something more detailed we could say that's not too complicated I'd be happy to set more explicit expectations (e.g., if/when it can be expected to append the new fields).
docs/language/functions/fill.md
Outdated
The order of newly added fields relative to fields already present is | ||
undefined. If maintaining relative order is important, consider applying the | ||
[`order`](./order.md) or [`shape`](./shape.md) function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fields are added in the order they appear in the input record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, fill
essentially happens here:
(That's inside a loop that, for fill
, iterates over the fields of the input record.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After seeing @nwt's comments here we had a quick offline chat and agreed on some text to clarify where fill
adds the fields rather than the "undefined" I had before. I've pushed a commit with that change.
When it comes to working with records, we've had some internal consensus that users will probably prefer
shape
most of the time whereas the "a la carte" functionscast
,fill
, andorder
are probably going to see more limited use. Addressing the questions posed by the community user that opened #5168 made me realize this is not really called out in the docs, so I'm attempting to do that here, along with a couple other bits of polish I saw in the pages along the way.