Description
Currently, the Gravitino Web UI does not fully support creating Doris tables with range or list partitions. Several improvements are needed to make this workflow functional end-to-end.
Current issues
1. Range partition field reset bug
When filling in Range Partition fields (Name, Upper Bound, Lower Bound), entering a value in one field resets the other fields. This is caused by Ant Design Form.useWatch triggering cascading re-renders that overwrite sibling field values when used inside nested Form.List.
2. Range partition missing type field in JSON
The backend requires each assignment object to include type: "range" and properties: null, but the frontend was only sending { name, upper, lower }, causing a Malformed json request error (code 1001).
3. List partition UI not implemented
The UI had no support for list partition interaction, submission, or display. Users could select the "list" strategy but could not define partition assignments (name + values).
4. List partition lists semantics mismatch
The backend expects LiteralDTO[][] where each inner array represents one IN tuple whose length must equal the number of partition columns. The initial frontend implementation incorrectly treated comma-separated values as a single tuple instead of splitting them for single-column partitions, causing The number of partitioning columns must be consistent error (code 1001).
5. Doris list partition column must be NOT NULL
Doris requires list partition columns to be NOT NULL, but the UI does not enforce or auto-set this constraint, causing The list partition column must be NOT NULL error (code 1002).
6. Doris OLAP table first column type restriction
Doris OLAP tables do not allow float, double, string, or array as the first column. The UI does not warn users about this, causing The olap table first column could not be float, double, string or array error (code 1002).
Proposed improvements
-
Fix range partition field reset: Use form.getFieldValue() for synchronous reads instead of Form.useWatch for columns/fieldName, and manage assignment state via form.setFieldValue directly instead of nested Form.List. Use CSS hidden instead of conditional rendering to prevent Form.List unmount/remount.
-
Add type and properties fields: Include type: "range" / type: "list" and properties: null in assignment objects submitted to the backend.
-
Implement list partition UI: Add ListAssignments component with support for multiple value groups (each group = one IN tuple), matching the backend LiteralDTO[][] semantics.
-
Correct lists construction: For single-column partitions, split comma-separated values into individual tuples ([[v1], [v2], [v3]]). For multi-column partitions, keep all values in one tuple ([[v1, v2]]).
-
Auto-set NOT NULL for list partition columns: When strategy is "list" and provider is "jdbc-doris", automatically set the partition column to required: true.
-
Add validation hints for Doris-specific restrictions: Warn users when the first column type is float/double/string for Doris tables.
Affected files
web-v2/web/src/components/PartitionPanel.js - Partition UI components
web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js - Table creation dialog
web-v2/web/src/config/index.js - Partition configuration
Related
Description
Currently, the Gravitino Web UI does not fully support creating Doris tables with range or list partitions. Several improvements are needed to make this workflow functional end-to-end.
Current issues
1. Range partition field reset bug
When filling in Range Partition fields (Name, Upper Bound, Lower Bound), entering a value in one field resets the other fields. This is caused by Ant Design
Form.useWatchtriggering cascading re-renders that overwrite sibling field values when used inside nestedForm.List.2. Range partition missing
typefield in JSONThe backend requires each assignment object to include
type: "range"andproperties: null, but the frontend was only sending{ name, upper, lower }, causing aMalformed json requesterror (code 1001).3. List partition UI not implemented
The UI had no support for list partition interaction, submission, or display. Users could select the "list" strategy but could not define partition assignments (name + values).
4. List partition
listssemantics mismatchThe backend expects
LiteralDTO[][]where each inner array represents one IN tuple whose length must equal the number of partition columns. The initial frontend implementation incorrectly treated comma-separated values as a single tuple instead of splitting them for single-column partitions, causingThe number of partitioning columns must be consistenterror (code 1001).5. Doris list partition column must be NOT NULL
Doris requires list partition columns to be
NOT NULL, but the UI does not enforce or auto-set this constraint, causingThe list partition column must be NOT NULLerror (code 1002).6. Doris OLAP table first column type restriction
Doris OLAP tables do not allow
float,double,string, orarrayas the first column. The UI does not warn users about this, causingThe olap table first column could not be float, double, string or arrayerror (code 1002).Proposed improvements
Fix range partition field reset: Use
form.getFieldValue()for synchronous reads instead ofForm.useWatchfor columns/fieldName, and manage assignment state viaform.setFieldValuedirectly instead of nestedForm.List. Use CSShiddeninstead of conditional rendering to prevent Form.List unmount/remount.Add
typeandpropertiesfields: Includetype: "range"/type: "list"andproperties: nullin assignment objects submitted to the backend.Implement list partition UI: Add
ListAssignmentscomponent with support for multiple value groups (each group = one IN tuple), matching the backendLiteralDTO[][]semantics.Correct
listsconstruction: For single-column partitions, split comma-separated values into individual tuples ([[v1], [v2], [v3]]). For multi-column partitions, keep all values in one tuple ([[v1, v2]]).Auto-set NOT NULL for list partition columns: When strategy is "list" and provider is "jdbc-doris", automatically set the partition column to
required: true.Add validation hints for Doris-specific restrictions: Warn users when the first column type is
float/double/stringfor Doris tables.Affected files
web-v2/web/src/components/PartitionPanel.js- Partition UI componentsweb-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js- Table creation dialogweb-v2/web/src/config/index.js- Partition configurationRelated