Skip to content

Commit

Permalink
tolerate null transformation attrs in field model
Browse files Browse the repository at this point in the history
Signed-off-by: David Goss <david.goss@matillion.com>
  • Loading branch information
davidjgoss committed Aug 17, 2023
1 parent 6f75fc6 commit 82c81da
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
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,24 @@
/*
* Copyright 2018-2023 contributors to the Marquez project
* SPDX-License-Identifier: Apache-2.0
*/

package marquez.client.models;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

@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());
}
}

0 comments on commit 82c81da

Please sign in to comment.