Skip to content
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

docs: add documents to substrait type variation consts #10719

Merged
merged 3 commits into from
May 31, 2024

Conversation

waynexia
Copy link
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?

Copy link
Contributor

@alamb alamb left a comment

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
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?

waynexia added 2 commits May 31, 2024 14:56
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
@Blizzara
Copy link
Contributor

LGTM!

@waynexia
Copy link
Member Author

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

Copy link
Contributor

@alamb alamb left a comment

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:main May 31, 2024
23 checks passed
@alamb
Copy link
Contributor

alamb commented May 31, 2024

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 <[email protected]>

* rename and add todo

Signed-off-by: Ruihang Xia <[email protected]>

* fix link style

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants