AnzhiZhang commented on issue #3555: URL: https://github.com/apache/texera/issues/3555#issuecomment-3181730078
## Reason The `required = true` does not apply to the frontend. <img width="251" height="129" alt="Image" src="https://github.com/user-attachments/assets/11350cf5-a222-4858-97a8-72177b80ed90" /> https://github.com/apache/texera/blob/12849accf7a1734ba0fd7feeabbf4df9e0bff812/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/tuple/Attribute.java#L37-L56 This is the generated JSON schema. Neither property is required. ``` { "type" : "object", "id" : "urn:jsonschema:edu:uci:ics:amber:core:tuple:Attribute", "properties" : { "attributeName" : { "type" : "string" }, "attributeType" : { "type" : "string", "enum" : [ "string", "integer", "long", "double", "boolean", "timestamp", "binary", "" ] } } } ``` The reason is that getters overwrite the `@JsonProperty` definition in the constructor. Properties from getters do not match properties from the constructor. ## Solution 1. Rename getters to match the property name given in the constructor, and we can remove `@JsonProperty` on the getter. 2. Add `required = true` to getters `@JsonProperty`. 3. Add a new type to define attributes and use it in UDFs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
