twalthr commented on code in PR #26638:
URL: https://github.com/apache/flink/pull/26638#discussion_r2132094866
##########
docs/content.zh/docs/dev/table/types.md:
##########
@@ -1281,15 +1293,51 @@ For some classes an annotation is required in order to
map the class to a data t
to assign a fixed precision and scale for `java.math.BigDecimal`).
{{< /tab >}}
{{< tab "Python" >}}
+```python
+Not supported.
+```
{{< /tab >}}
{{< /tabs >}}
**Declaration**
{{< tabs "c5e5527b-b09d-4dc5-9549-8fd2bfc7cc2a" >}}
-{{< tab "Java" >}}
+{{< tab "Java/Scala" >}}
+Structured types are usually declared via their implementation classes:
+
```java
-class User {
+// A simple POJO that qualifies as a structured type.
+// Note: Without a fully assigning constructor, the order of fields will be
alphabetical.
+// The final data type will be:
+// STRUCTURED<'com.myorg.Customer', active BOOLEAN, id INT NOT NULL, name
STRING, properties MAP<STRING, STRING>>
+class Customer {
+ public int id;
+ public String name;
+ public Map<String, String> properties;
+ public boolean active;
+}
+
+// A POJO with a fully assigning constructor defining the field order.
+// The final data type will be:
+// STRUCTURED<'com.myorg.Customer', id INT NOT NULL, name STRING, properties
MAP<STRING, STRING>, active BOOLEAN>
Review Comment:
exactly, primitive ints are mapped to NOT NULL during reflective extraction
--
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]