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 RemoteKsckCluster;
54 class GetTableSchemaRpc;
96 int8_t precision()
const;
102 class KUDU_NO_EXPORT Data;
126 DEFAULT_COMPRESSION = 0,
148 int32_t block_size = 0)
149 ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
150 : encoding_(encoding),
151 compression_(compression),
152 block_size_(block_size) {
166 std::string ToString()
const;
190 TIMESTAMP = UNIXTIME_MICROS
196 static std::string DataTypeToString(
DataType type);
231 const std::string& name()
const;
237 bool is_nullable()
const;
253 #if defined(__clang__) || \ 254 (defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40600) 255 #pragma GCC diagnostic push 256 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 260 const std::string &name,
262 bool is_nullable =
false,
263 const void* default_value = NULL,
266 #if defined(__clang__) || \ 267 (defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40600) 268 #pragma GCC diagnostic pop 431 class KUDU_NO_EXPORT Data;
443 Status ToColumnSchemaDelta(ColumnSchemaDelta* col_delta)
const;
445 Slice DefaultValueAsSlice()
const;
506 class KUDU_NO_EXPORT Data;
542 Status Reset(
const std::vector<KuduColumnSchema>& columns,
int key_columns)
543 ATTRIBUTE_DEPRECATED(
"this method will be removed in a future release")
560 size_t num_columns()
const;
570 void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes)
const;
584 std::string ToString()
const;
595 static KuduSchema FromSchema(
const Schema& schema) KUDU_NO_EXPORT;
604 static Schema ToSchema(
const KuduSchema& kudu_schema) KUDU_NO_EXPORT;
609 friend class ClientTest;
618 friend class ScanConfiguration;
619 friend class internal::GetTableSchemaRpc;
620 friend class internal::LookupRpc;
621 friend class internal::MetaCache;
622 friend class internal::MetaCacheEntry;
623 friend class internal::WriteRpc;
624 friend class tools::RemoteKsckCluster;
625 friend class tools::ReplicaDumper;
632 size_t num_key_columns()
const;
640 #endif // KUDU_CLIENT_SCHEMA_H A representation of a table's schema.
Definition: schema.h:512
Representation of column type attributes.
Definition: schema.h:65
A representation of an operation's outcome.
Definition: status.h:145
A constant cell value with a specific type.
Definition: value.h:35
Definition: callbacks.h:28
Representation of column storage attributes.
Definition: schema.h:108
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:283
Representation of the column schema.
Definition: schema.h:175
const EncodingType encoding() const
Definition: schema.h:156
Builds scan tokens for a table.
Definition: client.h:2337
Alters an existing table based on the provided steps.
Definition: client.h:1138
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:145
A handle for a connection to a cluster.
Definition: client.h:316
A wrapper around externally allocated data.
Definition: slice.h:50
A representation of a table on a particular cluster.
Definition: client.h:967
This class is a representation of a single scan.
Definition: client.h:1830
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:65
CompressionType
Column compression types.
Definition: schema.h:125
Builder API for constructing a KuduSchema object.
Definition: schema.h:472
DataType
Supported data types for columns.
Definition: schema.h:178
A scan descriptor limited to a single physical contiguous location.
Definition: client.h:2277
A helper class to create a new table with the desired options.
Definition: client.h:751
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:161
EncodingType
Column encoding types.
Definition: schema.h:111