jt2594838 commented on code in PR #493:
URL: https://github.com/apache/tsfile/pull/493#discussion_r2086110752
##########
cpp/src/common/global.h:
##########
@@ -28,6 +28,58 @@ namespace common {
extern ConfigValue g_config_value_;
extern ColumnSchema g_time_column_schema;
+
+FORCE_INLINE void set_global_time_data_type(uint8_t data_type) {
+ ASSERT(data_type >= BOOLEAN && data_type <= STRING);
+ g_config_value_.time_data_type_ = static_cast<TSDataType>(data_type);
+}
+
+FORCE_INLINE void set_global_time_encoding(uint8_t encoding) {
+ ASSERT(encoding >= PLAIN && encoding <= FREQ);
+ g_config_value_.time_encoding_type_ = static_cast<TSEncoding>(encoding);
+}
+
+FORCE_INLINE void set_global_time_compression(uint8_t compression) {
+ ASSERT(compression >= UNCOMPRESSED && compression <= LZ4);
+ g_config_value_.time_compress_type_ =
+ static_cast<CompressionType>(compression);
+}
+
+FORCE_INLINE void set_datatype_encoding(uint8_t data_type, uint8_t encoding) {
+ TSDataType dtype = static_cast<TSDataType>(data_type);
+ ASSERT(dtype >= BOOLEAN && dtype <= STRING);
+ TSEncoding encoding_type = static_cast<TSEncoding>(encoding);
+ ASSERT(encoding >= PLAIN && encoding <= FREQ);
+ switch (dtype) {
Review Comment:
Check the compatibility between encoding and data_type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]