18 #ifndef KUDU_CLIENT_SCHEMA_H
19 #define KUDU_CLIENT_SCHEMA_H
29 #ifdef KUDU_HEADERS_NO_STUBS
30 #include "kudu/gutil/port.h"
32 #include "kudu/client/stubs.h"
35 #include "kudu/util/kudu_export.h"
41 struct ColumnSchemaDelta;
47 class RemoteKsckMaster;
54 class GetTableSchemaRpc;
95 int8_t precision()
const;
101 class KUDU_NO_EXPORT Data;
125 DEFAULT_COMPRESSION = 0,
147 int32_t block_size = 0)
148 ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
149 : encoding_(encoding),
150 compression_(compression),
151 block_size_(block_size) {
165 std::string ToString()
const;
168 EncodingType encoding_;
169 CompressionType compression_;
189 TIMESTAMP = UNIXTIME_MICROS
195 static std::string DataTypeToString(DataType type);
230 const std::string& name()
const;
233 DataType type()
const;
236 bool is_nullable()
const;
255 bool is_nullable =
false,
256 const void* default_value = NULL,
416 class KUDU_NO_EXPORT Data;
428 Status ToColumnSchemaDelta(ColumnSchemaDelta* col_delta)
const;
430 Slice DefaultValueAsSlice()
const;
491 class KUDU_NO_EXPORT Data;
527 Status Reset(
const std::vector<KuduColumnSchema>& columns,
int key_columns)
528 ATTRIBUTE_DEPRECATED(
"this method will be removed in a future release")
545 size_t num_columns()
const;
555 void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes)
const;
567 friend class ClientTest;
576 friend class ScanConfiguration;
577 friend class internal::GetTableSchemaRpc;
578 friend class internal::LookupRpc;
579 friend class internal::MetaCacheEntry;
580 friend class internal::WriteRpc;
581 friend class tools::RemoteKsckMaster;
582 friend class tools::ReplicaDumper;
584 friend KuduSchema KuduSchemaFromSchema(
const Schema& schema);
592 size_t num_key_columns()
const;
600 #endif // KUDU_CLIENT_SCHEMA_H
A representation of a table's schema.
Definition: schema.h:497
Representation of column type attributes.
Definition: schema.h:64
A representation of an operation's outcome.
Definition: status.h:145
A constant cell value with a specific type.
Definition: value.h:35
Representation of column storage attributes.
Definition: schema.h:107
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:272
Representation of the column schema.
Definition: schema.h:174
const EncodingType encoding() const
Definition: schema.h:155
Builds scan tokens for a table.
Definition: client.h:2197
Alters an existing table based on the provided steps.
Definition: client.h:1029
KuduColumnStorageAttributes(EncodingType encoding=AUTO_ENCODING, CompressionType compression=DEFAULT_COMPRESSION, int32_t block_size=0) ATTRIBUTE_DEPRECATED("this const ructor will be private in a future release")
Definition: schema.h:144
A handle for a connection to a cluster.
Definition: client.h:298
A wrapper around externally allocated data.
Definition: slice.h:47
A representation of a table on a particular cluster.
Definition: client.h:873
This class is a representation of a single scan.
Definition: client.h:1706
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:65
CompressionType
Column compression types.
Definition: schema.h:124
Builder API for constructing a KuduSchema object.
Definition: schema.h:457
DataType
Supported data types for columns.
Definition: schema.h:177
A scan descriptor limited to a single physical contiguous location.
Definition: client.h:2137
A helper class to create a new table with the desired options.
Definition: client.h:657
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:64
const CompressionType compression() const
Definition: schema.h:160
EncodingType
Column encoding types.
Definition: schema.h:110