如何为 Map<Integer,Map<Integer,Float>> 创建 Avro 模式?

How to create Avro schema for Map<Integer,Map<Integer,Float>>?

map of map的文档不是很清楚。我正在尝试将这样的对象 (Map>) 序列化为 Avro,我该如何实现。

{"namespace": "example",
 "type": "map",
 "name": "Map",
 "keys": "int",
 "values": {
  "type":"map",
  "keys":"int",
  "values":"float" 
 }
}  

我自己的解决方案:

{"namespace": "Schema",
  "name":"PvMap",
  "type":"record",
  "fields":[
  {"name": "TradeId", "type": "int"},
    { "name": "Tmap",
      "type":{
      "type":"map",
      "values":"float"}
      }
  ]
}