0

I did not find much about BINARY data types in apache docs: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types

I created a table with BINARY column using-

create table table1(col1 binary);

After fetching metadata via JDBC I found,

columnSize:2147483647

Is there any official document for this?

Dev
  • 13,492
  • 19
  • 81
  • 174

1 Answers1

2

From the Binary DataType Proposal :

How is 'binary' represented internally in Hive

Binary type in Hive will map to 'binary' data type in thrift.

Primitive java object for 'binary' type is ByteArrayRef

PrimitiveWritableObject for 'binary' type is BytesWritable

And since ByteArrayRef holds a reference to a byte array, the answer should be Integer.MAX_VALUE - 5, see here

Community
  • 1
  • 1
54l3d
  • 3,913
  • 4
  • 32
  • 58