| <html> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| https://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <body><a href="https://thrift.apache.org/">Thrift</a> compatibility. |
| |
| <p>Thrift primitive types are mapped to Avro schemas as follows:</p> |
| <table> |
| <tr><th>Thrift type</th><th>Avro schema</th></tr> |
| <tr><td>bool</td><td>"boolean"</td></tr> |
| <tr><td>byte</td><td>{"type": "int", "thrift": "byte"}</td></tr> |
| <tr><td>i16</td><td>{"type": "int", "thrift": "short"}</td></tr> |
| <tr><td>i32</td><td>"int"</td></tr> |
| <tr><td>i64</td><td>"long"</td></tr> |
| <tr><td>double</td><td>"double"</td></tr> |
| <tr><td>string</td><td>"string"</td></tr> |
| <tr><td>binary</td><td>"bytes"</td></tr> |
| </table> |
| |
| <p>Thrift complex types are mapped to Avro complex types as follows:</p> |
| <table> |
| <tr><th>Thrift</th><th>Avro</th></tr> |
| <tr><td>struct</td><td>record</td></tr> |
| <tr><td>enum</td><td>enum</td></tr> |
| <tr><td>list</td><td>array</td></tr> |
| <tr><td>set</td><td>array <em>(Note: "thrift":"set" is added to schema.)</em></td></tr> |
| <tr><td>map</td><td>map <em>(Note: only string keys are permitted.)</em></td></tr> |
| </table> |
| |
| </body> |
| </html> |