mirror of
https://github.com/apache/impala.git
synced 2026-01-01 00:00:20 -05:00
This change will allow row-batch.cc to use LZ4 codec. It will be implemented in a following patch. Change-Id: I9302da1b72c83fcf8420724138d40ad0d82c554b Reviewed-on: http://gerrit.ent.cloudera.com:8080/3030 Reviewed-by: Paden Tomasello <paden.tomasello@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/3155
89 lines
2.6 KiB
Thrift
89 lines
2.6 KiB
Thrift
// Copyright 2012 Cloudera Inc.
|
|
//
|
|
// Licensed 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.
|
|
|
|
namespace cpp impala
|
|
namespace java com.cloudera.impala.thrift
|
|
|
|
include "Types.thrift"
|
|
include "CatalogObjects.thrift"
|
|
|
|
// Serialized, self-contained version of a RowBatch (in be/src/runtime/row-batch.h).
|
|
struct TRowBatch {
|
|
// total number of rows contained in this batch
|
|
1: required i32 num_rows
|
|
|
|
// row composition
|
|
2: required list<Types.TTupleId> row_tuples
|
|
|
|
// There are a total of num_rows * num_tuples_per_row offsets
|
|
// pointing into tuple_data.
|
|
// An offset of -1 records a NULL.
|
|
3: list<i32> tuple_offsets
|
|
|
|
// binary tuple data
|
|
// TODO: figure out how we can avoid copying the data during TRowBatch construction
|
|
4: string tuple_data
|
|
|
|
// Indicates the type of compression used
|
|
5: required CatalogObjects.THdfsCompression compression_type
|
|
|
|
// Indicates the uncompressed size
|
|
6:i32 uncompressed_size
|
|
}
|
|
|
|
// this is a union over all possible return types
|
|
struct TColumnValue {
|
|
1: optional bool bool_val
|
|
6: optional byte byte_val
|
|
7: optional i16 short_val
|
|
2: optional i32 int_val
|
|
3: optional i64 long_val
|
|
4: optional double double_val
|
|
5: optional string string_val
|
|
8: optional binary binary_val
|
|
}
|
|
|
|
struct TResultRow {
|
|
1: list<TColumnValue> colVals
|
|
}
|
|
|
|
// A union over all possible return types for a column of data
|
|
// Currently only used by ExternalDataSource types
|
|
struct TColumnData {
|
|
// One element in the list for every row in the column indicating if there is
|
|
// a value in the vals list or a null.
|
|
1: required list<bool> is_null;
|
|
|
|
// Only one is set, only non-null values are set.
|
|
2: optional list<bool> bool_vals;
|
|
3: optional list<byte> byte_vals;
|
|
4: optional list<i16> short_vals;
|
|
5: optional list<i32> int_vals;
|
|
6: optional list<i64> long_vals;
|
|
7: optional list<double> double_vals;
|
|
8: optional list<string> string_vals;
|
|
9: optional list<binary> binary_vals;
|
|
}
|
|
|
|
struct TResultSetMetadata {
|
|
1: required list<CatalogObjects.TColumn> columns
|
|
}
|
|
|
|
// List of rows and metadata describing their columns.
|
|
struct TResultSet {
|
|
1: required list<TResultRow> rows
|
|
2: required TResultSetMetadata schema
|
|
}
|
|
|