blob: 6ec84b40da0fe393feaec1fc11e156594c8036d5 [file] [log] [blame]
// 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
//
// http://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.
// Common protobuf definitions.
syntax="proto2";
package impala;
// Refer to Types.thrift for documentation.
message NetworkAddressPB {
required string hostname = 1;
required int32 port = 2;
}
// Proto-serialized version of Impala's Status object.
message StatusPB {
optional int32 status_code = 1;
repeated string error_msgs = 2;
}
// 128-bit ID (equivalent to TUniqueID).
message UniqueIdPB {
required fixed64 hi = 1;
required fixed64 lo = 2;
}
// The compression codec. Currently used in row batch's header to
// indicate the type of compression applied to the row batch.
enum CompressionType {
NONE = 0; // No compression.
LZ4 = 1;
}
// This is a union over all possible return types.
// TODO: if we upgrade to proto3, then we can use the oneof feature in Protobuf 3 in
// the following to save some memory because only one of the fields below is set at a
// time.
message ColumnValuePB {
optional bool bool_val = 1;
optional int32 byte_val = 6;
optional int32 short_val = 7;
optional int32 int_val = 2;
optional int64 long_val = 3;
optional double double_val = 4;
optional string string_val = 5;
optional string binary_val = 8;
optional string timestamp_val = 9;
optional bytes decimal_val = 10;
}