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

tolerate null transformation attrs in ColumnLineageInputField #2600

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public class ColumnLineageInputField {
@NotNull private String namespace;
@NotNull private String dataset;
@NotNull private String field;
@NotNull private String transformationDescription;
@NotNull private String transformationType;
private String transformationDescription;
private String transformationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public class ColumnLineageInputField {
@NonNull private String namespace;
@NonNull private String dataset;
@NonNull private String field;
@NonNull String transformationDescription;
@NonNull String transformationType;
private String transformationDescription;
private String transformationType;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2018-2023 contributors to the Marquez project
* SPDX-License-Identifier: Apache-2.0
*/

package marquez.client.models;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

import org.junit.jupiter.api.Test;

@org.junit.jupiter.api.Tag("UnitTests")
public class ColumnLineageInputFieldTest {
@Test
void testToleratesNullTransformationTypeAndDescription() {
ColumnLineageInputField field = new ColumnLineageInputField("ns", "ds", "field", null, null);

assertEquals("ns", field.getNamespace());
assertEquals("ds", field.getDataset());
assertEquals("field", field.getField());
assertNull(field.getTransformationDescription());
assertNull(field.getTransformationType());
}
}