-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Core: add variant type support #11831
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
Changes from all commits
b8f721f
9a07342
31b0ee3
82f654c
fcb3b67
50d1482
f53769b
93586e3
1d54ff4
9082cab
1472417
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ public void testIdentityTypes() throws Exception { | |
| Types.StringType.get(), | ||
| Types.UUIDType.get(), | ||
| Types.BinaryType.get(), | ||
| Types.UnknownType.get() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aihuaxu, why not add variant as well?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variant test is already added below. Since for variant, we need to test with isEqualTo() instead of isSameAs().
|
||
| }; | ||
|
|
||
| for (Type type : identityPrimitives) { | ||
|
|
@@ -136,15 +137,6 @@ public void testVariant() throws Exception { | |
| .isEqualTo(variant); | ||
| } | ||
|
|
||
| @Test | ||
| public void testUnknown() throws Exception { | ||
| Types.UnknownType unknown = Types.UnknownType.get(); | ||
| Type copy = TestHelpers.roundTripSerialize(unknown); | ||
| assertThat(copy) | ||
| .as("Unknown serialization should be equal to starting type") | ||
| .isEqualTo(unknown); | ||
| } | ||
|
|
||
| @Test | ||
| public void testSchema() throws Exception { | ||
| Schema schema = | ||
|
|
||
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.
This is tested by
TestSerializableTypes. Can you add new cases for variant (and the other new types, while you're updating it)?Uh oh!
There was an error while loading. Please reload this page.
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.
The new type tests have been added in
TestSerializableTypes. But let me refactor a little bit for testUnknown() which should be tested withisSameAs(), same as other primitive types.testVariant()is testing withisEqualTo().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.
Looks like the test for this is missing variant.