Skip to content

docs: add documents to substrait type variation consts - #10719

Merged
alamb merged 3 commits into
apache:mainfrom
waynexia:doc-substrait-type-var
May 31, 2024
Merged

docs: add documents to substrait type variation consts#10719
alamb merged 3 commits into
apache:mainfrom
waynexia:doc-substrait-type-var

Conversation

@waynexia

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #.

Rationale for this change

Follow-up of #10646 (comment). Document those type variation consts and link to the corresponding substrait website.

What changes are included in this PR?

This patch also renames *_TYPE_REF to _TYPE_VAR_REF to distinguish "type reference" for user-defined type and "type variation reference" for type variation.

Are these changes tested?

Are there any user-facing changes?

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@github-actionsgithub-actionsBot added the substrait Changes to the substrait crate label May 30, 2024

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Thank you @waynexia for making the code eaiser to read

When I see "var" I often think it is shorthand for "variable" but in this case it is VARIATION

Maybe it would be clearer to name these constants with the full name, something like
DATE_32_TYPE_VAR_REF --> DATE_32_TYPE_VARIATION_REF ?

Though maybe that is too long

cc @Blizzara perhaps you can review this as well?

pub const DECIMAL_256_TYPE_REF: u32 = 1;
// For [type variations](https://substrait.io/types/type_variations/#type-variations) in substrait.
// Type variations are used to represent different types based on one type class.
/// The "system-preferred" variation (i.e., no variation).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add here something like a TODO: move the non-system-preferred variations into a SimpleExtension to make it clear that this is not the final form?

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@Blizzara

Copy link
Copy Markdown
Contributor

LGTM!

@waynexia

Copy link
Copy Markdown
MemberAuthor

Thanks for your review @alamb@Blizzara 👍

Maybe add here something like a TODO: move the non-system-preferred variations into a SimpleExtension to make it clear that this is not the final form?

I add a paragraph to the mod-level doc

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@alamb
alamb merged commit 76f50b0 into apache:mainMay 31, 2024
@alamb

Copy link
Copy Markdown
Contributor

Thanks @waynexia and @Blizzara

@waynexia
waynexia deleted the doc-substrait-type-var branch May 31, 2024 09:56
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* docs: add documents to substrait type variation consts
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
* rename and add todo
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
* fix link style
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

substraitChanges to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@waynexia@Blizzara@alamb