Open xxchan opened 3 months ago
This issue has been open for 60 days with no activity.
If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity
label.
You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄
Separated from the discussion of https://github.com/risingwavelabs/risingwave/pull/17485#discussion_r1668012859
The problem of logicalType in Union
First of all, in Avro
enum
or Protobufoneof
There are 2 main questions
["int", {"type":"int", "logicalType": "date"}]
.but currently Rust Avro lib will reject it.struct<"double" double, "date" date>
vsstruct<"double" double, "int" date>
decimal
(the physical type is a named type)[{"type":"fixed","name":"Decimal128","size":16,"logicalType":"decimal","precision":38,"scale":2}, {"type":"fixed","name":"Decimal256","size":32,"logicalType":"decimal","precision":50,"scale":2}]
decimal
is still ok; but if we have 2 in the example (it's a valid schema), we cannot now.Therefore, we decided to ban it for now. If you have such usage, we'd like to hear what you think!
Example about how logicalType look like
https://avro.apache.org/docs/1.11.1/specification/_print/#logical-types
schema:
["null", {"type":"string","logicalType":"uuid"}]
data:
{"string": "67e55044-10b1-426f-9247-bb680e5fe0c8"}
(The data is exactly the same as the physical type)