18 #ifndef KUDU_CLIENT_SCHEMA_H    19 #define KUDU_CLIENT_SCHEMA_H    29 #ifdef KUDU_HEADERS_NO_STUBS    30 #include <gtest/gtest_prod.h>    32 #include "kudu/gutil/port.h"    34 #include "kudu/client/stubs.h"    37 #include "kudu/util/kudu_export.h"    46 struct ColumnSchemaDelta;
    49 class RemoteKsckCluster;
    56 class GetTableSchemaRpc;
   104   int8_t precision() 
const;
   107   int8_t scale() 
const;
   110   uint16_t length() 
const;
   119   class KUDU_NO_EXPORT Data;
   144     DEFAULT_COMPRESSION = 0,
   166       int32_t block_size = 0)
   167       ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
   168       : encoding_(encoding),
   169         compression_(compression),
   170         block_size_(block_size) {
   184   std::string ToString() 
const;
   192   static Status StringToEncodingType(
const std::string& encoding,
   201   static Status StringToCompressionType(
const std::string& compression,
   227     TIMESTAMP = UNIXTIME_MICROS, 
   234   static std::string DataTypeToString(
DataType type);
   241   static Status StringToDataType(
const std::string& type_str, 
DataType* type);
   276   const std::string& name() 
const;
   282   bool is_nullable() 
const;
   291   const std::string& comment() 
const;
   301 #ifdef KUDU_HEADERS_NO_STUBS   302   FRIEND_TEST(KuduColumnSchemaTest, TestEquals);
   307 #if defined(__clang__) || \   308   (defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40600)   309 #pragma GCC diagnostic push   310 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"   314       const std::string &name,
   316       bool is_nullable = 
false,
   317       const void* default_value = NULL, 
   320       const std::string& comment = 
"");
   321 #if defined(__clang__) || \   322   (defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40600)   323 #pragma GCC diagnostic pop   511   class KUDU_NO_EXPORT Data;
   524   Status ToColumnSchemaDelta(ColumnSchemaDelta* col_delta) 
const;
   526   Slice DefaultValueAsSlice() 
const;
   587   class KUDU_NO_EXPORT Data;
   624   Status Reset(
const std::vector<KuduColumnSchema>& columns, 
int key_columns)
   625       ATTRIBUTE_DEPRECATED(
"this method will be removed in a future release")
   646   bool HasColumn(
const std::string& col_name, 
KuduColumnSchema* col_schema) 
const;
   649   size_t num_columns() 
const;
   659   void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes) 
const;
   673   std::string ToString() 
const;
   684   static KuduSchema FromSchema(
const Schema& schema) KUDU_NO_EXPORT;
   693   static Schema ToSchema(
const KuduSchema& kudu_schema) KUDU_NO_EXPORT;
   698   friend class ClientTest;
   707   friend class ScanConfiguration;
   708   friend class internal::GetTableSchemaRpc;
   709   friend class internal::LookupRpc;
   710   friend class internal::MetaCache;
   711   friend class internal::MetaCacheEntry;
   712   friend class internal::WriteRpc;
   713   friend class tools::RemoteKsckCluster;
   714   friend class tools::ReplicaDumper;
   718 #if __cplusplus >= 201103   724   size_t num_key_columns() 
const;
   732 #endif // KUDU_CLIENT_SCHEMA_H A representation of a table's schema. 
Definition: schema.h:594
Representation of column type attributes. 
Definition: schema.h:67
A representation of an operation's outcome. 
Definition: status.h:165
A constant cell value with a specific type. 
Definition: value.h:35
Definition: callbacks.h:28
Representation of column storage attributes. 
Definition: schema.h:126
Builder API for specifying or altering a column within a table schema. 
Definition: schema.h:338
Representation of the column schema. 
Definition: schema.h:211
const EncodingType encoding() const 
Definition: schema.h:174
Builds scan tokens for a table. 
Definition: client.h:2564
Alters an existing table based on the provided steps. 
Definition: client.h:1268
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:163
A handle for a connection to a cluster. 
Definition: client.h:327
A wrapper around externally allocated data. 
Definition: slice.h:51
A representation of a table on a particular cluster. 
Definition: client.h:1020
This class is a representation of a single scan. 
Definition: client.h:2012
A single-row write operation to be sent to a Kudu table. 
Definition: write_op.h:66
CompressionType
Column compression types. 
Definition: schema.h:143
Builder API for constructing a KuduSchema object. 
Definition: schema.h:553
DataType
Supported data types for columns. 
Definition: schema.h:214
A scan descriptor limited to a single physical contiguous location. 
Definition: client.h:2504
A helper class to create a new table with the desired options. 
Definition: client.h:748
A row which may only contain values for a subset of the columns. 
Definition: partial_row.h:72
const CompressionType compression() const 
Definition: schema.h:179
EncodingType
Column encoding types. 
Definition: schema.h:129