mirror of
https://github.com/apache/impala.git
synced 2026-01-01 09:00:42 -05:00
This patch replaces ColumnType with a hierarchy of types that models the existing scalar types as well as the new complex types ARRAY, MAP, and STRUCT. Change-Id: Ia895f41153e99febb0c35412acac12689c3c2064 Reviewed-on: http://gerrit.ent.cloudera.com:8080/3491 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/3538
68 lines
2.1 KiB
Thrift
68 lines
2.1 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 "CatalogObjects.thrift"
|
|
include "Types.thrift"
|
|
include "Exprs.thrift"
|
|
|
|
struct TSlotDescriptor {
|
|
1: required Types.TSlotId id
|
|
2: required Types.TTupleId parent
|
|
3: required Types.TColumnType slotType
|
|
// TODO: Make this a list of positions to support SlotRefs into struct fields.
|
|
4: required i32 columnPos // in originating table
|
|
5: required i32 byteOffset // into tuple
|
|
6: required i32 nullIndicatorByte
|
|
7: required i32 nullIndicatorBit
|
|
9: required i32 slotIdx
|
|
10: required bool isMaterialized
|
|
}
|
|
|
|
// "Union" of all table types.
|
|
struct TTableDescriptor {
|
|
1: required Types.TTableId id
|
|
2: required CatalogObjects.TTableType tableType
|
|
3: required i32 numCols
|
|
4: required i32 numClusteringCols
|
|
// Names of the columns. Clustering columns come first.
|
|
10: optional list<string> colNames;
|
|
5: optional CatalogObjects.THdfsTable hdfsTable
|
|
6: optional CatalogObjects.THBaseTable hbaseTable
|
|
9: optional CatalogObjects.TDataSourceTable dataSourceTable
|
|
|
|
// Unqualified name of table
|
|
7: required string tableName;
|
|
|
|
// Name of the database that the table belongs to
|
|
8: required string dbName;
|
|
}
|
|
|
|
struct TTupleDescriptor {
|
|
1: required Types.TTupleId id
|
|
2: required i32 byteSize
|
|
3: required i32 numNullBytes
|
|
4: optional Types.TTableId tableId
|
|
}
|
|
|
|
struct TDescriptorTable {
|
|
1: optional list<TSlotDescriptor> slotDescriptors;
|
|
2: required list<TTupleDescriptor> tupleDescriptors;
|
|
|
|
// all table descriptors referenced by tupleDescriptors
|
|
3: optional list<TTableDescriptor> tableDescriptors;
|
|
}
|