Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18148 )
Change subject: [tools] Kudu table schema in Avro format revisited ...................................................................... [tools] Kudu table schema in Avro format revisited This is a follow-up patch to 55cab44 addressing the additional comments posted after the change has been cherry picked. The tool now gives out the default value of the column and if the column is nullable. This tool is needed for improving the user's experience when using Kudu with other components in Cloudera's Data warehouse stack. Below is the data type mapping between Kudu and Avro schema types[1]: Kudu data type -> Avro schema data type boolean -> boolean 8-bit signed integer -> int (32-bit signed integer) 16-bit signed integer -> int (32-bit signed integer) 32-bit signed integer -> int (32-bit signed integer) 64-bit signed integer -> long (64-bit signed integer) date (32-bit days since the Unix epoch) -> int (logical type date) unixtime_micros (64-bit microseconds since the Unix epoch) -> long (logical type timestamp-micro) single-precision (32-bit) IEEE-754 floating-point number -> float (single precision (32-bit) IEEE 754 floating-point number) double-precision (64-bit) IEEE-754 floating-point number -> double (single precision (64-bit) IEEE 754 floating-point number) decimal -> bytes (logical type decimal) varchar -> string (unicode character sequence) UTF-8 encoded string (up to 64KB uncompressed) -> string binary (up to 64KB uncompressed) -> bytes (sequence of 8-bit unsigned bytes) Note: Since this tool doesn’t need any of the functions defined in Avro C++ libraries, we do not include the Avro library files in Kudu. [1] As defined in Avro version 1.11.0 https://avro.apache.org/docs/1.11.0/spec.html Change-Id: I0623812402a188e5b24bbde3db7ef0e3b4c618ec Reviewed-on: http://gerrit.cloudera.org:8080/18148 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/tools/kudu-admin-test.cc M src/kudu/tools/tool_action_table.cc 2 files changed, 85 insertions(+), 32 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/18148 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0623812402a188e5b24bbde3db7ef0e3b4c618ec Gerrit-Change-Number: 18148 Gerrit-PatchSet: 3 Gerrit-Owner: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
