mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-22 15:32:48 +00:00
Remove Validation On Display Datatype (#11208)
This commit is contained in:
parent
ea20309d1f
commit
99f7a0e447
@ -144,11 +144,6 @@ public final class DatabaseUtil {
|
|||||||
if (column.getArrayDataType() == null) {
|
if (column.getArrayDataType() == null) {
|
||||||
throw new IllegalArgumentException("For column data type array, arrayDataType " + "must not be null");
|
throw new IllegalArgumentException("For column data type array, arrayDataType " + "must not be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!column.getDataTypeDisplay().startsWith("array<")) {
|
|
||||||
throw new IllegalArgumentException(
|
|
||||||
"For column data type array, dataTypeDisplay must be of type " + "array<arrayDataType>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,10 +155,6 @@ public final class DatabaseUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validateColumnNames(column.getChildren());
|
validateColumnNames(column.getChildren());
|
||||||
if (!column.getDataTypeDisplay().startsWith("struct<")) {
|
|
||||||
throw new IllegalArgumentException(
|
|
||||||
"For column data type struct, dataTypeDisplay must be of type " + "struct<member fields>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,13 +214,6 @@ public class TableResourceTest extends EntityResourceTest<Table, CreateTable> {
|
|||||||
() -> createEntity(create, ADMIN_AUTH_HEADERS),
|
() -> createEntity(create, ADMIN_AUTH_HEADERS),
|
||||||
BAD_REQUEST,
|
BAD_REQUEST,
|
||||||
"For column data type array, arrayDataType must not be null");
|
"For column data type array, arrayDataType must not be null");
|
||||||
|
|
||||||
// No dataTypeDisplay passed for array
|
|
||||||
columns.get(0).withArrayDataType(INT).withDataTypeDisplay(null);
|
|
||||||
assertResponse(
|
|
||||||
() -> createEntity(create, ADMIN_AUTH_HEADERS),
|
|
||||||
BAD_REQUEST,
|
|
||||||
"For column data type array, dataTypeDisplay must be of type array<arrayDataType>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user