diff --git a/docs/references/pysdk_api_reference.md b/docs/references/pysdk_api_reference.md index 86bc67b580..8e325129f1 100644 --- a/docs/references/pysdk_api_reference.md +++ b/docs/references/pysdk_api_reference.md @@ -357,19 +357,21 @@ Create an index by `IndexInfo` list. A IndexInfo struct contains three fields,`column_name`, `index_type`, and `index_param_list`. - **column_name : str** Name of the column to build index on. - **index_type : IndexType** - enum type: `IVFFlat` , `Hnsw`, `HnswLVQ`, `FullText`, or `BMP`. Defined in `infinity.index`. - `Note: The difference between Hnsw and HnswLVQ is only adopting different clustering method. The former uses K-Means while the later uses LVQ(Learning Vector Quantization)` + enum type: `IVFFlat` , `Hnsw`, `FullText`, or `BMP`. Defined in `infinity.index`. + `Note: For Hnsw index, add encode=lvq in index_param_list to use LVQ(Locally-adaptive vector quantization)` - **index_param_list** A list of InitParameter. The InitParameter struct is like a key-value pair, with two string fields named param_name and param_value. The optional parameters of each type of index are listed below: - `IVFFlat`: `'centroids_count'`(default:`'128'`), `'metric'`(required) - - `Hnsw`: `'M'`(default:`'16'`), `'ef_construction'`(default:`'50'`), `'ef'`(default:`'50'`), `'metric'`(required) - - `HnswLVQ`: + - `Hnsw`: - `'M'`(default:`'16'`) - `'ef_construction'`(default:`'50'`) - `'ef'`(default:`'50'`) - `'metric'`(required) - `ip`: Inner product - `l2`: Euclidean distance + - `'encode'`(optional) + - `plain`: Plain encoding (default) + - `lvq`: LVQ(Locally-adaptive vector quantization) - `FullText`: `'ANALYZER'`(default:`'standard'`) - `BMP`: - `block_size=1~256`(default: 16): The size of the block in BMP index diff --git a/example/ColBERT_reranker_example/helper.py b/example/ColBERT_reranker_example/helper.py index 26d7749ca5..d4bf796395 100644 --- a/example/ColBERT_reranker_example/helper.py +++ b/example/ColBERT_reranker_example/helper.py @@ -13,8 +13,12 @@ # limitations under the License. from typing import Union -import torch -from infinity.remote_thrift.types import make_match_tensor_expr +# NOTICE: please check which infinity you are using, local or remote +# this statement is for local infinity +from infinity.local_infinity.types import make_match_tensor_expr +# enable the following import statement to use remote infinity +# from infinity.remote_thrift.types import make_match_tensor_expr +# from infinity.common import LOCAL_HOST class InfinityHelperForColBERT: @@ -40,9 +44,9 @@ def create_test_env(self, schema: dict): # append two hidden columns: "INNER_HIDDEN_ColBERT_TENSOR_ARRAY_FLOAT", "INNER_HIDDEN_ColBERT_TENSOR_ARRAY_BIT" self.test_db_name = "colbert_test_db" self.test_table_name = "colbert_test_table" - self.inner_col_txt = "INNER_HIDDEN_ColBERT_TEXT_FOR_BM25" - self.inner_col_float = "INNER_HIDDEN_ColBERT_TENSOR_ARRAY_FLOAT" - self.inner_col_bit = "INNER_HIDDEN_ColBERT_TENSOR_ARRAY_BIT" + self.inner_col_txt = "inner_hidden_colbert_text_for_bm25" + self.inner_col_float = "inner_hidden_colbert_tensor_array_float" + self.inner_col_bit = "inner_hidden_colbert_tensor_array_bit" if self.inner_col_txt in schema: raise ValueError(f"Column name {self.inner_col_txt} is reserved for internal use.") if self.inner_col_float in schema: @@ -56,13 +60,22 @@ def create_test_env(self, schema: dict): from infinity import NetworkAddress import infinity.index as index from infinity.common import ConflictType - self.infinity_obj = infinity.connect(NetworkAddress("127.0.0.1", 23817)) + # NOTICE: the following statement is for local infinity + self.infinity_obj = infinity.connect("/var/infinity") + # enable the following statement to use remote infinity + # self.infinity_obj = infinity.connect(LOCAL_HOST) self.infinity_obj.drop_database(self.test_db_name, ConflictType.Ignore) self.colbert_test_db = self.infinity_obj.create_database(self.test_db_name) self.colbert_test_table = self.colbert_test_db.create_table(self.test_table_name, schema, ConflictType.Error) + # NOTICE: the following statement is for english text self.colbert_test_table.create_index("test_ft_index", [index.IndexInfo(self.inner_col_txt, index.IndexType.FullText, [])], ConflictType.Error) + # please enable the following statement to use chinese text + # self.colbert_test_table.create_index("test_ft_index", + # [index.IndexInfo(self.inner_col_txt, index.IndexType.FullText, + # [infinity.index.InitParameter("ANALYZER", "chinese")])], + # ConflictType.Error) # clear the test environment for ColBERT def clear_test_env(self): diff --git a/python/benchmark/flat_knn/flat_knn_interactive_benchmark.py b/python/benchmark/flat_knn/flat_knn_interactive_benchmark.py index 91d427d721..7f398e2538 100644 --- a/python/benchmark/flat_knn/flat_knn_interactive_benchmark.py +++ b/python/benchmark/flat_knn/flat_knn_interactive_benchmark.py @@ -90,7 +90,7 @@ def faiss_import(self, data_set): def infinity_benchmark_flat_knn(self, data_set): threads = int(input("Enter number of threads:\n")) rounds = int(input("Enter number of rounds:\n")) - benchmark(threads, rounds, data_set, self.dataset_path_map[data_set]) + benchmark(threads, rounds, data_set, 200, True, self.dataset_path_map[data_set]) def faiss_benchmark_flat_knn_batch_query(self, data_set): xq = fvecs_read(self.dataset_path_map[data_set] + self.query_suffix[data_set]) diff --git a/python/infinity/index.py b/python/infinity/index.py index 9601b0623d..08ddde1570 100644 --- a/python/infinity/index.py +++ b/python/infinity/index.py @@ -24,19 +24,16 @@ class IndexType(Enum): IVFFlat = 1 - HnswLVQ = 2 - Hnsw = 3 - FullText = 4 - Secondary = 5 - EMVB = 6 - BMP = 7 + Hnsw = 2 + FullText = 3 + Secondary = 4 + EMVB = 5 + BMP = 6 def to_ttype(self): match self: case IndexType.IVFFlat: return ttypes.IndexType.IVFFlat - case IndexType.HnswLVQ: - return ttypes.IndexType.HnswLVQ case IndexType.Hnsw: return ttypes.IndexType.Hnsw case IndexType.FullText: @@ -54,8 +51,6 @@ def to_local_type(self): match self: case IndexType.IVFFlat: return LocalIndexType.kIVFFlat - case IndexType.HnswLVQ: - return LocalIndexType.kHnswLVQ case IndexType.Hnsw: return LocalIndexType.kHnsw case IndexType.FullText: diff --git a/python/infinity/local_infinity/db.py b/python/infinity/local_infinity/db.py index d191fc74e7..9902f3a80e 100644 --- a/python/infinity/local_infinity/db.py +++ b/python/infinity/local_infinity/db.py @@ -85,6 +85,10 @@ def get_ordinary_info(column_info, column_defs, column_name, index): proto_column_type.logical_type = LogicalType.kFloat case "double" | "float64": proto_column_type.logical_type = LogicalType.kDouble + case "float16": + proto_column_type.logical_type = LogicalType.kFloat16 + case "bfloat16": + proto_column_type.logical_type = LogicalType.kBFloat16 case "varchar": proto_column_type.logical_type = LogicalType.kVarchar case "bool": @@ -157,6 +161,8 @@ def get_embedding_info(column_info, column_defs, column_name, index): embedding_type.element_type = EmbeddingDataType.kElemFloat elif element_type == "float64" or element_type == "double": embedding_type.element_type = EmbeddingDataType.kElemDouble + elif element_type == "uint8": + embedding_type.element_type = EmbeddingDataType.kElemUInt8 elif element_type == "int8": embedding_type.element_type = EmbeddingDataType.kElemInt8 elif element_type == "int16": @@ -205,6 +211,8 @@ def get_sparse_info(column_info, column_defs, column_name, index): sparse_type.element_type = EmbeddingDataType.kElemFloat elif element_type == "float64" or element_type == "double": sparse_type.element_type = EmbeddingDataType.kElemDouble + elif element_type == "uint8": + sparse_type.element_type = EmbeddingDataType.kElemUInt8 elif element_type == "int8": sparse_type.element_type = EmbeddingDataType.kElemInt8 elif element_type == "int16": diff --git a/python/infinity/local_infinity/query_builder.py b/python/infinity/local_infinity/query_builder.py index a202ffe966..36c1783e2b 100644 --- a/python/infinity/local_infinity/query_builder.py +++ b/python/infinity/local_infinity/query_builder.py @@ -98,12 +98,8 @@ def knn( f"Invalid embedding data, type should be embedded, but get {type(embedding_data)}", ) - if ( - embedding_data_type == "tinyint" - or embedding_data_type == "smallint" - or embedding_data_type == "int" - or embedding_data_type == "bigint" - ): + if embedding_data_type in ["int", "uint8", "int8", "int16", "int32", "int64", "tinyint", "unsigned tinyint", + "smallint", "bigint"]: embedding_data = [int(x) for x in embedding_data] data = EmbeddingData() @@ -111,22 +107,25 @@ def knn( if embedding_data_type == "bit": elem_type = EmbeddingDataType.kElemBit raise Exception(f"Invalid embedding {embedding_data[0]} type") - elif embedding_data_type == "tinyint": + elif embedding_data_type in ["unsigned tinyint", "uint8"]: + elem_type = EmbeddingDataType.kElemUInt8 + data.u8_array_value = embedding_data + elif embedding_data_type in ["tinyint", "int8"]: elem_type = EmbeddingDataType.kElemInt8 data.i8_array_value = embedding_data - elif embedding_data_type == "smallint": + elif embedding_data_type in ["smallint", "int16"]: elem_type = EmbeddingDataType.kElemInt16 data.i16_array_value = embedding_data - elif embedding_data_type == "int": + elif embedding_data_type in ["int", "int32"]: elem_type = EmbeddingDataType.kElemInt32 data.i32_array_value = embedding_data - elif embedding_data_type == "bigint": + elif embedding_data_type in ["bigint", "int64"]: elem_type = EmbeddingDataType.kElemInt64 data.i64_array_value = embedding_data - elif embedding_data_type == "float": + elif embedding_data_type in ["float", "float32"]: elem_type = EmbeddingDataType.kElemFloat data.f32_array_value = embedding_data - elif embedding_data_type == "double": + elif embedding_data_type in ["double", "float64"]: elem_type = EmbeddingDataType.kElemDouble data.f64_array_value = embedding_data else: diff --git a/python/infinity/local_infinity/table.py b/python/infinity/local_infinity/table.py index 1a847f7a89..814a8f116f 100644 --- a/python/infinity/local_infinity/table.py +++ b/python/infinity/local_infinity/table.py @@ -168,6 +168,9 @@ def insert(self, data: Union[INSERT_DATA, list[INSERT_DATA]]): if isinstance(value, str): constant_expression.literal_type = LiteralType.kString constant_expression.str_value = value + elif isinstance(value, bool): + constant_expression.literal_type = LiteralType.kBoolean + constant_expression.bool_value = value elif isinstance(value, int): constant_expression.literal_type = LiteralType.kInteger constant_expression.i64_value = value diff --git a/python/infinity/local_infinity/types.py b/python/infinity/local_infinity/types.py index 15a710ecb3..295e602f65 100644 --- a/python/infinity/local_infinity/types.py +++ b/python/infinity/local_infinity/types.py @@ -38,11 +38,17 @@ def logic_type_to_dtype(ttype: WrapDataType): return dtype('float32') case LogicalType.kDouble: return dtype('float64') + case LogicalType.kFloat16: + return dtype('float32') + case LogicalType.kBFloat16: + return dtype('float32') case LogicalType.kVarchar: return dtype('str') case LogicalType.kEmbedding: if ttype.embedding_type is not None: match ttype.embedding_type.element_type: + case EmbeddingDataType.kElemUInt8: + return object case EmbeddingDataType.kElemInt8: return object case EmbeddingDataType.kElemInt16: @@ -81,6 +87,9 @@ def tensor_to_list(column_data_type, binary_data) -> list[list[Any]]: mid_res_int = mid_res_int * 256 + j result.append([f"\u007b0:0{dimension}b\u007d".format(mid_res_int)[::-1]]) return result + elif column_data_type.embedding_type.element_type == EmbeddingDataType.kElemUInt8: + all_list = list(struct.unpack('<{}B'.format(len(binary_data)), binary_data)) + return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] elif column_data_type.embedding_type.element_type == EmbeddingDataType.kElemInt8: all_list = list(struct.unpack('<{}b'.format(len(binary_data)), binary_data)) return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] @@ -144,6 +153,14 @@ def column_vector_to_list(column_type, column_data_type, column_vectors) -> \ return list(struct.unpack('<{}f'.format(len(column_vector) // 4), column_vector)) case LogicalType.kDouble: return list(struct.unpack('<{}d'.format(len(column_vector) // 8), column_vector)) + case LogicalType.kFloat16: + return list(struct.unpack('<{}e'.format(len(column_vector) // 2), column_vector)) + case LogicalType.kBFloat16: + tmp_u16 = np.frombuffer(column_vector, dtype=' \ case LogicalType.kEmbedding: dimension = column_data_type.embedding_type.dimension element_type = column_data_type.embedding_type.element_type - if element_type == EmbeddingDataType.kElemInt8: + if element_type == EmbeddingDataType.kElemUInt8: + all_list = list(struct.unpack('<{}B'.format(len(column_vector)), column_vector)) + return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] + elif element_type == EmbeddingDataType.kElemInt8: all_list = list(struct.unpack('<{}b'.format(len(column_vector)), column_vector)) return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] elif element_type == EmbeddingDataType.kElemInt16: @@ -225,6 +245,9 @@ def parse_sparse_bytes(column_data_type, column_vector): case _: raise NotImplementedError(f"Unsupported type {index_type}") match element_type: + case EmbeddingDataType.kElemUInt8: + values = struct.unpack('<{}B'.format(nnz), column_vector[offset:offset + nnz]) + offset += nnz case EmbeddingDataType.kElemInt8: values = struct.unpack('<{}b'.format(nnz), column_vector[offset:offset + nnz]) offset += nnz @@ -277,22 +300,25 @@ def make_match_tensor_expr(vector_column_name: str, embedding_data: VEC, embeddi elem_type = EmbeddingDataType.kElemFloat if embedding_data_type == 'bit': raise InfinityException(ErrorCode.INVALID_EMBEDDING_DATA_TYPE, f"Invalid embedding {embedding_data[0]} type") - elif embedding_data_type == 'tinyint' or embedding_data_type == 'int8' or embedding_data_type == 'i8': + elif embedding_data_type in ['unsigned tinyint', 'uint8', 'u8']: + elem_type = EmbeddingDataType.kElemUInt8 + data.u8_array_value = np.asarray(embedding_data, dtype=np.uint8).flatten() + elif embedding_data_type in ['tinyint', 'int8', 'i8']: elem_type = EmbeddingDataType.kElemInt8 data.i8_array_value = np.asarray(embedding_data, dtype=np.int8).flatten() - elif embedding_data_type == 'smallint' or embedding_data_type == 'int16' or embedding_data_type == 'i16': + elif embedding_data_type in ['smallint', 'int16', 'i16']: elem_type = EmbeddingDataType.kElemInt16 data.i16_array_value = np.asarray(embedding_data, dtype=np.int16).flatten() - elif embedding_data_type == 'int' or embedding_data_type == 'int32' or embedding_data_type == 'i32': + elif embedding_data_type in ['int', 'int32', 'i32']: elem_type = EmbeddingDataType.kElemInt32 data.i32_array_value = np.asarray(embedding_data, dtype=np.int32).flatten() - elif embedding_data_type == 'bigint' or embedding_data_type == 'int64' or embedding_data_type == 'i64': + elif embedding_data_type in ['bigint', 'int64', 'i64']: elem_type = EmbeddingDataType.kElemInt64 data.i64_array_value = np.asarray(embedding_data, dtype=np.int64).flatten() - elif embedding_data_type == 'float' or embedding_data_type == 'float32' or embedding_data_type == 'f32': + elif embedding_data_type in ['float', 'float32', 'f32']: elem_type = EmbeddingDataType.kElemFloat data.f32_array_value = np.asarray(embedding_data, dtype=np.float32).flatten() - elif embedding_data_type == 'double' or embedding_data_type == 'float64' or embedding_data_type == 'f64': + elif embedding_data_type in ['double', 'float64', 'f64']: elem_type = EmbeddingDataType.kElemDouble data.f64_array_value = np.asarray(embedding_data, dtype=np.float64).flatten() else: diff --git a/python/infinity/local_infinity/utils.py b/python/infinity/local_infinity/utils.py index 143a5ef67b..875028a627 100644 --- a/python/infinity/local_infinity/utils.py +++ b/python/infinity/local_infinity/utils.py @@ -60,6 +60,15 @@ def traverse_conditions(cons, fn=None): return parsed_expr + elif isinstance(cons, exp.Boolean): + parsed_expr = WrapParsedExpr() + constant_expr = WrapConstantExpr() + constant_expr.literal_type = LiteralType.kBoolean + constant_expr.bool_value = cons.this + parsed_expr.type = ParsedExprType.kConstant + parsed_expr.constant_expr = constant_expr + return parsed_expr + elif isinstance(cons, exp.Literal): parsed_expr = WrapParsedExpr() constant_expr = WrapConstantExpr() diff --git a/python/infinity/remote_thrift/db.py b/python/infinity/remote_thrift/db.py index d37f49e670..797b1cfe26 100644 --- a/python/infinity/remote_thrift/db.py +++ b/python/infinity/remote_thrift/db.py @@ -23,6 +23,7 @@ from infinity.common import ConflictType from infinity.common import InfinityException + def get_constant_expr(column_info): # process constant expression default = None @@ -37,11 +38,12 @@ def get_constant_expr(column_info): if isinstance(default, str): constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.String, str_value=default) - + elif isinstance(default, bool): + constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.Boolean, + bool_value=default) elif isinstance(default, int): constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.Int64, i64_value=default) - elif isinstance(default, float) or isinstance(default, np.float32): constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.Double, f64_value=default) @@ -56,6 +58,7 @@ def get_constant_expr(column_info): raise InfinityException(ErrorCode.INVALID_EXPRESSION, "Invalid constant expression") return constant_expression + def get_ordinary_info(column_info, column_defs, column_name, index): # "c1": {"type": "int", "constraints":["primary key", ...], "default": 1/"asdf"/[1,2]/...} # process column definition @@ -94,6 +97,10 @@ def get_ordinary_info(column_info, column_defs, column_name, index): proto_column_type.logic_type = ttypes.LogicType.Float case "double" | "float64": proto_column_type.logic_type = ttypes.LogicType.Double + case "float16": + proto_column_type.logic_type = ttypes.LogicType.Float16 + case "bfloat16": + proto_column_type.logic_type = ttypes.LogicType.BFloat16 case "varchar": proto_column_type.logic_type = ttypes.LogicType.Varchar proto_column_type.physical_type = ttypes.VarcharType() @@ -164,6 +171,8 @@ def get_embedding_info(column_info, column_defs, column_name, index): embedding_type.element_type = ttypes.ElementType.ElementFloat32 elif element_type == "float64" or element_type == "double": embedding_type.element_type = ttypes.ElementType.ElementFloat64 + elif element_type == "uint8": + embedding_type.element_type = ttypes.ElementType.ElementUInt8 elif element_type == "int8": embedding_type.element_type = ttypes.ElementType.ElementInt8 elif element_type == "int16": @@ -210,6 +219,8 @@ def get_sparse_info(column_info, column_defs, column_name, index): sparse_type.element_type = ttypes.ElementType.ElementFloat32 elif value_type == "float64" or value_type == "double": sparse_type.element_type = ttypes.ElementType.ElementFloat64 + elif value_type == "uint8": + sparse_type.element_type = ttypes.ElementType.ElementUInt8 elif value_type == "int8": sparse_type.element_type = ttypes.ElementType.ElementInt8 elif value_type == "int16": diff --git a/python/infinity/remote_thrift/infinity_thrift_rpc/ttypes.py b/python/infinity/remote_thrift/infinity_thrift_rpc/ttypes.py index 0c5ea53693..53cb53a87b 100644 --- a/python/infinity/remote_thrift/infinity_thrift_rpc/ttypes.py +++ b/python/infinity/remote_thrift/infinity_thrift_rpc/ttypes.py @@ -26,12 +26,14 @@ class LogicType(object): Decimal = 6 Float = 7 Double = 8 - Varchar = 9 - Embedding = 10 - Tensor = 11 - TensorArray = 12 - Sparse = 13 - Invalid = 14 + Float16 = 9 + BFloat16 = 10 + Varchar = 11 + Embedding = 12 + Tensor = 13 + TensorArray = 14 + Sparse = 15 + Invalid = 16 _VALUES_TO_NAMES = { 0: "Boolean", @@ -43,12 +45,14 @@ class LogicType(object): 6: "Decimal", 7: "Float", 8: "Double", - 9: "Varchar", - 10: "Embedding", - 11: "Tensor", - 12: "TensorArray", - 13: "Sparse", - 14: "Invalid", + 9: "Float16", + 10: "BFloat16", + 11: "Varchar", + 12: "Embedding", + 13: "Tensor", + 14: "TensorArray", + 15: "Sparse", + 16: "Invalid", } _NAMES_TO_VALUES = { @@ -61,12 +65,14 @@ class LogicType(object): "Decimal": 6, "Float": 7, "Double": 8, - "Varchar": 9, - "Embedding": 10, - "Tensor": 11, - "TensorArray": 12, - "Sparse": 13, - "Invalid": 14, + "Float16": 9, + "BFloat16": 10, + "Varchar": 11, + "Embedding": 12, + "Tensor": 13, + "TensorArray": 14, + "Sparse": 15, + "Invalid": 16, } @@ -105,31 +111,34 @@ class DropConflict(object): class ElementType(object): ElementBit = 0 - ElementInt8 = 1 - ElementInt16 = 2 - ElementInt32 = 3 - ElementInt64 = 4 - ElementFloat32 = 5 - ElementFloat64 = 6 + ElementUInt8 = 1 + ElementInt8 = 2 + ElementInt16 = 3 + ElementInt32 = 4 + ElementInt64 = 5 + ElementFloat32 = 6 + ElementFloat64 = 7 _VALUES_TO_NAMES = { 0: "ElementBit", - 1: "ElementInt8", - 2: "ElementInt16", - 3: "ElementInt32", - 4: "ElementInt64", - 5: "ElementFloat32", - 6: "ElementFloat64", + 1: "ElementUInt8", + 2: "ElementInt8", + 3: "ElementInt16", + 4: "ElementInt32", + 5: "ElementInt64", + 6: "ElementFloat32", + 7: "ElementFloat64", } _NAMES_TO_VALUES = { "ElementBit": 0, - "ElementInt8": 1, - "ElementInt16": 2, - "ElementInt32": 3, - "ElementInt64": 4, - "ElementFloat32": 5, - "ElementFloat64": 6, + "ElementUInt8": 1, + "ElementInt8": 2, + "ElementInt16": 3, + "ElementInt32": 4, + "ElementInt64": 5, + "ElementFloat32": 6, + "ElementFloat64": 7, } @@ -252,13 +261,15 @@ class ColumnType(object): ColumnInt64 = 4 ColumnFloat32 = 5 ColumnFloat64 = 6 - ColumnVarchar = 7 - ColumnEmbedding = 8 - ColumnTensor = 9 - ColumnTensorArray = 10 - ColumnSparse = 11 - ColumnRowID = 12 - ColumnInvalid = 13 + ColumnFloat16 = 7 + ColumnBFloat16 = 8 + ColumnVarchar = 9 + ColumnEmbedding = 10 + ColumnTensor = 11 + ColumnTensorArray = 12 + ColumnSparse = 13 + ColumnRowID = 14 + ColumnInvalid = 15 _VALUES_TO_NAMES = { 0: "ColumnBool", @@ -268,13 +279,15 @@ class ColumnType(object): 4: "ColumnInt64", 5: "ColumnFloat32", 6: "ColumnFloat64", - 7: "ColumnVarchar", - 8: "ColumnEmbedding", - 9: "ColumnTensor", - 10: "ColumnTensorArray", - 11: "ColumnSparse", - 12: "ColumnRowID", - 13: "ColumnInvalid", + 7: "ColumnFloat16", + 8: "ColumnBFloat16", + 9: "ColumnVarchar", + 10: "ColumnEmbedding", + 11: "ColumnTensor", + 12: "ColumnTensorArray", + 13: "ColumnSparse", + 14: "ColumnRowID", + 15: "ColumnInvalid", } _NAMES_TO_VALUES = { @@ -285,43 +298,42 @@ class ColumnType(object): "ColumnInt64": 4, "ColumnFloat32": 5, "ColumnFloat64": 6, - "ColumnVarchar": 7, - "ColumnEmbedding": 8, - "ColumnTensor": 9, - "ColumnTensorArray": 10, - "ColumnSparse": 11, - "ColumnRowID": 12, - "ColumnInvalid": 13, + "ColumnFloat16": 7, + "ColumnBFloat16": 8, + "ColumnVarchar": 9, + "ColumnEmbedding": 10, + "ColumnTensor": 11, + "ColumnTensorArray": 12, + "ColumnSparse": 13, + "ColumnRowID": 14, + "ColumnInvalid": 15, } class IndexType(object): IVFFlat = 0 - HnswLVQ = 1 - Hnsw = 2 - FullText = 3 - BMP = 4 - Secondary = 5 - EMVB = 6 + Hnsw = 1 + FullText = 2 + BMP = 3 + Secondary = 4 + EMVB = 5 _VALUES_TO_NAMES = { 0: "IVFFlat", - 1: "HnswLVQ", - 2: "Hnsw", - 3: "FullText", - 4: "BMP", - 5: "Secondary", - 6: "EMVB", + 1: "Hnsw", + 2: "FullText", + 3: "BMP", + 4: "Secondary", + 5: "EMVB", } _NAMES_TO_VALUES = { "IVFFlat": 0, - "HnswLVQ": 1, - "Hnsw": 2, - "FullText": 3, - "BMP": 4, - "Secondary": 5, - "EMVB": 6, + "Hnsw": 1, + "FullText": 2, + "BMP": 3, + "Secondary": 4, + "EMVB": 5, } @@ -1270,6 +1282,7 @@ class EmbeddingData(object): """ Attributes: - bool_array_value + - u8_array_value - i8_array_value - i16_array_value - i32_array_value @@ -1280,8 +1293,9 @@ class EmbeddingData(object): """ - def __init__(self, bool_array_value=None, i8_array_value=None, i16_array_value=None, i32_array_value=None, i64_array_value=None, f32_array_value=None, f64_array_value=None,): + def __init__(self, bool_array_value=None, u8_array_value=None, i8_array_value=None, i16_array_value=None, i32_array_value=None, i64_array_value=None, f32_array_value=None, f64_array_value=None,): self.bool_array_value = bool_array_value + self.u8_array_value = u8_array_value self.i8_array_value = i8_array_value self.i16_array_value = i16_array_value self.i32_array_value = i32_array_value @@ -1310,61 +1324,71 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: - self.i8_array_value = [] + self.u8_array_value = [] (_etype23, _size20) = iprot.readListBegin() for _i24 in range(_size20): - _elem25 = iprot.readBinary() - self.i8_array_value.append(_elem25) + _elem25 = iprot.readI16() + self.u8_array_value.append(_elem25) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: - self.i16_array_value = [] + self.i8_array_value = [] (_etype29, _size26) = iprot.readListBegin() for _i30 in range(_size26): _elem31 = iprot.readI16() - self.i16_array_value.append(_elem31) + self.i8_array_value.append(_elem31) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: - self.i32_array_value = [] + self.i16_array_value = [] (_etype35, _size32) = iprot.readListBegin() for _i36 in range(_size32): - _elem37 = iprot.readI32() - self.i32_array_value.append(_elem37) + _elem37 = iprot.readI16() + self.i16_array_value.append(_elem37) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.LIST: - self.i64_array_value = [] + self.i32_array_value = [] (_etype41, _size38) = iprot.readListBegin() for _i42 in range(_size38): - _elem43 = iprot.readI64() - self.i64_array_value.append(_elem43) + _elem43 = iprot.readI32() + self.i32_array_value.append(_elem43) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.LIST: - self.f32_array_value = [] + self.i64_array_value = [] (_etype47, _size44) = iprot.readListBegin() for _i48 in range(_size44): - _elem49 = iprot.readDouble() - self.f32_array_value.append(_elem49) + _elem49 = iprot.readI64() + self.i64_array_value.append(_elem49) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: - self.f64_array_value = [] + self.f32_array_value = [] (_etype53, _size50) = iprot.readListBegin() for _i54 in range(_size50): _elem55 = iprot.readDouble() - self.f64_array_value.append(_elem55) + self.f32_array_value.append(_elem55) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.f64_array_value = [] + (_etype59, _size56) = iprot.readListBegin() + for _i60 in range(_size56): + _elem61 = iprot.readDouble() + self.f64_array_value.append(_elem61) iprot.readListEnd() else: iprot.skip(ftype) @@ -1381,50 +1405,57 @@ def write(self, oprot): if self.bool_array_value is not None: oprot.writeFieldBegin('bool_array_value', TType.LIST, 1) oprot.writeListBegin(TType.BOOL, len(self.bool_array_value)) - for iter56 in self.bool_array_value: - oprot.writeBool(iter56) + for iter62 in self.bool_array_value: + oprot.writeBool(iter62) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.u8_array_value is not None: + oprot.writeFieldBegin('u8_array_value', TType.LIST, 2) + oprot.writeListBegin(TType.I16, len(self.u8_array_value)) + for iter63 in self.u8_array_value: + oprot.writeI16(iter63) oprot.writeListEnd() oprot.writeFieldEnd() if self.i8_array_value is not None: - oprot.writeFieldBegin('i8_array_value', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.i8_array_value)) - for iter57 in self.i8_array_value: - oprot.writeBinary(iter57) + oprot.writeFieldBegin('i8_array_value', TType.LIST, 3) + oprot.writeListBegin(TType.I16, len(self.i8_array_value)) + for iter64 in self.i8_array_value: + oprot.writeI16(iter64) oprot.writeListEnd() oprot.writeFieldEnd() if self.i16_array_value is not None: - oprot.writeFieldBegin('i16_array_value', TType.LIST, 3) + oprot.writeFieldBegin('i16_array_value', TType.LIST, 4) oprot.writeListBegin(TType.I16, len(self.i16_array_value)) - for iter58 in self.i16_array_value: - oprot.writeI16(iter58) + for iter65 in self.i16_array_value: + oprot.writeI16(iter65) oprot.writeListEnd() oprot.writeFieldEnd() if self.i32_array_value is not None: - oprot.writeFieldBegin('i32_array_value', TType.LIST, 4) + oprot.writeFieldBegin('i32_array_value', TType.LIST, 5) oprot.writeListBegin(TType.I32, len(self.i32_array_value)) - for iter59 in self.i32_array_value: - oprot.writeI32(iter59) + for iter66 in self.i32_array_value: + oprot.writeI32(iter66) oprot.writeListEnd() oprot.writeFieldEnd() if self.i64_array_value is not None: - oprot.writeFieldBegin('i64_array_value', TType.LIST, 5) + oprot.writeFieldBegin('i64_array_value', TType.LIST, 6) oprot.writeListBegin(TType.I64, len(self.i64_array_value)) - for iter60 in self.i64_array_value: - oprot.writeI64(iter60) + for iter67 in self.i64_array_value: + oprot.writeI64(iter67) oprot.writeListEnd() oprot.writeFieldEnd() if self.f32_array_value is not None: - oprot.writeFieldBegin('f32_array_value', TType.LIST, 6) + oprot.writeFieldBegin('f32_array_value', TType.LIST, 7) oprot.writeListBegin(TType.DOUBLE, len(self.f32_array_value)) - for iter61 in self.f32_array_value: - oprot.writeDouble(iter61) + for iter68 in self.f32_array_value: + oprot.writeDouble(iter68) oprot.writeListEnd() oprot.writeFieldEnd() if self.f64_array_value is not None: - oprot.writeFieldBegin('f64_array_value', TType.LIST, 7) + oprot.writeFieldBegin('f64_array_value', TType.LIST, 8) oprot.writeListBegin(TType.DOUBLE, len(self.f64_array_value)) - for iter62 in self.f64_array_value: - oprot.writeDouble(iter62) + for iter69 in self.f64_array_value: + oprot.writeDouble(iter69) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1579,70 +1610,70 @@ def read(self, iprot): elif fid == 6: if ftype == TType.LIST: self.i64_array_value = [] - (_etype66, _size63) = iprot.readListBegin() - for _i67 in range(_size63): - _elem68 = iprot.readI64() - self.i64_array_value.append(_elem68) + (_etype73, _size70) = iprot.readListBegin() + for _i74 in range(_size70): + _elem75 = iprot.readI64() + self.i64_array_value.append(_elem75) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: self.f64_array_value = [] - (_etype72, _size69) = iprot.readListBegin() - for _i73 in range(_size69): - _elem74 = iprot.readDouble() - self.f64_array_value.append(_elem74) + (_etype79, _size76) = iprot.readListBegin() + for _i80 in range(_size76): + _elem81 = iprot.readDouble() + self.f64_array_value.append(_elem81) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.LIST: self.i64_tensor_array_value = [] - (_etype78, _size75) = iprot.readListBegin() - for _i79 in range(_size75): - _elem80 = [] - (_etype84, _size81) = iprot.readListBegin() - for _i85 in range(_size81): - _elem86 = [] - (_etype90, _size87) = iprot.readListBegin() - for _i91 in range(_size87): - _elem92 = iprot.readI64() - _elem86.append(_elem92) + (_etype85, _size82) = iprot.readListBegin() + for _i86 in range(_size82): + _elem87 = [] + (_etype91, _size88) = iprot.readListBegin() + for _i92 in range(_size88): + _elem93 = [] + (_etype97, _size94) = iprot.readListBegin() + for _i98 in range(_size94): + _elem99 = iprot.readI64() + _elem93.append(_elem99) iprot.readListEnd() - _elem80.append(_elem86) + _elem87.append(_elem93) iprot.readListEnd() - self.i64_tensor_array_value.append(_elem80) + self.i64_tensor_array_value.append(_elem87) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.f64_tensor_array_value = [] - (_etype96, _size93) = iprot.readListBegin() - for _i97 in range(_size93): - _elem98 = [] - (_etype102, _size99) = iprot.readListBegin() - for _i103 in range(_size99): - _elem104 = [] - (_etype108, _size105) = iprot.readListBegin() - for _i109 in range(_size105): - _elem110 = iprot.readDouble() - _elem104.append(_elem110) + (_etype103, _size100) = iprot.readListBegin() + for _i104 in range(_size100): + _elem105 = [] + (_etype109, _size106) = iprot.readListBegin() + for _i110 in range(_size106): + _elem111 = [] + (_etype115, _size112) = iprot.readListBegin() + for _i116 in range(_size112): + _elem117 = iprot.readDouble() + _elem111.append(_elem117) iprot.readListEnd() - _elem98.append(_elem104) + _elem105.append(_elem111) iprot.readListEnd() - self.f64_tensor_array_value.append(_elem98) + self.f64_tensor_array_value.append(_elem105) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: self.i64_array_idx = [] - (_etype114, _size111) = iprot.readListBegin() - for _i115 in range(_size111): - _elem116 = iprot.readI64() - self.i64_array_idx.append(_elem116) + (_etype121, _size118) = iprot.readListBegin() + for _i122 in range(_size118): + _elem123 = iprot.readI64() + self.i64_array_idx.append(_elem123) iprot.readListEnd() else: iprot.skip(ftype) @@ -1679,26 +1710,26 @@ def write(self, oprot): if self.i64_array_value is not None: oprot.writeFieldBegin('i64_array_value', TType.LIST, 6) oprot.writeListBegin(TType.I64, len(self.i64_array_value)) - for iter117 in self.i64_array_value: - oprot.writeI64(iter117) + for iter124 in self.i64_array_value: + oprot.writeI64(iter124) oprot.writeListEnd() oprot.writeFieldEnd() if self.f64_array_value is not None: oprot.writeFieldBegin('f64_array_value', TType.LIST, 7) oprot.writeListBegin(TType.DOUBLE, len(self.f64_array_value)) - for iter118 in self.f64_array_value: - oprot.writeDouble(iter118) + for iter125 in self.f64_array_value: + oprot.writeDouble(iter125) oprot.writeListEnd() oprot.writeFieldEnd() if self.i64_tensor_array_value is not None: oprot.writeFieldBegin('i64_tensor_array_value', TType.LIST, 8) oprot.writeListBegin(TType.LIST, len(self.i64_tensor_array_value)) - for iter119 in self.i64_tensor_array_value: - oprot.writeListBegin(TType.LIST, len(iter119)) - for iter120 in iter119: - oprot.writeListBegin(TType.I64, len(iter120)) - for iter121 in iter120: - oprot.writeI64(iter121) + for iter126 in self.i64_tensor_array_value: + oprot.writeListBegin(TType.LIST, len(iter126)) + for iter127 in iter126: + oprot.writeListBegin(TType.I64, len(iter127)) + for iter128 in iter127: + oprot.writeI64(iter128) oprot.writeListEnd() oprot.writeListEnd() oprot.writeListEnd() @@ -1706,12 +1737,12 @@ def write(self, oprot): if self.f64_tensor_array_value is not None: oprot.writeFieldBegin('f64_tensor_array_value', TType.LIST, 9) oprot.writeListBegin(TType.LIST, len(self.f64_tensor_array_value)) - for iter122 in self.f64_tensor_array_value: - oprot.writeListBegin(TType.LIST, len(iter122)) - for iter123 in iter122: - oprot.writeListBegin(TType.DOUBLE, len(iter123)) - for iter124 in iter123: - oprot.writeDouble(iter124) + for iter129 in self.f64_tensor_array_value: + oprot.writeListBegin(TType.LIST, len(iter129)) + for iter130 in iter129: + oprot.writeListBegin(TType.DOUBLE, len(iter130)) + for iter131 in iter130: + oprot.writeDouble(iter131) oprot.writeListEnd() oprot.writeListEnd() oprot.writeListEnd() @@ -1719,8 +1750,8 @@ def write(self, oprot): if self.i64_array_idx is not None: oprot.writeFieldBegin('i64_array_idx', TType.LIST, 10) oprot.writeListBegin(TType.I64, len(self.i64_array_idx)) - for iter125 in self.i64_array_idx: - oprot.writeI64(iter125) + for iter132 in self.i64_array_idx: + oprot.writeI64(iter132) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1805,11 +1836,11 @@ def read(self, iprot): elif fid == 6: if ftype == TType.LIST: self.opt_params = [] - (_etype129, _size126) = iprot.readListBegin() - for _i130 in range(_size126): - _elem131 = InitParameter() - _elem131.read(iprot) - self.opt_params.append(_elem131) + (_etype136, _size133) = iprot.readListBegin() + for _i137 in range(_size133): + _elem138 = InitParameter() + _elem138.read(iprot) + self.opt_params.append(_elem138) iprot.readListEnd() else: iprot.skip(ftype) @@ -1846,8 +1877,8 @@ def write(self, oprot): if self.opt_params is not None: oprot.writeFieldBegin('opt_params', TType.LIST, 6) oprot.writeListBegin(TType.STRUCT, len(self.opt_params)) - for iter132 in self.opt_params: - iter132.write(oprot) + for iter139 in self.opt_params: + iter139.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1925,11 +1956,11 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.opt_params = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in range(_size133): - _elem138 = InitParameter() - _elem138.read(iprot) - self.opt_params.append(_elem138) + (_etype143, _size140) = iprot.readListBegin() + for _i144 in range(_size140): + _elem145 = InitParameter() + _elem145.read(iprot) + self.opt_params.append(_elem145) iprot.readListEnd() else: iprot.skip(ftype) @@ -1962,8 +1993,8 @@ def write(self, oprot): if self.opt_params is not None: oprot.writeFieldBegin('opt_params', TType.LIST, 5) oprot.writeListBegin(TType.STRUCT, len(self.opt_params)) - for iter139 in self.opt_params: - iter139.write(oprot) + for iter146 in self.opt_params: + iter146.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2365,22 +2396,22 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.match_exprs = [] - (_etype143, _size140) = iprot.readListBegin() - for _i144 in range(_size140): - _elem145 = GenericMatchExpr() - _elem145.read(iprot) - self.match_exprs.append(_elem145) + (_etype150, _size147) = iprot.readListBegin() + for _i151 in range(_size147): + _elem152 = GenericMatchExpr() + _elem152.read(iprot) + self.match_exprs.append(_elem152) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.fusion_exprs = [] - (_etype149, _size146) = iprot.readListBegin() - for _i150 in range(_size146): - _elem151 = FusionExpr() - _elem151.read(iprot) - self.fusion_exprs.append(_elem151) + (_etype156, _size153) = iprot.readListBegin() + for _i157 in range(_size153): + _elem158 = FusionExpr() + _elem158.read(iprot) + self.fusion_exprs.append(_elem158) iprot.readListEnd() else: iprot.skip(ftype) @@ -2397,15 +2428,15 @@ def write(self, oprot): if self.match_exprs is not None: oprot.writeFieldBegin('match_exprs', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.match_exprs)) - for iter152 in self.match_exprs: - iter152.write(oprot) + for iter159 in self.match_exprs: + iter159.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.fusion_exprs is not None: oprot.writeFieldBegin('fusion_exprs', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.fusion_exprs)) - for iter153 in self.fusion_exprs: - iter153.write(oprot) + for iter160 in self.fusion_exprs: + iter160.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2456,11 +2487,11 @@ def read(self, iprot): elif fid == 2: if ftype == TType.LIST: self.arguments = [] - (_etype157, _size154) = iprot.readListBegin() - for _i158 in range(_size154): - _elem159 = ParsedExpr() - _elem159.read(iprot) - self.arguments.append(_elem159) + (_etype164, _size161) = iprot.readListBegin() + for _i165 in range(_size161): + _elem166 = ParsedExpr() + _elem166.read(iprot) + self.arguments.append(_elem166) iprot.readListEnd() else: iprot.skip(ftype) @@ -2481,8 +2512,8 @@ def write(self, oprot): if self.arguments is not None: oprot.writeFieldBegin('arguments', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.arguments)) - for iter160 in self.arguments: - iter160.write(oprot) + for iter167 in self.arguments: + iter167.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2774,10 +2805,10 @@ def read(self, iprot): elif fid == 4: if ftype == TType.LIST: self.constraints = [] - (_etype164, _size161) = iprot.readListBegin() - for _i165 in range(_size161): - _elem166 = iprot.readI32() - self.constraints.append(_elem166) + (_etype171, _size168) = iprot.readListBegin() + for _i172 in range(_size168): + _elem173 = iprot.readI32() + self.constraints.append(_elem173) iprot.readListEnd() else: iprot.skip(ftype) @@ -2812,8 +2843,8 @@ def write(self, oprot): if self.constraints is not None: oprot.writeFieldBegin('constraints', TType.LIST, 4) oprot.writeListBegin(TType.I32, len(self.constraints)) - for iter167 in self.constraints: - oprot.writeI32(iter167) + for iter174 in self.constraints: + oprot.writeI32(iter174) oprot.writeListEnd() oprot.writeFieldEnd() if self.constant_expr is not None: @@ -2865,11 +2896,11 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.parse_exprs = [] - (_etype171, _size168) = iprot.readListBegin() - for _i172 in range(_size168): - _elem173 = ParsedExpr() - _elem173.read(iprot) - self.parse_exprs.append(_elem173) + (_etype178, _size175) = iprot.readListBegin() + for _i179 in range(_size175): + _elem180 = ParsedExpr() + _elem180.read(iprot) + self.parse_exprs.append(_elem180) iprot.readListEnd() else: iprot.skip(ftype) @@ -2886,8 +2917,8 @@ def write(self, oprot): if self.parse_exprs is not None: oprot.writeFieldBegin('parse_exprs', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.parse_exprs)) - for iter174 in self.parse_exprs: - iter174.write(oprot) + for iter181 in self.parse_exprs: + iter181.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2944,10 +2975,10 @@ def read(self, iprot): elif fid == 2: if ftype == TType.LIST: self.column_vectors = [] - (_etype178, _size175) = iprot.readListBegin() - for _i179 in range(_size175): - _elem180 = iprot.readBinary() - self.column_vectors.append(_elem180) + (_etype185, _size182) = iprot.readListBegin() + for _i186 in range(_size182): + _elem187 = iprot.readBinary() + self.column_vectors.append(_elem187) iprot.readListEnd() else: iprot.skip(ftype) @@ -2973,8 +3004,8 @@ def write(self, oprot): if self.column_vectors is not None: oprot.writeFieldBegin('column_vectors', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.column_vectors)) - for iter181 in self.column_vectors: - oprot.writeBinary(iter181) + for iter188 in self.column_vectors: + oprot.writeBinary(iter188) oprot.writeListEnd() oprot.writeFieldEnd() if self.column_name is not None: @@ -3224,11 +3255,11 @@ def read(self, iprot): elif fid == 2: if ftype == TType.LIST: self.opt_params = [] - (_etype185, _size182) = iprot.readListBegin() - for _i186 in range(_size182): - _elem187 = InitParameter() - _elem187.read(iprot) - self.opt_params.append(_elem187) + (_etype192, _size189) = iprot.readListBegin() + for _i193 in range(_size189): + _elem194 = InitParameter() + _elem194.read(iprot) + self.opt_params.append(_elem194) iprot.readListEnd() else: iprot.skip(ftype) @@ -3249,8 +3280,8 @@ def write(self, oprot): if self.opt_params is not None: oprot.writeFieldBegin('opt_params', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.opt_params)) - for iter188 in self.opt_params: - iter188.write(oprot) + for iter195 in self.opt_params: + iter195.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3562,10 +3593,10 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.db_names = [] - (_etype192, _size189) = iprot.readListBegin() - for _i193 in range(_size189): - _elem194 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.db_names.append(_elem194) + (_etype199, _size196) = iprot.readListBegin() + for _i200 in range(_size196): + _elem201 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.db_names.append(_elem201) iprot.readListEnd() else: iprot.skip(ftype) @@ -3590,8 +3621,8 @@ def write(self, oprot): if self.db_names is not None: oprot.writeFieldBegin('db_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.db_names)) - for iter195 in self.db_names: - oprot.writeString(iter195.encode('utf-8') if sys.version_info[0] == 2 else iter195) + for iter202 in self.db_names: + oprot.writeString(iter202.encode('utf-8') if sys.version_info[0] == 2 else iter202) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3721,10 +3752,10 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.table_names = [] - (_etype199, _size196) = iprot.readListBegin() - for _i200 in range(_size196): - _elem201 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.table_names.append(_elem201) + (_etype206, _size203) = iprot.readListBegin() + for _i207 in range(_size203): + _elem208 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.table_names.append(_elem208) iprot.readListEnd() else: iprot.skip(ftype) @@ -3749,8 +3780,8 @@ def write(self, oprot): if self.table_names is not None: oprot.writeFieldBegin('table_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.table_names)) - for iter202 in self.table_names: - oprot.writeString(iter202.encode('utf-8') if sys.version_info[0] == 2 else iter202) + for iter209 in self.table_names: + oprot.writeString(iter209.encode('utf-8') if sys.version_info[0] == 2 else iter209) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3891,10 +3922,10 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.index_names = [] - (_etype206, _size203) = iprot.readListBegin() - for _i207 in range(_size203): - _elem208 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.index_names.append(_elem208) + (_etype213, _size210) = iprot.readListBegin() + for _i214 in range(_size210): + _elem215 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.index_names.append(_elem215) iprot.readListEnd() else: iprot.skip(ftype) @@ -3919,8 +3950,8 @@ def write(self, oprot): if self.index_names is not None: oprot.writeFieldBegin('index_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.index_names)) - for iter209 in self.index_names: - oprot.writeString(iter209.encode('utf-8') if sys.version_info[0] == 2 else iter209) + for iter216 in self.index_names: + oprot.writeString(iter216.encode('utf-8') if sys.version_info[0] == 2 else iter216) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4522,11 +4553,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.index_param_list = [] - (_etype213, _size210) = iprot.readListBegin() - for _i214 in range(_size210): - _elem215 = InitParameter() - _elem215.read(iprot) - self.index_param_list.append(_elem215) + (_etype220, _size217) = iprot.readListBegin() + for _i221 in range(_size217): + _elem222 = InitParameter() + _elem222.read(iprot) + self.index_param_list.append(_elem222) iprot.readListEnd() else: iprot.skip(ftype) @@ -4551,8 +4582,8 @@ def write(self, oprot): if self.index_param_list is not None: oprot.writeFieldBegin('index_param_list', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.index_param_list)) - for iter216 in self.index_param_list: - iter216.write(oprot) + for iter223 in self.index_param_list: + iter223.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4625,11 +4656,11 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.index_info_list = [] - (_etype220, _size217) = iprot.readListBegin() - for _i221 in range(_size217): - _elem222 = IndexInfo() - _elem222.read(iprot) - self.index_info_list.append(_elem222) + (_etype227, _size224) = iprot.readListBegin() + for _i228 in range(_size224): + _elem229 = IndexInfo() + _elem229.read(iprot) + self.index_info_list.append(_elem229) iprot.readListEnd() else: iprot.skip(ftype) @@ -4669,8 +4700,8 @@ def write(self, oprot): if self.index_info_list is not None: oprot.writeFieldBegin('index_info_list', TType.LIST, 5) oprot.writeListBegin(TType.STRUCT, len(self.index_info_list)) - for iter223 in self.index_info_list: - iter223.write(oprot) + for iter230 in self.index_info_list: + iter230.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.session_id is not None: @@ -5433,11 +5464,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.column_defs = [] - (_etype227, _size224) = iprot.readListBegin() - for _i228 in range(_size224): - _elem229 = ColumnDef() - _elem229.read(iprot) - self.column_defs.append(_elem229) + (_etype234, _size231) = iprot.readListBegin() + for _i235 in range(_size231): + _elem236 = ColumnDef() + _elem236.read(iprot) + self.column_defs.append(_elem236) iprot.readListEnd() else: iprot.skip(ftype) @@ -5473,8 +5504,8 @@ def write(self, oprot): if self.column_defs is not None: oprot.writeFieldBegin('column_defs', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.column_defs)) - for iter230 in self.column_defs: - iter230.write(oprot) + for iter237 in self.column_defs: + iter237.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.session_id is not None: @@ -5643,21 +5674,21 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.column_names = [] - (_etype234, _size231) = iprot.readListBegin() - for _i235 in range(_size231): - _elem236 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.column_names.append(_elem236) + (_etype241, _size238) = iprot.readListBegin() + for _i242 in range(_size238): + _elem243 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.column_names.append(_elem243) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.fields = [] - (_etype240, _size237) = iprot.readListBegin() - for _i241 in range(_size237): - _elem242 = Field() - _elem242.read(iprot) - self.fields.append(_elem242) + (_etype247, _size244) = iprot.readListBegin() + for _i248 in range(_size244): + _elem249 = Field() + _elem249.read(iprot) + self.fields.append(_elem249) iprot.readListEnd() else: iprot.skip(ftype) @@ -5687,15 +5718,15 @@ def write(self, oprot): if self.column_names is not None: oprot.writeFieldBegin('column_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.column_names)) - for iter243 in self.column_names: - oprot.writeString(iter243.encode('utf-8') if sys.version_info[0] == 2 else iter243) + for iter250 in self.column_names: + oprot.writeString(iter250.encode('utf-8') if sys.version_info[0] == 2 else iter250) oprot.writeListEnd() oprot.writeFieldEnd() if self.fields is not None: oprot.writeFieldBegin('fields', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.fields)) - for iter244 in self.fields: - iter244.write(oprot) + for iter251 in self.fields: + iter251.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.session_id is not None: @@ -5865,10 +5896,10 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.columns = [] - (_etype248, _size245) = iprot.readListBegin() - for _i249 in range(_size245): - _elem250 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.columns.append(_elem250) + (_etype255, _size252) = iprot.readListBegin() + for _i256 in range(_size252): + _elem257 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.columns.append(_elem257) iprot.readListEnd() else: iprot.skip(ftype) @@ -5909,8 +5940,8 @@ def write(self, oprot): if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter251 in self.columns: - oprot.writeString(iter251.encode('utf-8') if sys.version_info[0] == 2 else iter251) + for iter258 in self.columns: + oprot.writeString(iter258.encode('utf-8') if sys.version_info[0] == 2 else iter258) oprot.writeListEnd() oprot.writeFieldEnd() if self.file_name is not None: @@ -6015,11 +6046,11 @@ def read(self, iprot): elif fid == 4: if ftype == TType.LIST: self.select_list = [] - (_etype255, _size252) = iprot.readListBegin() - for _i256 in range(_size252): - _elem257 = ParsedExpr() - _elem257.read(iprot) - self.select_list.append(_elem257) + (_etype262, _size259) = iprot.readListBegin() + for _i263 in range(_size259): + _elem264 = ParsedExpr() + _elem264.read(iprot) + self.select_list.append(_elem264) iprot.readListEnd() else: iprot.skip(ftype) @@ -6038,11 +6069,11 @@ def read(self, iprot): elif fid == 7: if ftype == TType.LIST: self.group_by_list = [] - (_etype261, _size258) = iprot.readListBegin() - for _i262 in range(_size258): - _elem263 = ParsedExpr() - _elem263.read(iprot) - self.group_by_list.append(_elem263) + (_etype268, _size265) = iprot.readListBegin() + for _i269 in range(_size265): + _elem270 = ParsedExpr() + _elem270.read(iprot) + self.group_by_list.append(_elem270) iprot.readListEnd() else: iprot.skip(ftype) @@ -6067,11 +6098,11 @@ def read(self, iprot): elif fid == 11: if ftype == TType.LIST: self.order_by_list = [] - (_etype267, _size264) = iprot.readListBegin() - for _i268 in range(_size264): - _elem269 = OrderByExpr() - _elem269.read(iprot) - self.order_by_list.append(_elem269) + (_etype274, _size271) = iprot.readListBegin() + for _i275 in range(_size271): + _elem276 = OrderByExpr() + _elem276.read(iprot) + self.order_by_list.append(_elem276) iprot.readListEnd() else: iprot.skip(ftype) @@ -6105,8 +6136,8 @@ def write(self, oprot): if self.select_list is not None: oprot.writeFieldBegin('select_list', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.select_list)) - for iter270 in self.select_list: - iter270.write(oprot) + for iter277 in self.select_list: + iter277.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.search_expr is not None: @@ -6120,8 +6151,8 @@ def write(self, oprot): if self.group_by_list is not None: oprot.writeFieldBegin('group_by_list', TType.LIST, 7) oprot.writeListBegin(TType.STRUCT, len(self.group_by_list)) - for iter271 in self.group_by_list: - iter271.write(oprot) + for iter278 in self.group_by_list: + iter278.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.having_expr is not None: @@ -6139,8 +6170,8 @@ def write(self, oprot): if self.order_by_list is not None: oprot.writeFieldBegin('order_by_list', TType.LIST, 11) oprot.writeListBegin(TType.STRUCT, len(self.order_by_list)) - for iter272 in self.order_by_list: - iter272.write(oprot) + for iter279 in self.order_by_list: + iter279.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.explain_type is not None: @@ -6212,22 +6243,22 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.column_defs = [] - (_etype276, _size273) = iprot.readListBegin() - for _i277 in range(_size273): - _elem278 = ColumnDef() - _elem278.read(iprot) - self.column_defs.append(_elem278) + (_etype283, _size280) = iprot.readListBegin() + for _i284 in range(_size280): + _elem285 = ColumnDef() + _elem285.read(iprot) + self.column_defs.append(_elem285) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.column_fields = [] - (_etype282, _size279) = iprot.readListBegin() - for _i283 in range(_size279): - _elem284 = ColumnField() - _elem284.read(iprot) - self.column_fields.append(_elem284) + (_etype289, _size286) = iprot.readListBegin() + for _i290 in range(_size286): + _elem291 = ColumnField() + _elem291.read(iprot) + self.column_fields.append(_elem291) iprot.readListEnd() else: iprot.skip(ftype) @@ -6252,15 +6283,15 @@ def write(self, oprot): if self.column_defs is not None: oprot.writeFieldBegin('column_defs', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.column_defs)) - for iter285 in self.column_defs: - iter285.write(oprot) + for iter292 in self.column_defs: + iter292.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.column_fields is not None: oprot.writeFieldBegin('column_fields', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.column_fields)) - for iter286 in self.column_fields: - iter286.write(oprot) + for iter293 in self.column_fields: + iter293.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6351,11 +6382,11 @@ def read(self, iprot): elif fid == 4: if ftype == TType.LIST: self.select_list = [] - (_etype290, _size287) = iprot.readListBegin() - for _i291 in range(_size287): - _elem292 = ParsedExpr() - _elem292.read(iprot) - self.select_list.append(_elem292) + (_etype297, _size294) = iprot.readListBegin() + for _i298 in range(_size294): + _elem299 = ParsedExpr() + _elem299.read(iprot) + self.select_list.append(_elem299) iprot.readListEnd() else: iprot.skip(ftype) @@ -6374,11 +6405,11 @@ def read(self, iprot): elif fid == 7: if ftype == TType.LIST: self.group_by_list = [] - (_etype296, _size293) = iprot.readListBegin() - for _i297 in range(_size293): - _elem298 = ParsedExpr() - _elem298.read(iprot) - self.group_by_list.append(_elem298) + (_etype303, _size300) = iprot.readListBegin() + for _i304 in range(_size300): + _elem305 = ParsedExpr() + _elem305.read(iprot) + self.group_by_list.append(_elem305) iprot.readListEnd() else: iprot.skip(ftype) @@ -6403,11 +6434,11 @@ def read(self, iprot): elif fid == 11: if ftype == TType.LIST: self.order_by_list = [] - (_etype302, _size299) = iprot.readListBegin() - for _i303 in range(_size299): - _elem304 = OrderByExpr() - _elem304.read(iprot) - self.order_by_list.append(_elem304) + (_etype309, _size306) = iprot.readListBegin() + for _i310 in range(_size306): + _elem311 = OrderByExpr() + _elem311.read(iprot) + self.order_by_list.append(_elem311) iprot.readListEnd() else: iprot.skip(ftype) @@ -6436,8 +6467,8 @@ def write(self, oprot): if self.select_list is not None: oprot.writeFieldBegin('select_list', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.select_list)) - for iter305 in self.select_list: - iter305.write(oprot) + for iter312 in self.select_list: + iter312.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.search_expr is not None: @@ -6451,8 +6482,8 @@ def write(self, oprot): if self.group_by_list is not None: oprot.writeFieldBegin('group_by_list', TType.LIST, 7) oprot.writeListBegin(TType.STRUCT, len(self.group_by_list)) - for iter306 in self.group_by_list: - iter306.write(oprot) + for iter313 in self.group_by_list: + iter313.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.having_expr is not None: @@ -6470,8 +6501,8 @@ def write(self, oprot): if self.order_by_list is not None: oprot.writeFieldBegin('order_by_list', TType.LIST, 11) oprot.writeListBegin(TType.STRUCT, len(self.order_by_list)) - for iter307 in self.order_by_list: - iter307.write(oprot) + for iter314 in self.order_by_list: + iter314.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6539,22 +6570,22 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.column_defs = [] - (_etype311, _size308) = iprot.readListBegin() - for _i312 in range(_size308): - _elem313 = ColumnDef() - _elem313.read(iprot) - self.column_defs.append(_elem313) + (_etype318, _size315) = iprot.readListBegin() + for _i319 in range(_size315): + _elem320 = ColumnDef() + _elem320.read(iprot) + self.column_defs.append(_elem320) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.column_fields = [] - (_etype317, _size314) = iprot.readListBegin() - for _i318 in range(_size314): - _elem319 = ColumnField() - _elem319.read(iprot) - self.column_fields.append(_elem319) + (_etype324, _size321) = iprot.readListBegin() + for _i325 in range(_size321): + _elem326 = ColumnField() + _elem326.read(iprot) + self.column_fields.append(_elem326) iprot.readListEnd() else: iprot.skip(ftype) @@ -6579,15 +6610,15 @@ def write(self, oprot): if self.column_defs is not None: oprot.writeFieldBegin('column_defs', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.column_defs)) - for iter320 in self.column_defs: - iter320.write(oprot) + for iter327 in self.column_defs: + iter327.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.column_fields is not None: oprot.writeFieldBegin('column_fields', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.column_fields)) - for iter321 in self.column_fields: - iter321.write(oprot) + for iter328 in self.column_fields: + iter328.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6750,11 +6781,11 @@ def read(self, iprot): elif fid == 4: if ftype == TType.LIST: self.update_expr_array = [] - (_etype325, _size322) = iprot.readListBegin() - for _i326 in range(_size322): - _elem327 = UpdateExpr() - _elem327.read(iprot) - self.update_expr_array.append(_elem327) + (_etype332, _size329) = iprot.readListBegin() + for _i333 in range(_size329): + _elem334 = UpdateExpr() + _elem334.read(iprot) + self.update_expr_array.append(_elem334) iprot.readListEnd() else: iprot.skip(ftype) @@ -6788,8 +6819,8 @@ def write(self, oprot): if self.update_expr_array is not None: oprot.writeFieldBegin('update_expr_array', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.update_expr_array)) - for iter328 in self.update_expr_array: - iter328.write(oprot) + for iter335 in self.update_expr_array: + iter335.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.session_id is not None: @@ -7869,12 +7900,13 @@ def __ne__(self, other): EmbeddingData.thrift_spec = ( None, # 0 (1, TType.LIST, 'bool_array_value', (TType.BOOL, None, False), None, ), # 1 - (2, TType.LIST, 'i8_array_value', (TType.STRING, 'BINARY', False), None, ), # 2 - (3, TType.LIST, 'i16_array_value', (TType.I16, None, False), None, ), # 3 - (4, TType.LIST, 'i32_array_value', (TType.I32, None, False), None, ), # 4 - (5, TType.LIST, 'i64_array_value', (TType.I64, None, False), None, ), # 5 - (6, TType.LIST, 'f32_array_value', (TType.DOUBLE, None, False), None, ), # 6 - (7, TType.LIST, 'f64_array_value', (TType.DOUBLE, None, False), None, ), # 7 + (2, TType.LIST, 'u8_array_value', (TType.I16, None, False), None, ), # 2 + (3, TType.LIST, 'i8_array_value', (TType.I16, None, False), None, ), # 3 + (4, TType.LIST, 'i16_array_value', (TType.I16, None, False), None, ), # 4 + (5, TType.LIST, 'i32_array_value', (TType.I32, None, False), None, ), # 5 + (6, TType.LIST, 'i64_array_value', (TType.I64, None, False), None, ), # 6 + (7, TType.LIST, 'f32_array_value', (TType.DOUBLE, None, False), None, ), # 7 + (8, TType.LIST, 'f64_array_value', (TType.DOUBLE, None, False), None, ), # 8 ) all_structs.append(InitParameter) InitParameter.thrift_spec = ( diff --git a/python/infinity/remote_thrift/query_builder.py b/python/infinity/remote_thrift/query_builder.py index 15b816718f..d13d027ffd 100644 --- a/python/infinity/remote_thrift/query_builder.py +++ b/python/infinity/remote_thrift/query_builder.py @@ -116,12 +116,7 @@ def knn( f"Invalid embedding data, type should be embedded, but get {type(embedding_data)}", ) - if ( - embedding_data_type == "tinyint" - or embedding_data_type == "smallint" - or embedding_data_type == "int" - or embedding_data_type == "bigint" - ): + if embedding_data_type in ["uint8", "int8", "int16", "int32", "int", "int64"]: embedding_data = [int(x) for x in embedding_data] data = EmbeddingData() @@ -129,22 +124,25 @@ def knn( if embedding_data_type == "bit": elem_type = ElementType.ElementBit raise InfinityException(ErrorCode.INVALID_EMBEDDING_DATA_TYPE, f"Invalid embedding {embedding_data[0]} type") - elif embedding_data_type == "tinyint": + elif embedding_data_type == "uint8": + elem_type = ElementType.ElementUInt8 + data.u8_array_value = embedding_data + elif embedding_data_type == "int8": elem_type = ElementType.ElementInt8 data.i8_array_value = embedding_data - elif embedding_data_type == "smallint": + elif embedding_data_type == "int16": elem_type = ElementType.ElementInt16 data.i16_array_value = embedding_data - elif embedding_data_type == "int": + elif embedding_data_type in ["int", "int32"]: elem_type = ElementType.ElementInt32 data.i32_array_value = embedding_data - elif embedding_data_type == "bigint": + elif embedding_data_type == "int64": elem_type = ElementType.ElementInt64 data.i64_array_value = embedding_data - elif embedding_data_type == "float": + elif embedding_data_type in ["float", "float32"]: elem_type = ElementType.ElementFloat32 data.f32_array_value = embedding_data - elif embedding_data_type == "double": + elif embedding_data_type in ["double", "float64"]: elem_type = ElementType.ElementFloat64 data.f64_array_value = embedding_data else: diff --git a/python/infinity/remote_thrift/table.py b/python/infinity/remote_thrift/table.py index 1d63ea8a0b..2aae2ff1a7 100644 --- a/python/infinity/remote_thrift/table.py +++ b/python/infinity/remote_thrift/table.py @@ -180,6 +180,10 @@ def insert(self, data: Union[INSERT_DATA, list[INSERT_DATA]]): constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.String, str_value=value) + elif isinstance(value, bool): + constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.Boolean, + bool_value=value) + elif isinstance(value, int): constant_expression = ttypes.ConstantExpr(literal_type=ttypes.LiteralType.Int64, i64_value=value) diff --git a/python/infinity/remote_thrift/types.py b/python/infinity/remote_thrift/types.py index 6cef6d8524..69894abf8c 100644 --- a/python/infinity/remote_thrift/types.py +++ b/python/infinity/remote_thrift/types.py @@ -42,6 +42,10 @@ def column_type_to_dtype(ttype: ttypes.ColumnType): return dtype('float32') case ttypes.ColumnType.ColumnFloat64: return dtype('float64') + case ttypes.ColumnType.ColumnFloat16: + return dtype('float32') + case ttypes.ColumnType.ColumnBFloat16: + return dtype('float32') case ttypes.ColumnType.ColumnVarchar: return dtype('str') case _: @@ -64,11 +68,17 @@ def logic_type_to_dtype(ttype: ttypes.DataType): return dtype('float32') case ttypes.LogicType.Double: return dtype('float64') + case ttypes.LogicType.Float16: + return dtype('float32') + case ttypes.LogicType.BFloat16: + return dtype('float32') case ttypes.LogicType.Varchar: return dtype('str') case ttypes.LogicType.Embedding: if ttype.physical_type.embedding_type is not None: match ttype.physical_type.embedding_type.element_type: + case ttypes.ElementType.ElementUInt8: + return object case ttypes.ElementType.ElementInt8: return object case ttypes.ElementType.ElementInt16: @@ -109,11 +119,17 @@ def logic_type_to_pl_type(ttype: ttypes.DataType): return pl.Float32 case ttypes.LogicType.Double: return pl.Float64 + case ttypes.LogicType.Float16: + return pl.Float32 + case ttypes.LogicType.BFloat16: + return pl.Float32 case ttypes.LogicType.Varchar: return pl.Utf8 case ttypes.LogicType.Embedding: if ttype.physical_type.embedding_type is not None: match ttype.physical_type.embedding_type.element_type: + case ttypes.ElementType.ElementUInt8: + return pl.List case ttypes.ElementType.ElementInt8: return pl.List case ttypes.ElementType.ElementInt16: @@ -142,6 +158,14 @@ def column_vector_to_list(column_type: ttypes.ColumnType, column_data_type: ttyp return list(struct.unpack('<{}f'.format(len(column_vector) // 4), column_vector)) case ttypes.ColumnType.ColumnFloat64: return list(struct.unpack('<{}d'.format(len(column_vector) // 8), column_vector)) + case ttypes.ColumnType.ColumnFloat16: + return list(struct.unpack('<{}e'.format(len(column_vector) // 2), column_vector)) + case ttypes.ColumnType.ColumnBFloat16: + tmp_u16 = np.frombuffer(column_vector, dtype=' list[list[ mid_res_int = mid_res_int * 256 + j result.append([f"\u007b0:0{dimension}b\u007d".format(mid_res_int)[::-1]]) return result + elif column_data_type.physical_type.embedding_type.element_type == ttypes.ElementType.ElementUInt8: + all_list = list(struct.unpack('<{}B'.format(len(binary_data)), binary_data)) + return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] elif column_data_type.physical_type.embedding_type.element_type == ttypes.ElementType.ElementInt8: all_list = list(struct.unpack('<{}b'.format(len(binary_data)), binary_data)) return [all_list[i:i + dimension] for i in range(0, len(all_list), dimension)] @@ -305,6 +335,9 @@ def parse_sparse_bytes(column_data_type: ttypes.DataType, column_vector): case _: raise NotImplementedError(f"Unsupported type {index_type}") match element_type: + case ttypes.ElementType.ElementUInt8: + values = struct.unpack('<{}B'.format(nnz), column_vector[offset:offset + nnz]) + offset += nnz case ttypes.ElementType.ElementInt8: values = struct.unpack('<{}b'.format(nnz), column_vector[offset:offset + nnz]) offset += nnz @@ -371,22 +404,25 @@ def make_match_tensor_expr(vector_column_name: str, embedding_data: VEC, embeddi data = EmbeddingData() if embedding_data_type == 'bit': raise InfinityException(ErrorCode.INVALID_EMBEDDING_DATA_TYPE, f"Invalid embedding {embedding_data[0]} type") - elif embedding_data_type == 'tinyint' or embedding_data_type == 'int8' or embedding_data_type == 'i8': + elif embedding_data_type in ['unsigned tinyint', 'uint8', 'u8']: + elem_type = ElementType.ElementUInt8 + data.u8_array_value = np.asarray(embedding_data, dtype=np.uint8).flatten() + elif embedding_data_type in ['tinyint', 'int8', 'i8']: elem_type = ElementType.ElementInt8 data.i8_array_value = np.asarray(embedding_data, dtype=np.int8).flatten() - elif embedding_data_type == 'smallint' or embedding_data_type == 'int16' or embedding_data_type == 'i16': + elif embedding_data_type in ['smallint', 'int16', 'i16']: elem_type = ElementType.ElementInt16 data.i16_array_value = np.asarray(embedding_data, dtype=np.int16).flatten() - elif embedding_data_type == 'int' or embedding_data_type == 'int32' or embedding_data_type == 'i32': + elif embedding_data_type in ['int', 'int32', 'i32']: elem_type = ElementType.ElementInt32 data.i32_array_value = np.asarray(embedding_data, dtype=np.int32).flatten() - elif embedding_data_type == 'bigint' or embedding_data_type == 'int64' or embedding_data_type == 'i64': + elif embedding_data_type in ['bigint', 'int64', 'i64']: elem_type = ElementType.ElementInt64 data.i64_array_value = np.asarray(embedding_data, dtype=np.int64).flatten() - elif embedding_data_type == 'float' or embedding_data_type == 'float32' or embedding_data_type == 'f32': + elif embedding_data_type in ['float', 'float32', 'f32']: elem_type = ElementType.ElementFloat32 data.f32_array_value = np.asarray(embedding_data, dtype=np.float32).flatten() - elif embedding_data_type == 'double' or embedding_data_type == 'float64' or embedding_data_type == 'f64': + elif embedding_data_type in ['double', 'float64', 'f64']: elem_type = ElementType.ElementFloat64 data.f64_array_value = np.asarray(embedding_data, dtype=np.float64).flatten() else: diff --git a/python/infinity/remote_thrift/utils.py b/python/infinity/remote_thrift/utils.py index 4c6c990545..3d521fbdf7 100644 --- a/python/infinity/remote_thrift/utils.py +++ b/python/infinity/remote_thrift/utils.py @@ -88,6 +88,18 @@ def traverse_conditions(cons, fn=None) -> ttypes.ParsedExpr: parsed_expr.type = parser_expr_type return parsed_expr + elif isinstance(cons, exp.Boolean): + parsed_expr = ttypes.ParsedExpr() + constant_expr = ttypes.ConstantExpr() + constant_expr.literal_type = ttypes.LiteralType.Boolean + constant_expr.bool_value = cons.this + + parser_expr_type = ttypes.ParsedExprType() + parser_expr_type.constant_expr = constant_expr + + parsed_expr.type = parser_expr_type + return parsed_expr + elif isinstance(cons, exp.Literal): parsed_expr = ttypes.ParsedExpr() constant_expr = ttypes.ConstantExpr() diff --git a/python/test/cases/test_insert.py b/python/test/cases/test_insert.py index da77cb2dd8..2e3212c8f7 100644 --- a/python/test/cases/test_insert.py +++ b/python/test/cases/test_insert.py @@ -22,6 +22,8 @@ class TestInfinity: def test_insert(self): # self.test_infinity_obj._test_version() self.test_infinity_obj._test_insert_basic() + self.test_infinity_obj._test_insert_bool() + self.test_infinity_obj._test_insert_float16_bfloat16() self.test_infinity_obj._test_insert_varchar() self.test_infinity_obj._test_insert_big_varchar() self.test_infinity_obj._test_insert_embedding() diff --git a/python/test/cases/test_knn.py b/python/test/cases/test_knn.py index 6171088731..48b2c635c5 100644 --- a/python/test/cases/test_knn.py +++ b/python/test/cases/test_knn.py @@ -31,6 +31,11 @@ class TestInfinity: def test_knn(self, check_data): self.test_infinity_obj._test_knn(check_data) + @pytest.mark.parametrize("check_data", [{"file_name": "embedding_int_dim3.csv", + "data_dir": common_values.TEST_TMP_DIR}], indirect=True) + def test_knn_u8(self, check_data): + self.test_infinity_obj._test_knn_u8(check_data) + def test_insert_multi_column(self): self.test_infinity_obj._test_insert_multi_column() diff --git a/python/test/internal/test_insert.py b/python/test/internal/test_insert.py index e4c429c37f..bfce064a44 100755 --- a/python/test/internal/test_insert.py +++ b/python/test/internal/test_insert.py @@ -86,6 +86,49 @@ def _test_insert_basic(self): res = db_obj.drop_table("table_2") assert res.error_code == ErrorCode.OK + def _test_insert_float16_bfloat16(self): + """ + target: test insert float16 bfloat16 column + method: create table with float16 bfloat16 column + expected: ok + """ + db_obj = self.infinity_obj.get_database("default_db") + db_obj.drop_table("python_test_fp16_bf16", ConflictType.Ignore) + table_obj = db_obj.create_table("python_test_fp16_bf16", {"c1": {"type": "float"}, "c2": {"type": "float16"}, + "c3": {"type": "bfloat16"}}, ConflictType.Error) + assert table_obj + res = table_obj.insert( + [{"c1": -1, "c2": 1, "c3": -1}, {"c1": 2, "c2": -2, "c3": 2}, {"c1": -3, "c2": 3, "c3": -3}, + {"c1": 4, "c2": -4, "c3": 4}, {"c1": -5, "c2": 5, "c3": -5}]) + assert res.error_code == ErrorCode.OK + res = table_obj.output(["*"]).to_df() + print(res) + pd.testing.assert_frame_equal(res, pd.DataFrame( + {'c1': (-1, 2, -3, 4, -5), 'c2': (1, -2, 3, -4, 5), 'c3': (-1, 2, -3, 4, -5)}).astype( + {'c1': dtype('float32'), 'c2': dtype('float32'), 'c3': dtype('float32')})) + res = db_obj.drop_table("python_test_fp16_bf16", ConflictType.Error) + assert res.error_code == ErrorCode.OK + + def _test_insert_bool(self): + """ + target: test insert bool column + method: create table with bool column + expected: ok + """ + db_obj = self.infinity_obj.get_database("default_db") + db_obj.drop_table("python_test_bool_insert", ConflictType.Ignore) + table_obj = db_obj.create_table("python_test_bool_insert", {"c1": {"type": "float"}, "c2": {"type": "bool"}}, + ConflictType.Error) + assert table_obj + res = table_obj.insert([{"c1": -1, "c2": True}, {"c1": 2, "c2": False}]) + assert res.error_code == ErrorCode.OK + res = table_obj.output(["*"]).to_df() + print(res) + pd.testing.assert_frame_equal(res, pd.DataFrame({'c1': (-1, 2), 'c2': (True, False)}).astype( + {'c1': dtype('float32'), 'c2': dtype('bool')})) + res = db_obj.drop_table("python_test_bool_insert", ConflictType.Error) + assert res.error_code == ErrorCode.OK + def _test_insert_varchar(self): """ target: test insert varchar column diff --git a/python/test/internal/test_knn.py b/python/test/internal/test_knn.py index fd230c27c5..2da776bcc8 100755 --- a/python/test/internal/test_knn.py +++ b/python/test/internal/test_knn.py @@ -15,6 +15,8 @@ import os import pytest +import pandas as pd +from numpy import dtype from common import common_values import infinity from infinity.remote_thrift.infinity import RemoteThriftInfinityConnection @@ -82,6 +84,62 @@ def _test_knn(self, check_data): res = db_obj.drop_table("fix_tmp_20240116", ConflictType.Error) assert res.error_code == ErrorCode.OK + def _test_knn_u8(self, check_data): + db_obj = self.infinity_obj.get_database("default_db") + db_obj.drop_table("test_knn_u8", conflict_type=ConflictType.Ignore) + table_obj = db_obj.create_table("test_knn_u8", { + "c1": {"type": "int"}, + "c2": {"type": "vector,3,uint8"} + }, ConflictType.Error) + test_csv_dir = "/var/infinity/test_data/embedding_int_dim3.csv" + if not check_data: + copy_data("embedding_int_dim3.csv") + print("import:", test_csv_dir, " start!") + table_obj.import_data(test_csv_dir, None) + table_obj.insert([{"c1": 11, "c2": [127, 128, 255]}]) + res = table_obj.output(["*"]).to_df() + print(res) + pd.testing.assert_frame_equal(res, pd.DataFrame( + {'c1': (1, 5, 9, 11), 'c2': ([2, 3, 4], [6, 7, 8], [10, 11, 12], [127, 128, 255])}).astype( + {'c1': dtype('int32')})) + res = table_obj.output(["c1", "_distance"]).knn('c2', [0, 0, 0], "uint8", "l2", 10).to_df() + print(res) + pd.testing.assert_frame_equal(res, pd.DataFrame( + {'c1': (1, 5, 9, 11), 'DISTANCE': (29.0, 149.0, 365.0, 97538.0)}).astype( + {'c1': dtype('int32'), 'DISTANCE': dtype('float32')})) + try: + res = table_obj.create_index("invalid_lvq", [index.IndexInfo("c2", index.IndexType.Hnsw, [ + index.InitParameter("M", "16"), + index.InitParameter("ef_construction", "50"), + index.InitParameter("ef", "50"), + index.InitParameter("metric", "l2"), + index.InitParameter("encode", "lvq") + ])], ConflictType.Error) + except InfinityException as e: + pass + else: + assert False, "should raise exception" + res = table_obj.create_index("valid_lvq", [index.IndexInfo("c2", index.IndexType.Hnsw, [ + index.InitParameter("M", "16"), + index.InitParameter("ef_construction", "50"), + index.InitParameter("ef", "50"), + index.InitParameter("metric", "l2") + ])], ConflictType.Error) + assert res.error_code == ErrorCode.OK + res = table_obj.output(["c1", "_distance"]).knn('c2', [0, 0, 0], "uint8", "l2", 10).to_df() + print(res) + pd.testing.assert_frame_equal(res, pd.DataFrame( + {'c1': (1, 5, 9, 11), 'DISTANCE': (29.0, 149.0, 365.0, 97538.0)}).astype( + {'c1': dtype('int32'), 'DISTANCE': dtype('float32')})) + try: + res = table_obj.output(["c1", "_distance"]).knn('c2', [0, 0, 0], "int8", "l2", 10).to_result() + except InfinityException as e: + pass + else: + assert False, "should raise exception" + res = db_obj.drop_table("test_knn_u8", ConflictType.Error) + assert res.error_code == ErrorCode.OK + def _test_insert_multi_column(self): with pytest.raises(Exception, match=r".*value count mismatch*"): db_obj = self.infinity_obj.get_database("default_db") diff --git a/src/common/simd/NGT_CpuInfo_SimdType.h b/src/common/simd/NGT_CpuInfo_SimdType.h index b4cae6e66e..3bbf48a725 100644 --- a/src/common/simd/NGT_CpuInfo_SimdType.h +++ b/src/common/simd/NGT_CpuInfo_SimdType.h @@ -159,6 +159,7 @@ class CpuInfo { static bool isSSE2() { return is(SimdTypeSSE2); } static bool isAVX2() { return is(SimdTypeAVX2); } static bool isAVX512() { return is(SimdTypeAVX512F); } + static bool isAVX512BW() { return is(SimdTypeAVX512BW); } static std::vector getSupportedSimdTypes() { static constexpr char const *simdTypes[] = {"f16c", "sse2", diff --git a/src/common/simd/hnsw_simd_func.cppm b/src/common/simd/hnsw_simd_func.cppm index e1ccb792f5..f07125b4d2 100644 --- a/src/common/simd/hnsw_simd_func.cppm +++ b/src/common/simd/hnsw_simd_func.cppm @@ -18,6 +18,7 @@ module; #include "simd_common_intrin_include.h" import stl; +import simd_common_tools; export module hnsw_simd_func; @@ -354,6 +355,608 @@ export int32_t I8IPSSEResidual(const int8_t *pv1, const int8_t *pv2, size_t dim) //------------------------------//------------------------------//------------------------------ +export int32_t I8L2BF(const int8_t *pv1, const int8_t *pv2, size_t dim) { + int32_t res = 0; + for (size_t i = 0; i < dim; ++i) { + const int32_t t = static_cast(pv1[i]) - static_cast(pv2[i]); + res += t * t; + } + return res; +} + +#if defined(__AVX512BW__) +export int32_t I8L2AVX512BW(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pEnd1 = pv1 + (dim & ~(63u)); + const __m512i fix_high_bit = _mm512_set1_epi8(-128); // turn i8 to u8 by adding 128 (equivalent to xor with -128) + __m512i sum = _mm512_setzero_si512(); + while (pv1 < pEnd1) { + __m512i v1 = _mm512_xor_si512(_mm512_loadu_si512((__m512i *)pv1), fix_high_bit); + __m512i v2 = _mm512_xor_si512(_mm512_loadu_si512((__m512i *)pv2), fix_high_bit); + __m512i diff_abs = abs_sub_epu8_avx512(v1, v2); + // get square sum of diff_abs + __m512i diff_abs_lo = _mm512_unpacklo_epi8(diff_abs, _mm512_setzero_si512()); + __m512i diff_abs_hi = _mm512_unpackhi_epi8(diff_abs, _mm512_setzero_si512()); + __m512i sum_lo = _mm512_madd_epi16(diff_abs_lo, diff_abs_lo); + __m512i sum_hi = _mm512_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm512_add_epi32(sum, sum_lo); + sum = _mm512_add_epi32(sum, sum_hi); + pv1 += 64; + pv2 += 64; + } + return hsum_epi32_avx512(sum); +} + +export int32_t I8L2AVX512BWResidual(const int8_t *pv1, const int8_t *pv2, size_t dim) { + return I8L2AVX512BW(pv1, pv2, dim) + I8L2BF(pv1 + (dim & ~63), pv2 + (dim & ~63), dim & 63); +} +#endif + +#if defined(__AVX2__) +export int32_t I8L2AVX2(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pEnd1 = pv1 + (dim & ~(31u)); + const __m256i fix_high_bit = _mm256_set1_epi8(-128); // turn i8 to u8 by adding 128 (equivalent to xor with -128) + __m256i sum = _mm256_setzero_si256(); + while (pv1 < pEnd1) { + __m256i v1 = _mm256_xor_si256(_mm256_loadu_si256((__m256i *)pv1), fix_high_bit); + __m256i v2 = _mm256_xor_si256(_mm256_loadu_si256((__m256i *)pv2), fix_high_bit); + __m256i diff_abs = abs_sub_epu8_avx2(v1, v2); + // get square sum of diff_abs + __m256i diff_abs_lo = _mm256_unpacklo_epi8(diff_abs, _mm256_setzero_si256()); + __m256i diff_abs_hi = _mm256_unpackhi_epi8(diff_abs, _mm256_setzero_si256()); + __m256i sum_lo = _mm256_madd_epi16(diff_abs_lo, diff_abs_lo); + __m256i sum_hi = _mm256_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm256_add_epi32(sum, sum_lo); + sum = _mm256_add_epi32(sum, sum_hi); + pv1 += 32; + pv2 += 32; + } + return hsum_8x32_avx2(sum); +} + +export int32_t I8L2AVX2Residual(const int8_t *pv1, const int8_t *pv2, size_t dim) { + return I8L2AVX2(pv1, pv2, dim) + I8L2BF(pv1 + (dim & ~31), pv2 + (dim & ~31), dim & 31); +} +#endif + +#if defined(__SSE2__) +export int32_t I8L2SSE2(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pEnd1 = pv1 + (dim & ~(15u)); + const __m128i fix_high_bit = _mm_set1_epi8(-128); // turn i8 to u8 by adding 128 (equivalent to xor with -128) + __m128i sum = _mm_setzero_si128(); + while (pv1 < pEnd1) { + __m128i v1 = _mm_xor_si128(_mm_loadu_si128((__m128i *)pv1), fix_high_bit); + __m128i v2 = _mm_xor_si128(_mm_loadu_si128((__m128i *)pv2), fix_high_bit); + __m128i diff_abs = abs_sub_epu8_sse2(v1, v2); + // get square sum of diff_abs + __m128i diff_abs_lo = _mm_unpacklo_epi8(diff_abs, _mm_setzero_si128()); + __m128i diff_abs_hi = _mm_unpackhi_epi8(diff_abs, _mm_setzero_si128()); + __m128i sum_lo = _mm_madd_epi16(diff_abs_lo, diff_abs_lo); + __m128i sum_hi = _mm_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm_add_epi32(sum, sum_lo); + sum = _mm_add_epi32(sum, sum_hi); + pv1 += 16; + pv2 += 16; + } + return hsum_epi32_sse2(sum); +} + +export int32_t I8L2SSE2Residual(const int8_t *pv1, const int8_t *pv2, size_t dim) { + return I8L2SSE2(pv1, pv2, dim) + I8L2BF(pv1 + (dim & ~15), pv2 + (dim & ~15), dim & 15); +} +#endif + +//------------------------------//------------------------------//------------------------------ + +export float I8CosBF(const int8_t *pv1, const int8_t *pv2, size_t dim) { + int dot_product = 0; + int norm1 = 0; + int norm2 = 0; + for (size_t i = 0; i < dim; i++) { + const int v1 = *pv1; + const int v2 = *pv2; + dot_product += v1 * v2; + norm1 += v1 * v1; + norm2 += v2 * v2; + } + return dot_product ? dot_product / sqrt(static_cast(norm1) * static_cast(norm2)) : 0.0f; +} + +#if defined(__AVX512BW__) +export float I8CosAVX512BW(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pend1 = pv1 + (dim & ~(31u)); + const int8_t *pend2 = pv1 + dim; + __m512i sum_ip = _mm512_setzero_si512(); + __m512i sum_norm1 = _mm512_setzero_si512(); + __m512i sum_norm2 = _mm512_setzero_si512(); + while (pv1 < pend1) { + __m256i v1_mid = _mm256_loadu_si256((__m256i *)pv1); + __m256i v2_mid = _mm256_loadu_si256((__m256i *)pv2); + __m512i v1 = _mm512_cvtepi8_epi16(v1_mid); + __m512i v2 = _mm512_cvtepi8_epi16(v2_mid); + // get sum of inner product + __m512i add_ip = _mm512_madd_epi16(v1, v2); + sum_ip = _mm512_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m512i add_norm1 = _mm512_madd_epi16(v1, v1); + sum_norm1 = _mm512_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m512i add_norm2 = _mm512_madd_epi16(v2, v2); + sum_norm2 = _mm512_add_epi32(sum_norm2, add_norm2); + // move to next 32 uint8_t pair + pv1 += 32; + pv2 += 32; + } + // Reduce add + int sum_ip_res = _mm512_reduce_add_epi32(sum_ip); + int sum_norm1_res = _mm512_reduce_add_epi32(sum_norm1); + int sum_norm2_res = _mm512_reduce_add_epi32(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +#if defined(__AVX2__) +export float I8CosAVX2(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pend1 = pv1 + (dim & ~(15u)); + const int8_t *pend2 = pv1 + dim; + __m256i sum_ip = _mm256_setzero_si256(); + __m256i sum_norm1 = _mm256_setzero_si256(); + __m256i sum_norm2 = _mm256_setzero_si256(); + while (pv1 < pend1) { + __m128i v1_mid = _mm_loadu_si128((__m128i *)pv1); + __m128i v2_mid = _mm_loadu_si128((__m128i *)pv2); + __m256i v1 = _mm256_cvtepi8_epi16(v1_mid); + __m256i v2 = _mm256_cvtepi8_epi16(v2_mid); + // get sum of inner product + __m256i add_ip = _mm256_madd_epi16(v1, v2); + sum_ip = _mm256_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m256i add_norm1 = _mm256_madd_epi16(v1, v1); + sum_norm1 = _mm256_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m256i add_norm2 = _mm256_madd_epi16(v2, v2); + sum_norm2 = _mm256_add_epi32(sum_norm2, add_norm2); + // move to next 16 uint8_t pair + pv1 += 16; + pv2 += 16; + } + // Reduce add + int sum_ip_res = hsum_8x32_avx2(sum_ip); + int sum_norm1_res = hsum_8x32_avx2(sum_norm1); + int sum_norm2_res = hsum_8x32_avx2(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +#if defined(__SSE2__) +export float I8CosSSE2(const int8_t *pv1, const int8_t *pv2, size_t dim) { + const int8_t *pend1 = pv1 + (dim & ~(15u)); + const int8_t *pend2 = pv1 + dim; + __m128i sum_ip = _mm_setzero_si128(); + __m128i sum_norm1 = _mm_setzero_si128(); + __m128i sum_norm2 = _mm_setzero_si128(); + while (pv1 < pend1) { + __m128i v1 = _mm_loadu_si128((__m128i *)pv1); + __m128i v2 = _mm_loadu_si128((__m128i *)pv2); + __m128i mask1 = _mm_cmplt_epi8(v1, _mm_setzero_si128()); + __m128i mask2 = _mm_cmplt_epi8(v2, _mm_setzero_si128()); + __m128i v1_lo = _mm_unpacklo_epi8(v1, mask1); + __m128i v2_lo = _mm_unpacklo_epi8(v2, mask2); + __m128i v1_hi = _mm_unpackhi_epi8(v1, mask1); + __m128i v2_hi = _mm_unpackhi_epi8(v2, mask2); + // get sum of inner product + __m128i add_ip = _mm_madd_epi16(v1_lo, v2_lo); + sum_ip = _mm_add_epi32(sum_ip, add_ip); + add_ip = _mm_madd_epi16(v1_hi, v2_hi); + sum_ip = _mm_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m128i add_norm1 = _mm_madd_epi16(v1_lo, v1_lo); + sum_norm1 = _mm_add_epi32(sum_norm1, add_norm1); + add_norm1 = _mm_madd_epi16(v1_hi, v1_hi); + sum_norm1 = _mm_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m128i add_norm2 = _mm_madd_epi16(v2_lo, v2_lo); + sum_norm2 = _mm_add_epi32(sum_norm2, add_norm2); + add_norm2 = _mm_madd_epi16(v2_hi, v2_hi); + sum_norm2 = _mm_add_epi32(sum_norm2, add_norm2); + // move to next 16 uint8_t pair + pv1 += 16; + pv2 += 16; + } + // Reduce add + int sum_ip_res = hsum_epi32_sse2(sum_ip); + int sum_norm1_res = hsum_epi32_sse2(sum_norm1); + int sum_norm2_res = hsum_epi32_sse2(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +//------------------------------//------------------------------//------------------------------ + +export float U8CosBF(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + int dot_product = 0; + int norm1 = 0; + int norm2 = 0; + for (size_t i = 0; i < dim; i++) { + const int v1 = pv1[i]; + const int v2 = pv2[i]; + dot_product += v1 * v2; + norm1 += v1 * v1; + norm2 += v2 * v2; + } + return dot_product ? dot_product / sqrt(static_cast(norm1) * static_cast(norm2)) : 0.0f; +} + +#if defined(__AVX512BW__) +export float U8CosAVX512BW(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pend1 = pv1 + (dim & ~(63u)); + const uint8_t *pend2 = pv1 + dim; + __m512i sum_ip = _mm512_setzero_si512(); + __m512i sum_norm1 = _mm512_setzero_si512(); + __m512i sum_norm2 = _mm512_setzero_si512(); + while (pv1 < pend1) { + __m512i v1 = _mm512_loadu_si512((__m512i *)pv1); + __m512i v2 = _mm512_loadu_si512((__m512i *)pv2); + __m512i v1_lo = _mm512_unpacklo_epi8(v1, _mm512_setzero_si512()); + __m512i v2_lo = _mm512_unpacklo_epi8(v2, _mm512_setzero_si512()); + __m512i v1_hi = _mm512_unpackhi_epi8(v1, _mm512_setzero_si512()); + __m512i v2_hi = _mm512_unpackhi_epi8(v2, _mm512_setzero_si512()); + // get sum of inner product + __m512i add_ip = _mm512_madd_epi16(v1_lo, v2_lo); + sum_ip = _mm512_add_epi32(sum_ip, add_ip); + add_ip = _mm512_madd_epi16(v1_hi, v2_hi); + sum_ip = _mm512_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m512i add_norm1 = _mm512_madd_epi16(v1_lo, v1_lo); + sum_norm1 = _mm512_add_epi32(sum_norm1, add_norm1); + add_norm1 = _mm512_madd_epi16(v1_hi, v1_hi); + sum_norm1 = _mm512_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m512i add_norm2 = _mm512_madd_epi16(v2_lo, v2_lo); + sum_norm2 = _mm512_add_epi32(sum_norm2, add_norm2); + add_norm2 = _mm512_madd_epi16(v2_hi, v2_hi); + sum_norm2 = _mm512_add_epi32(sum_norm2, add_norm2); + // move to next 64 uint8_t pair + pv1 += 64; + pv2 += 64; + } + // Reduce add + int sum_ip_res = _mm512_reduce_add_epi32(sum_ip); + int sum_norm1_res = _mm512_reduce_add_epi32(sum_norm1); + int sum_norm2_res = _mm512_reduce_add_epi32(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +#if defined(__AVX2__) +export float U8CosAVX2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pend1 = pv1 + (dim & ~(31u)); + const uint8_t *pend2 = pv1 + dim; + __m256i sum_ip = _mm256_setzero_si256(); + __m256i sum_norm1 = _mm256_setzero_si256(); + __m256i sum_norm2 = _mm256_setzero_si256(); + while (pv1 < pend1) { + __m256i v1 = _mm256_loadu_si256((__m256i *)pv1); + __m256i v2 = _mm256_loadu_si256((__m256i *)pv2); + __m256i v1_lo = _mm256_unpacklo_epi8(v1, _mm256_setzero_si256()); + __m256i v2_lo = _mm256_unpacklo_epi8(v2, _mm256_setzero_si256()); + __m256i v1_hi = _mm256_unpackhi_epi8(v1, _mm256_setzero_si256()); + __m256i v2_hi = _mm256_unpackhi_epi8(v2, _mm256_setzero_si256()); + // get sum of inner product + __m256i add_ip = _mm256_madd_epi16(v1_lo, v2_lo); + sum_ip = _mm256_add_epi32(sum_ip, add_ip); + add_ip = _mm256_madd_epi16(v1_hi, v2_hi); + sum_ip = _mm256_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m256i add_norm1 = _mm256_madd_epi16(v1_lo, v1_lo); + sum_norm1 = _mm256_add_epi32(sum_norm1, add_norm1); + add_norm1 = _mm256_madd_epi16(v1_hi, v1_hi); + sum_norm1 = _mm256_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m256i add_norm2 = _mm256_madd_epi16(v2_lo, v2_lo); + sum_norm2 = _mm256_add_epi32(sum_norm2, add_norm2); + add_norm2 = _mm256_madd_epi16(v2_hi, v2_hi); + sum_norm2 = _mm256_add_epi32(sum_norm2, add_norm2); + // move to next 32 uint8_t pair + pv1 += 32; + pv2 += 32; + } + // Reduce add + int sum_ip_res = hsum_8x32_avx2(sum_ip); + int sum_norm1_res = hsum_8x32_avx2(sum_norm1); + int sum_norm2_res = hsum_8x32_avx2(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +#if defined(__SSE2__) +export float U8CosSSE2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pend1 = pv1 + (dim & ~(15u)); + const uint8_t *pend2 = pv1 + dim; + __m128i sum_ip = _mm_setzero_si128(); + __m128i sum_norm1 = _mm_setzero_si128(); + __m128i sum_norm2 = _mm_setzero_si128(); + while (pv1 < pend1) { + __m128i v1 = _mm_loadu_si128((__m128i *)pv1); + __m128i v2 = _mm_loadu_si128((__m128i *)pv2); + __m128i v1_lo = _mm_unpacklo_epi8(v1, _mm_setzero_si128()); + __m128i v2_lo = _mm_unpacklo_epi8(v2, _mm_setzero_si128()); + __m128i v1_hi = _mm_unpackhi_epi8(v1, _mm_setzero_si128()); + __m128i v2_hi = _mm_unpackhi_epi8(v2, _mm_setzero_si128()); + // get sum of inner product + __m128i add_ip = _mm_madd_epi16(v1_lo, v2_lo); + sum_ip = _mm_add_epi32(sum_ip, add_ip); + add_ip = _mm_madd_epi16(v1_hi, v2_hi); + sum_ip = _mm_add_epi32(sum_ip, add_ip); + // get sum of norm1 + __m128i add_norm1 = _mm_madd_epi16(v1_lo, v1_lo); + sum_norm1 = _mm_add_epi32(sum_norm1, add_norm1); + add_norm1 = _mm_madd_epi16(v1_hi, v1_hi); + sum_norm1 = _mm_add_epi32(sum_norm1, add_norm1); + // get sum of norm2 + __m128i add_norm2 = _mm_madd_epi16(v2_lo, v2_lo); + sum_norm2 = _mm_add_epi32(sum_norm2, add_norm2); + add_norm2 = _mm_madd_epi16(v2_hi, v2_hi); + sum_norm2 = _mm_add_epi32(sum_norm2, add_norm2); + // move to next 16 uint8_t pair + pv1 += 16; + pv2 += 16; + } + // Reduce add + int sum_ip_res = hsum_epi32_sse2(sum_ip); + int sum_norm1_res = hsum_epi32_sse2(sum_norm1); + int sum_norm2_res = hsum_epi32_sse2(sum_norm2); + // residual + while (pv1 < pend2) { + const int v1 = *pv1; + const int v2 = *pv2; + sum_ip_res += v1 * v2; + sum_norm1_res += v1 * v1; + sum_norm2_res += v2 * v2; + ++pv1; + ++pv2; + } + // return cosine similarity + return sum_ip_res ? sum_ip_res / sqrt(static_cast(sum_norm1_res) * static_cast(sum_norm2_res)) : 0.0f; +} +#endif + +//------------------------------//------------------------------//------------------------------ + +export int32_t U8IPBF(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + int32_t res = 0; + for (size_t i = 0; i < dim; ++i) { + res += static_cast(pv1[i]) * static_cast(pv2[i]); + } + return res; +} + +#if defined(__AVX512BW__) +export int32_t U8IPAVX512BW(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(63u)); + __m512i sum = _mm512_setzero_si512(); + while (pv1 < pEnd1) { + __m512i v1 = _mm512_loadu_si512((__m512i *)pv1); + __m512i v2 = _mm512_loadu_si512((__m512i *)pv2); + // get sum of inner product + __m512i v1_lo = _mm512_unpacklo_epi8(v1, _mm512_setzero_si512()); + __m512i v2_lo = _mm512_unpacklo_epi8(v2, _mm512_setzero_si512()); + __m512i v1_hi = _mm512_unpackhi_epi8(v1, _mm512_setzero_si512()); + __m512i v2_hi = _mm512_unpackhi_epi8(v2, _mm512_setzero_si512()); + __m512i mul_lo = _mm512_madd_epi16(v1_lo, v2_lo); + __m512i mul_hi = _mm512_madd_epi16(v1_hi, v2_hi); + sum = _mm512_add_epi32(sum, mul_lo); + sum = _mm512_add_epi32(sum, mul_hi); + pv1 += 64; + pv2 += 64; + } + return hsum_epi32_avx512(sum); +} + +export int32_t U8IPAVX512BWResidual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8IPAVX512BW(pv1, pv2, dim) + U8IPBF(pv1 + (dim & ~63), pv2 + (dim & ~63), dim & 63); +} +#endif + +#if defined(__AVX2__) +export int32_t U8IPAVX2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(31u)); + __m256i sum = _mm256_setzero_si256(); + while (pv1 < pEnd1) { + __m256i v1 = _mm256_loadu_si256((__m256i *)pv1); + __m256i v2 = _mm256_loadu_si256((__m256i *)pv2); + // get sum of inner product + __m256i v1_lo = _mm256_unpacklo_epi8(v1, _mm256_setzero_si256()); + __m256i v2_lo = _mm256_unpacklo_epi8(v2, _mm256_setzero_si256()); + __m256i v1_hi = _mm256_unpackhi_epi8(v1, _mm256_setzero_si256()); + __m256i v2_hi = _mm256_unpackhi_epi8(v2, _mm256_setzero_si256()); + __m256i mul_lo = _mm256_madd_epi16(v1_lo, v2_lo); + __m256i mul_hi = _mm256_madd_epi16(v1_hi, v2_hi); + sum = _mm256_add_epi32(sum, mul_lo); + sum = _mm256_add_epi32(sum, mul_hi); + pv1 += 32; + pv2 += 32; + } + return hsum_8x32_avx2(sum); +} + +export int32_t U8IPAVX2Residual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8IPAVX2(pv1, pv2, dim) + U8IPBF(pv1 + (dim & ~31), pv2 + (dim & ~31), dim & 31); +} +#endif + +#if defined(__SSE2__) +export int32_t U8IPSSE2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(15u)); + __m128i sum = _mm_setzero_si128(); + while (pv1 < pEnd1) { + __m128i v1 = _mm_loadu_si128((__m128i *)pv1); + __m128i v2 = _mm_loadu_si128((__m128i *)pv2); + // get sum of inner product + __m128i v1_lo = _mm_unpacklo_epi8(v1, _mm_setzero_si128()); + __m128i v2_lo = _mm_unpacklo_epi8(v2, _mm_setzero_si128()); + __m128i v1_hi = _mm_unpackhi_epi8(v1, _mm_setzero_si128()); + __m128i v2_hi = _mm_unpackhi_epi8(v2, _mm_setzero_si128()); + __m128i mul_lo = _mm_madd_epi16(v1_lo, v2_lo); + __m128i mul_hi = _mm_madd_epi16(v1_hi, v2_hi); + sum = _mm_add_epi32(sum, mul_lo); + sum = _mm_add_epi32(sum, mul_hi); + pv1 += 16; + pv2 += 16; + } + return hsum_epi32_sse2(sum); +} + +export int32_t U8IPSSE2Residual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8IPSSE2(pv1, pv2, dim) + U8IPBF(pv1 + (dim & ~15), pv2 + (dim & ~15), dim & 15); +} +#endif + +//------------------------------//------------------------------//------------------------------ + +export int32_t U8L2BF(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + int32_t res = 0; + for (size_t i = 0; i < dim; ++i) { + const int32_t t = static_cast(pv1[i]) - static_cast(pv2[i]); + res += t * t; + } + return res; +} + +#if defined(__AVX512BW__) +export int32_t U8L2AVX512BW(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(63u)); + __m512i sum = _mm512_setzero_si512(); + while (pv1 < pEnd1) { + __m512i v1 = _mm512_loadu_si512((__m512i *)pv1); + __m512i v2 = _mm512_loadu_si512((__m512i *)pv2); + __m512i diff_abs = abs_sub_epu8_avx512(v1, v2); + // get square sum of diff_abs + __m512i diff_abs_lo = _mm512_unpacklo_epi8(diff_abs, _mm512_setzero_si512()); + __m512i diff_abs_hi = _mm512_unpackhi_epi8(diff_abs, _mm512_setzero_si512()); + __m512i sum_lo = _mm512_madd_epi16(diff_abs_lo, diff_abs_lo); + __m512i sum_hi = _mm512_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm512_add_epi32(sum, sum_lo); + sum = _mm512_add_epi32(sum, sum_hi); + pv1 += 64; + pv2 += 64; + } + return hsum_epi32_avx512(sum); +} + +export int32_t U8L2AVX512BWResidual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8L2AVX512BW(pv1, pv2, dim) + U8L2BF(pv1 + (dim & ~63), pv2 + (dim & ~63), dim & 63); +} +#endif + +#if defined(__AVX2__) +export int32_t U8L2AVX2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(31u)); + __m256i sum = _mm256_setzero_si256(); + while (pv1 < pEnd1) { + __m256i v1 = _mm256_loadu_si256((__m256i *)pv1); + __m256i v2 = _mm256_loadu_si256((__m256i *)pv2); + __m256i diff_abs = abs_sub_epu8_avx2(v1, v2); + // get square sum of diff_abs + __m256i diff_abs_lo = _mm256_unpacklo_epi8(diff_abs, _mm256_setzero_si256()); + __m256i diff_abs_hi = _mm256_unpackhi_epi8(diff_abs, _mm256_setzero_si256()); + __m256i sum_lo = _mm256_madd_epi16(diff_abs_lo, diff_abs_lo); + __m256i sum_hi = _mm256_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm256_add_epi32(sum, sum_lo); + sum = _mm256_add_epi32(sum, sum_hi); + pv1 += 32; + pv2 += 32; + } + return hsum_8x32_avx2(sum); +} + +export int32_t U8L2AVX2Residual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8L2AVX2(pv1, pv2, dim) + U8L2BF(pv1 + (dim & ~31), pv2 + (dim & ~31), dim & 31); +} +#endif + +#if defined(__SSE2__) +export int32_t U8L2SSE2(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + const uint8_t *pEnd1 = pv1 + (dim & ~(15u)); + __m128i sum = _mm_setzero_si128(); + while (pv1 < pEnd1) { + __m128i v1 = _mm_loadu_si128((__m128i *)pv1); + __m128i v2 = _mm_loadu_si128((__m128i *)pv2); + __m128i diff_abs = abs_sub_epu8_sse2(v1, v2); + // get square sum of diff_abs + __m128i diff_abs_lo = _mm_unpacklo_epi8(diff_abs, _mm_setzero_si128()); + __m128i diff_abs_hi = _mm_unpackhi_epi8(diff_abs, _mm_setzero_si128()); + __m128i sum_lo = _mm_madd_epi16(diff_abs_lo, diff_abs_lo); + __m128i sum_hi = _mm_madd_epi16(diff_abs_hi, diff_abs_hi); + sum = _mm_add_epi32(sum, sum_lo); + sum = _mm_add_epi32(sum, sum_hi); + pv1 += 16; + pv2 += 16; + } + return hsum_epi32_sse2(sum); +} + +export int32_t U8L2SSE2Residual(const uint8_t *pv1, const uint8_t *pv2, size_t dim) { + return U8L2SSE2(pv1, pv2, dim) + U8L2BF(pv1 + (dim & ~15), pv2 + (dim & ~15), dim & 15); +} +#endif + +//------------------------------//------------------------------//------------------------------ + export float F32L2BF(const float *pv1, const float *pv2, size_t dim) { float res = 0; for (size_t i = 0; i < dim; i++) { diff --git a/src/common/simd/simd_common_tools.cppm b/src/common/simd/simd_common_tools.cppm index 393471a060..007e50d790 100644 --- a/src/common/simd/simd_common_tools.cppm +++ b/src/common/simd/simd_common_tools.cppm @@ -53,4 +53,101 @@ export inline float hsum256_ps_avx(__m256 v) { } #endif +#ifdef __SSE2__ +// https://stackoverflow.com/questions/6996764/fastest-way-to-do-horizontal-sse-vector-sum-or-other-reduction/35270026#35270026 +export int hsum_epi32_sse2(__m128i x) { + __m128i hi64 = _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)); + __m128i sum64 = _mm_add_epi32(hi64, x); + __m128i hi32 = _mm_shufflelo_epi16(sum64, _MM_SHUFFLE(1, 0, 3, 2)); // Swap the low two elements + __m128i sum32 = _mm_add_epi32(sum64, hi32); + return _mm_cvtsi128_si32(sum32); // SSE2 movd +} +#endif + +#ifdef __AVX__ +// https://stackoverflow.com/questions/60108658/fastest-method-to-calculate-sum-of-all-packed-32-bit-integers-using-avx512-or-av/60109639#60109639 +export int hsum_epi32_avx(__m128i x) +{ + __m128i hi64 = _mm_unpackhi_epi64(x, x); // 3-operand non-destructive AVX lets us save a byte without needing a movdqa + __m128i sum64 = _mm_add_epi32(hi64, x); + __m128i hi32 = _mm_shuffle_epi32(sum64, _MM_SHUFFLE(2, 3, 0, 1)); // Swap the low two elements + __m128i sum32 = _mm_add_epi32(sum64, hi32); + return _mm_cvtsi128_si32(sum32); // movd +} +#endif + +#ifdef __AVX2__ +// https://stackoverflow.com/questions/60108658/fastest-method-to-calculate-sum-of-all-packed-32-bit-integers-using-avx512-or-av/60109639#60109639 +// only needs AVX2 +export int hsum_8x32_avx2(__m256i v) +{ + __m128i sum128 = _mm_add_epi32( + _mm256_castsi256_si128(v), + _mm256_extracti128_si256(v, 1)); // silly GCC uses a longer AXV512VL instruction if AVX512 is enabled :/ + return hsum_epi32_avx(sum128); +} +#endif + +#ifdef __AVX512F__ +export int hsum_epi32_avx512(__m512i v) +{ + __m256i lo = _mm512_castsi512_si256(v); + __m256i hi = _mm512_extracti64x4_epi64(v, 1); + __m256i sum = _mm256_add_epi32(lo, hi); + return hsum_8x32_avx2(sum); +} +#endif + +#if defined(__SSE2__) +// https://github.com/WojciechMula/toys/blob/master/sse/simd-abs-sub-uint.c + +// Copyright (c) 2005-2016, Wojciech MuÅ‚a +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +export inline __m128i abs_sub_epu8_sse2(const __m128i a, const __m128i b) { + const __m128i ab = _mm_subs_epu8(a, b); + const __m128i ba = _mm_subs_epu8(b, a); + return _mm_or_si128(ab, ba); +} +#endif + +#if defined(__AVX2__) +export inline __m256i abs_sub_epu8_avx2(const __m256i a, const __m256i b) { + const __m256i ab = _mm256_subs_epu8(a, b); + const __m256i ba = _mm256_subs_epu8(b, a); + return _mm256_or_si256(ab, ba); +} +#endif + +#if defined(__AVX512BW__) +export inline __m512i abs_sub_epu8_avx512(const __m512i a, const __m512i b) { + const __m512i ab = _mm512_subs_epu8(a, b); + const __m512i ba = _mm512_subs_epu8(b, a); + return _mm512_or_si512(ab, ba); +} +#endif + } // namespace infinity diff --git a/src/common/simd/simd_functions.cppm b/src/common/simd/simd_functions.cppm index e842a9cd64..9f8592a7a3 100644 --- a/src/common/simd/simd_functions.cppm +++ b/src/common/simd/simd_functions.cppm @@ -39,6 +39,22 @@ export struct SIMD_FUNCTIONS { I8DistanceFuncType HNSW_I8IP_16_ptr_ = Get_HNSW_I8IP_16_ptr(); I8DistanceFuncType HNSW_I8IP_32_ptr_ = Get_HNSW_I8IP_32_ptr(); I8DistanceFuncType HNSW_I8IP_64_ptr_ = Get_HNSW_I8IP_64_ptr(); + I8DistanceFuncType HNSW_I8L2_ptr_ = Get_HNSW_I8L2_ptr(); + I8DistanceFuncType HNSW_I8L2_16_ptr_ = Get_HNSW_I8L2_16_ptr(); + I8DistanceFuncType HNSW_I8L2_32_ptr_ = Get_HNSW_I8L2_32_ptr(); + I8DistanceFuncType HNSW_I8L2_64_ptr_ = Get_HNSW_I8L2_64_ptr(); + I8CosDistanceFuncType HNSW_I8Cos_ptr_ = Get_HNSW_I8Cos_ptr(); + + // HNSW U8 + U8DistanceFuncType HNSW_U8L2_ptr_ = Get_HNSW_U8L2_ptr(); + U8DistanceFuncType HNSW_U8L2_16_ptr_ = Get_HNSW_U8L2_16_ptr(); + U8DistanceFuncType HNSW_U8L2_32_ptr_ = Get_HNSW_U8L2_32_ptr(); + U8DistanceFuncType HNSW_U8L2_64_ptr_ = Get_HNSW_U8L2_64_ptr(); + U8DistanceFuncType HNSW_U8IP_ptr_ = Get_HNSW_U8IP_ptr(); + U8DistanceFuncType HNSW_U8IP_16_ptr_ = Get_HNSW_U8IP_16_ptr(); + U8DistanceFuncType HNSW_U8IP_32_ptr_ = Get_HNSW_U8IP_32_ptr(); + U8DistanceFuncType HNSW_U8IP_64_ptr_ = Get_HNSW_U8IP_64_ptr(); + U8CosDistanceFuncType HNSW_U8Cos_ptr_ = Get_HNSW_U8Cos_ptr(); // EMVB FilterScoresOutputIdsFuncType FilterScoresOutputIds_func_ptr_ = GetFilterScoresOutputIdsFuncPtr(); diff --git a/src/common/simd/simd_init.cpp b/src/common/simd/simd_init.cpp index 316e1f83e1..89b98e6eb0 100644 --- a/src/common/simd/simd_init.cpp +++ b/src/common/simd/simd_init.cpp @@ -255,6 +255,272 @@ I8DistanceFuncType Get_HNSW_I8IP_ptr() { return &I8IPBF; } +I8DistanceFuncType Get_HNSW_I8L2_64_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &I8L2AVX512BW; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &I8L2AVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &I8L2SSE2; + } +#endif + return &I8L2BF; +} + +I8DistanceFuncType Get_HNSW_I8L2_32_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &I8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &I8L2AVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &I8L2SSE2; + } +#endif + return &I8L2BF; +} + +I8DistanceFuncType Get_HNSW_I8L2_16_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &I8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &I8L2AVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &I8L2SSE2; + } +#endif + return &I8L2BF; +} + +I8DistanceFuncType Get_HNSW_I8L2_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &I8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &I8L2AVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &I8L2SSE2Residual; + } +#endif + return &I8L2BF; +} + +I8CosDistanceFuncType Get_HNSW_I8Cos_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &I8CosAVX512BW; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &I8CosAVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &I8CosSSE2; + } +#endif + return &I8CosBF; +} + +U8DistanceFuncType Get_HNSW_U8L2_64_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8L2AVX512BW; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8L2AVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8L2SSE2; + } +#endif + return &U8L2BF; +} + +U8DistanceFuncType Get_HNSW_U8L2_32_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8L2AVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8L2SSE2; + } +#endif + return &U8L2BF; +} + +U8DistanceFuncType Get_HNSW_U8L2_16_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8L2AVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8L2SSE2; + } +#endif + return &U8L2BF; +} + +U8DistanceFuncType Get_HNSW_U8L2_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8L2AVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8L2AVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8L2SSE2Residual; + } +#endif + return &U8L2BF; +} + +U8DistanceFuncType Get_HNSW_U8IP_64_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8IPAVX512BW; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8IPAVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8IPSSE2; + } +#endif + return &U8IPBF; +} + +U8DistanceFuncType Get_HNSW_U8IP_32_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8IPAVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8IPAVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8IPSSE2; + } +#endif + return &U8IPBF; +} + +U8DistanceFuncType Get_HNSW_U8IP_16_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8IPAVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8IPAVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8IPSSE2; + } +#endif + return &U8IPBF; +} + +U8DistanceFuncType Get_HNSW_U8IP_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8IPAVX512BWResidual; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8IPAVX2Residual; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8IPSSE2Residual; + } +#endif + return &U8IPBF; +} + +U8CosDistanceFuncType Get_HNSW_U8Cos_ptr() { +#if defined(__AVX512BW__) + if (IsAVX512BWSupported()) { + return &U8CosAVX512BW; + } +#endif +#if defined(__AVX2__) + if (IsAVX2Supported()) { + return &U8CosAVX2; + } +#endif +#if defined(__SSE2__) + if (IsSSE2Supported()) { + return &U8CosSSE2; + } +#endif + return &U8CosBF; +} + FilterScoresOutputIdsFuncType GetFilterScoresOutputIdsFuncPtr() { #if defined(__AVX2__) if (IsAVX2Supported()) { diff --git a/src/common/simd/simd_init.cppm b/src/common/simd/simd_init.cppm index 3f4da05478..8bf5c26ca4 100644 --- a/src/common/simd/simd_init.cppm +++ b/src/common/simd/simd_init.cppm @@ -25,9 +25,13 @@ export using infinity::IsF16CSupported; export using infinity::IsSSE2Supported; export using infinity::IsAVX2Supported; export using infinity::IsAVX512Supported; +export using infinity::IsAVX512BWSupported; export using F32DistanceFuncType = f32(*)(const f32 *, const f32 *, SizeT); export using I8DistanceFuncType = i32(*)(const i8 *, const i8 *, SizeT); +export using I8CosDistanceFuncType = f32(*)(const i8 *, const i8 *, SizeT); +export using U8DistanceFuncType = i32(*)(const u8 *, const u8 *, SizeT); +export using U8CosDistanceFuncType = f32(*)(const u8 *, const u8 *, SizeT); export using FilterScoresOutputIdsFuncType = u32 * (*)(u32 *, f32, const f32 *, u32); export using SearchTop1WithDisF32U32FuncType = void(*)(u32, u32, const f32 *, u32, const f32 *, u32 *, f32 *); @@ -47,6 +51,21 @@ export I8DistanceFuncType Get_HNSW_I8IP_ptr(); export I8DistanceFuncType Get_HNSW_I8IP_16_ptr(); export I8DistanceFuncType Get_HNSW_I8IP_32_ptr(); export I8DistanceFuncType Get_HNSW_I8IP_64_ptr(); +export I8DistanceFuncType Get_HNSW_I8L2_ptr(); +export I8DistanceFuncType Get_HNSW_I8L2_16_ptr(); +export I8DistanceFuncType Get_HNSW_I8L2_32_ptr(); +export I8DistanceFuncType Get_HNSW_I8L2_64_ptr(); +export I8CosDistanceFuncType Get_HNSW_I8Cos_ptr(); +// HNSW U8 +export U8DistanceFuncType Get_HNSW_U8L2_ptr(); +export U8DistanceFuncType Get_HNSW_U8L2_16_ptr(); +export U8DistanceFuncType Get_HNSW_U8L2_32_ptr(); +export U8DistanceFuncType Get_HNSW_U8L2_64_ptr(); +export U8DistanceFuncType Get_HNSW_U8IP_ptr(); +export U8DistanceFuncType Get_HNSW_U8IP_16_ptr(); +export U8DistanceFuncType Get_HNSW_U8IP_32_ptr(); +export U8DistanceFuncType Get_HNSW_U8IP_64_ptr(); +export U8CosDistanceFuncType Get_HNSW_U8Cos_ptr(); // EMVB export FilterScoresOutputIdsFuncType GetFilterScoresOutputIdsFuncPtr(); // K-means diff --git a/src/common/simd/simd_init_h.cpp b/src/common/simd/simd_init_h.cpp index 908fe09fa6..fd33826c8c 100644 --- a/src/common/simd/simd_init_h.cpp +++ b/src/common/simd/simd_init_h.cpp @@ -23,6 +23,7 @@ struct SupportedSimdTypes { bool is_sse2_ = NGT::CpuInfo::isSSE2(); bool is_avx2_ = NGT::CpuInfo::isAVX2(); bool is_avx512_ = NGT::CpuInfo::isAVX512(); + bool is_avx512bw_ = NGT::CpuInfo::isAVX512BW(); }; const SupportedSimdTypes &GetSupportedSimdTypes() { @@ -40,5 +41,6 @@ bool IsAVX2Supported() { return GetSupportedSimdTypes().is_avx2_; } bool IsAVX512Supported() { return GetSupportedSimdTypes().is_avx512_; } +bool IsAVX512BWSupported() { return GetSupportedSimdTypes().is_avx512bw_; } } // namespace infinity diff --git a/src/common/simd/simd_init_h.h b/src/common/simd/simd_init_h.h index 8e7248e5c0..3cdf18e73f 100644 --- a/src/common/simd/simd_init_h.h +++ b/src/common/simd/simd_init_h.h @@ -22,5 +22,6 @@ bool IsF16CSupported(); bool IsSSE2Supported(); bool IsAVX2Supported(); bool IsAVX512Supported(); +bool IsAVX512BWSupported(); } // namespace infinity diff --git a/src/common/stl.cppm b/src/common/stl.cppm index 1423287f61..f6d1f1f947 100644 --- a/src/common/stl.cppm +++ b/src/common/stl.cppm @@ -254,6 +254,8 @@ export namespace std { using std::is_floating_point_v; using std::common_type_t; using std::underlying_type_t; + using std::conditional_t; + using std::remove_pointer_t; using std::function; using std::monostate; diff --git a/src/embedded_infinity/wrap_infinity.cpp b/src/embedded_infinity/wrap_infinity.cpp index 4249f89647..2fc1552baf 100644 --- a/src/embedded_infinity/wrap_infinity.cpp +++ b/src/embedded_infinity/wrap_infinity.cpp @@ -222,7 +222,19 @@ ParsedExpr *WrapBetweenExpr::GetParsedExpr(Status &status) { Tuple GetEmbeddingDataTypeDataPtrFromProto(const EmbeddingData &embedding_data, Status &status) { status.code_ = ErrorCode::kOk; - if (embedding_data.i8_array_value.size() != 0) { + if (embedding_data.u8_array_value.size() != 0) { + auto ptr_i16 = (int16_t *)(embedding_data.u8_array_value.data()); + auto ptr_u8 = (uint8_t *)(embedding_data.u8_array_value.data()); + for (size_t i = 0; i < embedding_data.u8_array_value.size(); ++i) { + ptr_u8[i] = static_cast(ptr_i16[i]); + } + return {(void *)embedding_data.u8_array_value.data(), embedding_data.u8_array_value.size()}; + } else if (embedding_data.i8_array_value.size() != 0) { + auto ptr_i16 = (int16_t *)(embedding_data.i8_array_value.data()); + auto ptr_i8 = (int8_t *)(embedding_data.i8_array_value.data()); + for (size_t i = 0; i < embedding_data.i8_array_value.size(); ++i) { + ptr_i8[i] = static_cast(ptr_i16[i]); + } return {(void *)embedding_data.i8_array_value.data(), embedding_data.i8_array_value.size()}; } else if (embedding_data.i16_array_value.size() != 0) { return {(void *)embedding_data.i16_array_value.data(), embedding_data.i16_array_value.size()}; @@ -1001,6 +1013,8 @@ void ProcessColumnFieldType(ColumnField &output_column_field, SizeT row_count, c case LogicalType::kInteger: case LogicalType::kBigInt: case LogicalType::kHugeInt: + case LogicalType::kFloat16: + case LogicalType::kBFloat16: case LogicalType::kFloat: case LogicalType::kDouble: { HandlePodType(output_column_field, row_count, column_vector); @@ -1053,6 +1067,8 @@ void DataTypeToWrapDataType(WrapDataType &proto_data_type, const SharedPtrtype(); diff --git a/src/embedded_infinity/wrap_infinity.cppm b/src/embedded_infinity/wrap_infinity.cppm index 40467e3fbf..24de46a5f9 100644 --- a/src/embedded_infinity/wrap_infinity.cppm +++ b/src/embedded_infinity/wrap_infinity.cppm @@ -170,7 +170,8 @@ export struct WrapBetweenExpr { export struct EmbeddingData { Vector bool_array_value; - Vector i8_array_value; + Vector u8_array_value; + Vector i8_array_value; Vector i16_array_value; Vector i32_array_value; Vector i64_array_value; diff --git a/src/embedded_infinity_ext.cpp b/src/embedded_infinity_ext.cpp index d97cd2e791..80b5dc0b55 100644 --- a/src/embedded_infinity_ext.cpp +++ b/src/embedded_infinity_ext.cpp @@ -143,6 +143,7 @@ NB_MODULE(embedded_infinity_ext, m) { nb::class_(m, "EmbeddingData") .def(nb::init<>()) .def_rw("bool_array_value", &EmbeddingData::bool_array_value) + .def_rw("u8_array_value", &EmbeddingData::u8_array_value) .def_rw("i8_array_value", &EmbeddingData::i8_array_value) .def_rw("i16_array_value", &EmbeddingData::i16_array_value) .def_rw("i32_array_value", &EmbeddingData::i32_array_value) @@ -618,6 +619,8 @@ NB_MODULE(embedded_infinity_ext, m) { .value("kDecimal", LogicalType::kDecimal) .value("kFloat", LogicalType::kFloat) .value("kDouble", LogicalType::kDouble) + .value("kFloat16", LogicalType::kFloat16) + .value("kBFloat16", LogicalType::kBFloat16) .value("kVarchar", LogicalType::kVarchar) .value("kDate", LogicalType::kDate) .value("kTime", LogicalType::kTime) @@ -665,6 +668,7 @@ NB_MODULE(embedded_infinity_ext, m) { // embedding_info nb::enum_(m, "EmbeddingDataType") .value("kElemBit", EmbeddingDataType::kElemBit) + .value("kElemUInt8", EmbeddingDataType::kElemUInt8) .value("kElemInt8", EmbeddingDataType::kElemInt8) .value("kElemInt16", EmbeddingDataType::kElemInt16) .value("kElemInt32", EmbeddingDataType::kElemInt32) diff --git a/src/executor/operator/physical_scan/physical_knn_scan.cpp b/src/executor/operator/physical_scan/physical_knn_scan.cpp index 76f0bc5873..209ced7318 100644 --- a/src/executor/operator/physical_scan/physical_knn_scan.cpp +++ b/src/executor/operator/physical_scan/physical_knn_scan.cpp @@ -167,12 +167,50 @@ bool PhysicalKnnScan::Execute(QueryContext *query_context, OperatorState *operat switch (dist_type) { case KnnDistanceType::kL2: case KnnDistanceType::kHamming: { - ExecuteInternal(query_context, knn_scan_operator_state); + ExecuteInternal(query_context, knn_scan_operator_state); break; } case KnnDistanceType::kCosine: case KnnDistanceType::kInnerProduct: { - ExecuteInternal(query_context, knn_scan_operator_state); + ExecuteInternal(query_context, knn_scan_operator_state); + break; + } + default: { + Status status = Status::NotSupport("Not implemented KNN distance"); + RecoverableError(status); + } + } + break; + } + case kElemUInt8: { + switch (dist_type) { + case KnnDistanceType::kL2: + case KnnDistanceType::kHamming: { + ExecuteInternal(query_context, knn_scan_operator_state); + break; + } + case KnnDistanceType::kCosine: + case KnnDistanceType::kInnerProduct: { + ExecuteInternal(query_context, knn_scan_operator_state); + break; + } + default: { + Status status = Status::NotSupport("Not implemented KNN distance"); + RecoverableError(status); + } + } + break; + } + case kElemInt8: { + switch (dist_type) { + case KnnDistanceType::kL2: + case KnnDistanceType::kHamming: { + ExecuteInternal(query_context, knn_scan_operator_state); + break; + } + case KnnDistanceType::kCosine: + case KnnDistanceType::kInnerProduct: { + ExecuteInternal(query_context, knn_scan_operator_state); break; } default: { @@ -264,7 +302,7 @@ void PhysicalKnnScan::PlanWithIndex(QueryContext *query_context) { // TODO: retu SizeT PhysicalKnnScan::BlockEntryCount() const { return base_table_ref_->block_index_->BlockCount(); } -template typename C> +template typename C, typename DistanceType> void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperatorState *operator_state) { Txn *txn = query_context->GetTxn(); TxnTimeStamp begin_ts = txn->BeginTS(); @@ -277,9 +315,14 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat auto knn_scan_function_data = operator_state->knn_scan_function_data_.get(); auto knn_scan_shared_data = knn_scan_function_data->knn_scan_shared_data_; - auto dist_func = static_cast *>(knn_scan_function_data->knn_distance_.get()); - auto merge_heap = static_cast *>(knn_scan_function_data->merge_knn_base_.get()); + auto dist_func = dynamic_cast *>(knn_scan_function_data->knn_distance_.get()); + auto merge_heap = dynamic_cast *>(knn_scan_function_data->merge_knn_base_.get()); auto query = static_cast(knn_scan_shared_data->query_embedding_); + if (!dist_func || !merge_heap) { + const auto err = "Invalid dynamic cast"; + LOG_ERROR(err); + UnrecoverableError(err); + } const SizeT index_task_n = knn_scan_shared_data->index_entries_->size(); const SizeT brute_task_n = knn_scan_shared_data->block_column_entries_->size(); @@ -348,6 +391,7 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat switch (segment_index_entry->table_index_entry()->index_base()->index_type_) { case IndexType::kIVFFlat: { + if constexpr (std::is_same_v) { BufferHandle index_handle = segment_index_entry->GetIndex(); auto index = static_cast *>(index_handle.GetData()); i32 n_probes = 1; @@ -409,6 +453,10 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat } } break; + } else { + String error_message = "Invalid data type"; + UnrecoverableError(error_message); + } } case IndexType::kHnsw: { auto hnsw_search = [&](auto *hnsw_index, bool with_lock) { @@ -428,7 +476,7 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat static_cast(knn_scan_shared_data->query_embedding_) + query_idx * knn_scan_shared_data->dimension_; SizeT result_n1 = 0; - UniquePtr d_ptr = nullptr; + UniquePtr d_ptr = nullptr; UniquePtr l_ptr = nullptr; if (use_bitmask) { if (segment_entry->CheckAnyDelete(begin_ts)) { @@ -544,7 +592,12 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat if constexpr (std::is_same_v) { UnrecoverableError("Invalid index type"); } else { - hnsw_search(arg, with_lock); + using HnswIndexDataType = typename std::remove_pointer_t::DataType; + if constexpr (!std::is_same_v) { + UnrecoverableError("Invalid data type"); + } else { + hnsw_search(arg, with_lock); + } } }, abstract_hnsw); @@ -587,7 +640,7 @@ void PhysicalKnnScan::ExecuteInternal(QueryContext *query_context, KnnScanOperat row_ids_list.emplace_back(merge_heap->GetIDsByIdx(query_id)); } - this->SetOutput(result_dists_list, row_ids_list, sizeof(DataType), result_n, query_context, operator_state); + this->SetOutput(result_dists_list, row_ids_list, sizeof(DistanceType), result_n, query_context, operator_state); operator_state->SetComplete(); } } diff --git a/src/executor/operator/physical_scan/physical_knn_scan.cppm b/src/executor/operator/physical_scan/physical_knn_scan.cppm index 95802dd5db..3998ca1fe6 100644 --- a/src/executor/operator/physical_scan/physical_knn_scan.cppm +++ b/src/executor/operator/physical_scan/physical_knn_scan.cppm @@ -95,7 +95,7 @@ public: private: void InitBlockParallelOption(); - template typename C> + template typename C, typename DistanceType> void ExecuteInternal(QueryContext *query_context, KnnScanOperatorState *operator_state); }; diff --git a/src/executor/operator/physical_scan/physical_match_sparse_scan.cpp b/src/executor/operator/physical_scan/physical_match_sparse_scan.cpp index b7b83e5193..5e78d579c9 100644 --- a/src/executor/operator/physical_scan/physical_match_sparse_scan.cpp +++ b/src/executor/operator/physical_scan/physical_match_sparse_scan.cpp @@ -225,6 +225,10 @@ bool PhysicalMatchSparseScan::Execute(QueryContext *query_context, OperatorState ExecuteInner(query_context, match_sparse_scan_state, sparse_info, match_sparse_expr_->metric_type_); break; } + case EmbeddingDataType::kElemUInt8: { + ExecuteInner(query_context, match_sparse_scan_state, sparse_info, match_sparse_expr_->metric_type_); + break; + } default: { UnrecoverableError("Not implemented yet"); } @@ -314,7 +318,7 @@ template match_sparse_scan_function_data_; - using MergeHeap = MergeKnn; + using MergeHeap = MergeKnn; auto *merge_heap = static_cast(function_data.merge_knn_base_.get()); if constexpr (std::is_same_v) { using DistFuncT = SparseBitDistance; diff --git a/src/executor/operator/physical_scan/physical_match_tensor_scan.cpp b/src/executor/operator/physical_scan/physical_match_tensor_scan.cpp index 20e7759905..6471d8f9fb 100644 --- a/src/executor/operator/physical_scan/physical_match_tensor_scan.cpp +++ b/src/executor/operator/physical_scan/physical_match_tensor_scan.cpp @@ -699,6 +699,9 @@ void ElemTypeDispatch(Params ¶meter_pack, EmbeddingDataType type_enum, Args. case EmbeddingDataType::kElemBit: { return ElemTypeDispatch>>(parameter_pack, extra_types...); } + case EmbeddingDataType::kElemUInt8: { + return ElemTypeDispatch>>(parameter_pack, extra_types...); + } case EmbeddingDataType::kElemInt8: { return ElemTypeDispatch>>(parameter_pack, extra_types...); } diff --git a/src/executor/operator/physical_scan/physical_merge_knn.cpp b/src/executor/operator/physical_scan/physical_merge_knn.cpp index 1fe07758e1..d798caf504 100644 --- a/src/executor/operator/physical_scan/physical_merge_knn.cpp +++ b/src/executor/operator/physical_scan/physical_merge_knn.cpp @@ -55,6 +55,8 @@ bool PhysicalMergeKnn::Execute(QueryContext *query_context, OperatorState *opera UnrecoverableError(error_message); break; } + case kElemUInt8: + case kElemInt8: case kElemFloat: { switch (merge_knn_data.heap_type_) { case MergeKnnHeapType::kInvalid: { @@ -91,8 +93,11 @@ void PhysicalMergeKnn::ExecuteInner(QueryContext *query_context, MergeKnnOperato UnrecoverableError(error_message); } - auto merge_knn = static_cast *>(merge_knn_data.merge_knn_base_.get()); - + auto merge_knn = dynamic_cast *>(merge_knn_data.merge_knn_base_.get()); + if (merge_knn == nullptr) { + String error_message = "Invalid merge knn data type"; + UnrecoverableError(error_message); + } int column_n = input_data.column_count() - 2; if (column_n < 0) { String error_message = "Input data block is invalid"; diff --git a/src/executor/operator/physical_scan/physical_merge_match_sparse.cpp b/src/executor/operator/physical_scan/physical_merge_match_sparse.cpp index 419278973e..c58d5394e5 100644 --- a/src/executor/operator/physical_scan/physical_merge_match_sparse.cpp +++ b/src/executor/operator/physical_scan/physical_merge_match_sparse.cpp @@ -114,7 +114,7 @@ void PhysicalMergeMatchSparse::ExecuteInner(QueryContext *query_context, MergeMa SizeT topn = match_sparse_expr_->topn_; MergeSparseFunctionData &match_sparse_data = operator_state->merge_sparse_function_data_; - using MergeHeap = MergeKnn; + using MergeHeap = MergeKnn; if (match_sparse_data.merge_knn_base_.get() == nullptr) { auto merge_knn = MakeUnique(query_n, topn); merge_knn->Begin(); diff --git a/src/expression/knn_expression.cpp b/src/expression/knn_expression.cpp index 88baeb9d84..72d6119ad1 100644 --- a/src/expression/knn_expression.cpp +++ b/src/expression/knn_expression.cpp @@ -72,11 +72,12 @@ String KnnExpression::ToString() const { return alias_; } - String expr_str = fmt::format("MATCH VECTOR ({}, Float32, {}, {})", - arguments_.at(0)->Name(), - // EmbeddingT::Embedding2String(query_embedding_, embedding_data_type_, dimension_), - KnnDistanceType2Str(distance_type_), - topn_); + String expr_str = fmt::format("MATCH VECTOR ({}, {}, {}, {}, {})", + arguments_.at(0)->Name(), + EmbeddingT::Embedding2String(query_embedding_, embedding_data_type_, dimension_), + EmbeddingT::EmbeddingDataType2String(embedding_data_type_), + KnnDistanceType2Str(distance_type_), + topn_); return expr_str; } diff --git a/src/expression/match_sparse_expression.cpp b/src/expression/match_sparse_expression.cpp index 91e08f8e72..ae48085f39 100644 --- a/src/expression/match_sparse_expression.cpp +++ b/src/expression/match_sparse_expression.cpp @@ -78,6 +78,7 @@ DataType MatchSparseExpression::Type() const { case kElemDouble: { return DataType(LogicalType::kDouble); } + case kElemUInt8: case kElemInt8: case kElemInt16: case kElemInt32: diff --git a/src/function/cast/bool_cast.cppm b/src/function/cast/bool_cast.cppm index 6bef1f7083..2863f2535e 100644 --- a/src/function/cast/bool_cast.cppm +++ b/src/function/cast/bool_cast.cppm @@ -27,6 +27,7 @@ import logical_type; import internal_types; import data_type; import logger; +import status; namespace infinity { @@ -34,7 +35,7 @@ export struct TryCastBoolean { template static inline bool Run(SourceType, TargetType &) { String error_message = fmt::format("No implementation to cast from {} to {}", DataType::TypeToString(), DataType::TypeToString()); - UnrecoverableError(error_message); + RecoverableError(Status::NotSupport(error_message)); return false; } }; @@ -68,7 +69,7 @@ export inline BoundCastFunc BindBoolCast(const DataType &source, const DataType } default: { String error_message = fmt::format("Can't cast from Boolean to {}", target.ToString()); - UnrecoverableError(error_message); + RecoverableError(Status::NotSupport(error_message)); } } return BoundCastFunc(nullptr); diff --git a/src/function/cast/embedding_cast.cppm b/src/function/cast/embedding_cast.cppm index 43142b57e2..ba77239233 100644 --- a/src/function/cast/embedding_cast.cppm +++ b/src/function/cast/embedding_cast.cppm @@ -69,6 +69,9 @@ export inline BoundCastFunc BindEmbeddingCast(const DataType &source, const Data RecoverableError(status); } switch (source_info->Type()) { + case EmbeddingDataType::kElemUInt8: { + return BindEmbeddingCast(target_info); + } case EmbeddingDataType::kElemInt8: { return BindEmbeddingCast(target_info); } @@ -101,6 +104,9 @@ inline BoundCastFunc BindEmbeddingCast(const EmbeddingInfo *target) { case EmbeddingDataType::kElemBit: { return BoundCastFunc(&ColumnVectorCast::TryCastColumnVectorEmbedding); } + case EmbeddingDataType::kElemUInt8: { + return BoundCastFunc(&ColumnVectorCast::TryCastColumnVectorEmbedding); + } case EmbeddingDataType::kElemInt8: { return BoundCastFunc(&ColumnVectorCast::TryCastColumnVectorEmbedding); } @@ -131,10 +137,13 @@ struct EmbeddingTryCastToFixlen { template static inline bool Run(const SourceElemType *source, TargetElemType *target, SizeT len) { if constexpr (std::is_same_v) { - if constexpr (!(std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v)) { - String error_message = fmt::format("Not support to cast from {} to {}", DataType::TypeToString(), DataType::TypeToString()); + if constexpr (!(std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v || + std::is_same_v)) { + String error_message = fmt::format("Not support to cast from {} to {}", + DataType::TypeToString(), + DataType::TypeToString()); UnrecoverableError(error_message); } auto *dst = reinterpret_cast(target); @@ -146,10 +155,13 @@ struct EmbeddingTryCastToFixlen { } return true; } else if constexpr (std::is_same_v) { - if constexpr (!(std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v)) { - String error_message = fmt::format("Not support to cast from {} to {}", DataType::TypeToString(), DataType::TypeToString()); + if constexpr (!(std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v || + std::is_same_v)) { + String error_message = fmt::format("Not support to cast from {} to {}", + DataType::TypeToString(), + DataType::TypeToString()); UnrecoverableError(error_message); } const auto *src = reinterpret_cast(source); @@ -157,8 +169,9 @@ struct EmbeddingTryCastToFixlen { target[i] = (src[i / 8] & (1u << (i % 8))) ? 1 : 0; } return true; - } else if constexpr (std::is_same() || std::is_same() || - std::is_same() || std::is_same()) { + } else if constexpr (std::is_same() || std::is_same() || + std::is_same() || std::is_same() || + std::is_same()) { for (SizeT i = 0; i < len; ++i) { if (!IntegerTryCastToFixlen::Run(source[i], target[i])) { return false; diff --git a/src/function/cast/float_cast.cppm b/src/function/cast/float_cast.cppm index 653eb5d759..d3940ebdf1 100644 --- a/src/function/cast/float_cast.cppm +++ b/src/function/cast/float_cast.cppm @@ -107,6 +107,15 @@ struct FloatTryCastToVarlen { }; // Cast FloatT to other numeric type +template <> +inline bool FloatTryCastToFixlen::Run(FloatT source, u8 &target) { + if (source < 0.0f || source > 255.0f) { + return false; + } + target = static_cast(source); + return true; +} + template <> inline bool FloatTryCastToFixlen::Run(FloatT source, TinyIntT &target) { if (source < -128.0f || source > 127.0f) { @@ -204,6 +213,15 @@ inline bool FloatTryCastToVarlen::Run(FloatT source, VarcharT &target, ColumnVec } // Cast DoubleT to other numeric type +template <> +inline bool FloatTryCastToFixlen::Run(DoubleT source, u8 &target) { + if (source < 0.0f || source > 255.0f) { + return false; + } + target = static_cast(source); + return true; +} + template <> inline bool FloatTryCastToFixlen::Run(DoubleT source, TinyIntT &target) { if (source < -128.0f || source > 127.0f) { diff --git a/src/function/cast/integer_cast.cppm b/src/function/cast/integer_cast.cppm index a1ee48c77f..0c198eee13 100644 --- a/src/function/cast/integer_cast.cppm +++ b/src/function/cast/integer_cast.cppm @@ -100,7 +100,97 @@ struct IntegerTryCastToVarlen { } }; +// Cast u8 to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, TinyIntT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, SmallIntT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, IntegerT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, BigIntT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, HugeIntT &target) { + target.lower = source; + target.upper = (source < 0) * -1; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, FloatT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, DoubleT &target) { + target = source; + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, Float16T &target) { + target = static_cast(source); + return true; +} + +template <> +inline bool IntegerTryCastToFixlen::Run(u8 source, BFloat16T &target) { + target = static_cast(source); + return true; +} + +// TODO +template <> +inline bool IntegerTryCastToFixlen::Run(u8, DecimalT &) { + String error_message = "Not implemented"; + UnrecoverableError(error_message); + return false; +} + +// Cast u8 to VarcharT type +template <> +inline bool IntegerTryCastToVarlen::Run(u8 source, VarcharT &target, ColumnVector*) { + target.is_value_ = false; + if (source == 0) { + target.short_.data_[0] = '0'; + target.length_ = 1; + return true; + } + // TODO: High performance itoa needed here. + String tmp_str = std::to_string(source); + target.length_ = static_cast(tmp_str.size()); + if (target.length_ > VARCHAR_INLINE_LEN) { + String error_message = "Integer digits number should less than 14."; + UnrecoverableError(error_message); + } + std::memcpy(target.short_.data_, tmp_str.c_str(), target.length_); + return true; +} + // Cast TinyInt to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(TinyIntT source, u8 &target) { + target = source; + return true; +} + template <> inline bool IntegerTryCastToFixlen::Run(TinyIntT source, SmallIntT &target) { target = source; @@ -179,6 +269,15 @@ inline bool IntegerTryCastToVarlen::Run(TinyIntT source, VarcharT &target, Colum } // Cast SmallInt to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(SmallIntT source, u8 &target) { + if (source < 0 || source > std::numeric_limits::max()) { + return false; + } + target = static_cast(source); + return true; +} + template <> inline bool IntegerTryCastToFixlen::Run(SmallIntT source, TinyIntT &target) { if (source < std::numeric_limits::min() || source > std::numeric_limits::max()) { @@ -260,6 +359,15 @@ inline bool IntegerTryCastToVarlen::Run(SmallIntT source, VarcharT &target, Colu } // Cast Integer to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(IntegerT source, u8 &target) { + if (source < 0 || source > std::numeric_limits::max()) { + return false; + } + target = static_cast(source); + return true; +} + template <> inline bool IntegerTryCastToFixlen::Run(IntegerT source, TinyIntT &target) { if (source < std::numeric_limits::min() || source > std::numeric_limits::max()) { @@ -344,6 +452,15 @@ inline bool IntegerTryCastToVarlen::Run(IntegerT source, VarcharT &target, Colum } // Cast BigInt to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(BigIntT source, u8 &target) { + if (source < 0 || source > std::numeric_limits::max()) { + return false; + } + target = static_cast(source); + return true; +} + template <> inline bool IntegerTryCastToFixlen::Run(BigIntT source, TinyIntT &target) { if (source < std::numeric_limits::min() || source > std::numeric_limits::max()) { @@ -439,6 +556,13 @@ inline bool IntegerTryCastToVarlen::Run(BigIntT source, VarcharT &target, Column } // TODO: Cast HugeInt to other numeric type +template <> +inline bool IntegerTryCastToFixlen::Run(HugeIntT, u8 &) { + String error_message = "Not implement: IntegerTryCastToFixlen::Run"; + UnrecoverableError(error_message); + return false; +} + template <> inline bool IntegerTryCastToFixlen::Run(HugeIntT, TinyIntT &) { String error_message = "Not implement: IntegerTryCastToFixlen::Run"; diff --git a/src/function/table/knn_scan_data.cpp b/src/function/table/knn_scan_data.cpp index 5a6322e313..5722041fd1 100644 --- a/src/function/table/knn_scan_data.cpp +++ b/src/function/table/knn_scan_data.cpp @@ -42,22 +42,109 @@ import internal_types; import data_type; import status; import logger; +import simd_functions; namespace infinity { template <> -KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { +KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { switch (dist_type) { case KnnDistanceType::kL2: { - dist_func_ = L2Distance; + dist_func_ = GetSIMD_FUNCTIONS().L2Distance_func_ptr_; break; } case KnnDistanceType::kCosine: { - dist_func_ = CosineDistance; + dist_func_ = GetSIMD_FUNCTIONS().CosineDistance_func_ptr_; break; } case KnnDistanceType::kInnerProduct: { - dist_func_ = IPDistance; + dist_func_ = GetSIMD_FUNCTIONS().IPDistance_func_ptr_; + break; + } + default: { + Status status = Status::NotSupport(fmt::format("KnnDistanceType: {} is not support.", (i32)dist_type)); + RecoverableError(status); + } + } +} + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { + switch (dist_type) { + case KnnDistanceType::kL2: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_U8L2_ptr_; + break; + } + case KnnDistanceType::kInnerProduct: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_U8IP_ptr_; + break; + } + default: { + Status status = Status::NotSupport(fmt::format("KnnDistanceType: {} is not support.", (i32)dist_type)); + RecoverableError(status); + } + } +} + +f32 hnsw_u8l2_f32_wrapper(const u8 *v1, const u8 *v2, SizeT dim) { return static_cast(GetSIMD_FUNCTIONS().HNSW_U8L2_ptr_(v1, v2, dim)); } +f32 hnsw_u8ip_f32_wrapper(const u8 *v1, const u8 *v2, SizeT dim) { return static_cast(GetSIMD_FUNCTIONS().HNSW_U8IP_ptr_(v1, v2, dim)); } + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { + switch (dist_type) { + case KnnDistanceType::kL2: { + dist_func_ = &hnsw_u8l2_f32_wrapper; + break; + } + case KnnDistanceType::kCosine: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_U8Cos_ptr_; + break; + } + case KnnDistanceType::kInnerProduct: { + dist_func_ = &hnsw_u8ip_f32_wrapper; + break; + } + default: { + Status status = Status::NotSupport(fmt::format("KnnDistanceType: {} is not support.", (i32)dist_type)); + RecoverableError(status); + } + } +} + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { + switch (dist_type) { + case KnnDistanceType::kL2: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_I8L2_ptr_; + break; + } + case KnnDistanceType::kInnerProduct: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_I8IP_ptr_; + break; + } + default: { + Status status = Status::NotSupport(fmt::format("KnnDistanceType: {} is not support.", (i32)dist_type)); + RecoverableError(status); + } + } +} + +f32 hnsw_i8l2_f32_wrapper(const i8 *v1, const i8 *v2, SizeT dim) { return static_cast(GetSIMD_FUNCTIONS().HNSW_I8L2_ptr_(v1, v2, dim)); } +f32 hnsw_i8ip_f32_wrapper(const i8 *v1, const i8 *v2, SizeT dim) { return static_cast(GetSIMD_FUNCTIONS().HNSW_I8IP_ptr_(v1, v2, dim)); } + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type) { + switch (dist_type) { + case KnnDistanceType::kL2: { + dist_func_ = &hnsw_i8l2_f32_wrapper; + break; + } + case KnnDistanceType::kCosine: { + dist_func_ = GetSIMD_FUNCTIONS().HNSW_I8Cos_ptr_; + break; + } + case KnnDistanceType::kInnerProduct: { + dist_func_ = &hnsw_i8ip_f32_wrapper; break; } default: { @@ -73,7 +160,15 @@ KnnScanFunctionData::KnnScanFunctionData(KnnScanSharedData *shared_data, u32 cur : knn_scan_shared_data_(shared_data), task_id_(current_parallel_idx), execute_block_scan_job_(execute_block_scan_job) { switch (knn_scan_shared_data_->elem_type_) { case EmbeddingDataType::kElemFloat: { - Init(); + Init(); + break; + } + case EmbeddingDataType::kElemUInt8: { + Init(); + break; + } + case EmbeddingDataType::kElemInt8: { + Init(); break; } default: { @@ -84,7 +179,7 @@ KnnScanFunctionData::KnnScanFunctionData(KnnScanSharedData *shared_data, u32 cur } } -template +template void KnnScanFunctionData::Init() { switch (knn_scan_shared_data_->knn_distance_type_) { case KnnDistanceType::kInvalid: { @@ -93,21 +188,21 @@ void KnnScanFunctionData::Init() { } case KnnDistanceType::kL2: case KnnDistanceType::kHamming: { - auto merge_knn_max = MakeUnique>(knn_scan_shared_data_->query_count_, knn_scan_shared_data_->topk_); + auto merge_knn_max = MakeUnique>(knn_scan_shared_data_->query_count_, knn_scan_shared_data_->topk_); merge_knn_max->Begin(); merge_knn_base_ = std::move(merge_knn_max); break; } case KnnDistanceType::kCosine: case KnnDistanceType::kInnerProduct: { - auto merge_knn_min = MakeUnique>(knn_scan_shared_data_->query_count_, knn_scan_shared_data_->topk_); + auto merge_knn_min = MakeUnique>(knn_scan_shared_data_->query_count_, knn_scan_shared_data_->topk_); merge_knn_min->Begin(); merge_knn_base_ = std::move(merge_knn_min); break; } } - knn_distance_ = MakeUnique>(knn_scan_shared_data_->knn_distance_type_); + knn_distance_ = MakeUnique>(knn_scan_shared_data_->knn_distance_type_); } } // namespace infinity diff --git a/src/function/table/knn_scan_data.cppm b/src/function/table/knn_scan_data.cppm index 02fcf83314..7e61c0cee7 100644 --- a/src/function/table/knn_scan_data.cppm +++ b/src/function/table/knn_scan_data.cppm @@ -73,23 +73,26 @@ public: //------------------------------------------------------------------- -export class KnnDistanceBase1 {}; +export class KnnDistanceBase1 { +public: + virtual ~KnnDistanceBase1() = default; +}; -export template +export template class KnnDistance1 : public KnnDistanceBase1 { public: KnnDistance1(KnnDistanceType dist_type); - Vector Calculate(const DataType *datas, SizeT data_count, const DataType *query, SizeT dim) { - Vector res(data_count); + Vector Calculate(const DataType *datas, SizeT data_count, const DataType *query, SizeT dim) { + Vector res(data_count); for (SizeT i = 0; i < data_count; ++i) { res[i] = dist_func_(query, datas + i * dim, dim); } return res; } - Vector Calculate(const DataType *datas, SizeT data_count, const DataType *query, SizeT dim, Bitmask &bitmask) { - Vector res(data_count); + Vector Calculate(const DataType *datas, SizeT data_count, const DataType *query, SizeT dim, Bitmask &bitmask) { + Vector res(data_count); for (SizeT i = 0; i < data_count; ++i) { if (bitmask.IsTrue(i)) { res[i] = dist_func_(query, datas + i * dim, dim); @@ -99,13 +102,25 @@ public: } public: - using DistFunc = DataType (*)(const DataType *, const DataType *, SizeT); + using DistFunc = DistType (*)(const DataType *, const DataType *, SizeT); DistFunc dist_func_{}; }; template <> -KnnDistance1::KnnDistance1(KnnDistanceType dist_type); +KnnDistance1::KnnDistance1(KnnDistanceType dist_type); + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type); + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type); + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type); + +template <> +KnnDistance1::KnnDistance1(KnnDistanceType dist_type); //------------------------------------------------------------------- @@ -116,7 +131,7 @@ public: ~KnnScanFunctionData() final = default; private: - template + template void Init(); public: diff --git a/src/function/table/merge_knn_data.cpp b/src/function/table/merge_knn_data.cpp index 2b855e9cd8..af6c6e4859 100644 --- a/src/function/table/merge_knn_data.cpp +++ b/src/function/table/merge_knn_data.cpp @@ -39,8 +39,10 @@ MergeKnnFunctionData::MergeKnnFunctionData(i64 query_count, String error_message = "Invalid element type"; UnrecoverableError(error_message); } + case kElemUInt8: + case kElemInt8: case kElemFloat: { - MergeKnnFunctionData::InitMergeKnn(knn_distance_type); + MergeKnnFunctionData::InitMergeKnn(knn_distance_type); break; } default: { @@ -50,7 +52,7 @@ MergeKnnFunctionData::MergeKnnFunctionData(i64 query_count, } } -template +template void MergeKnnFunctionData::InitMergeKnn(KnnDistanceType knn_distance_type) { switch (knn_distance_type) { case KnnDistanceType::kInvalid: { @@ -59,7 +61,7 @@ void MergeKnnFunctionData::InitMergeKnn(KnnDistanceType knn_distance_type) { } case KnnDistanceType::kL2: case KnnDistanceType::kHamming: { - auto merge_knn_max = MakeShared>(query_count_, topk_); + auto merge_knn_max = MakeShared>(query_count_, topk_); merge_knn_max->Begin(); merge_knn_base_ = std::move(merge_knn_max); heap_type_ = MergeKnnHeapType::kMaxHeap; @@ -67,7 +69,7 @@ void MergeKnnFunctionData::InitMergeKnn(KnnDistanceType knn_distance_type) { } case KnnDistanceType::kCosine: case KnnDistanceType::kInnerProduct: { - auto merge_knn_min = MakeShared>(query_count_, topk_); + auto merge_knn_min = MakeShared>(query_count_, topk_); merge_knn_min->Begin(); merge_knn_base_ = std::move(merge_knn_min); heap_type_ = MergeKnnHeapType::kMinHeap; diff --git a/src/function/table/merge_knn_data.cppm b/src/function/table/merge_knn_data.cppm index c621ec5bf0..db19a061b0 100644 --- a/src/function/table/merge_knn_data.cppm +++ b/src/function/table/merge_knn_data.cppm @@ -42,7 +42,7 @@ public: SharedPtr table_ref); private: - template + template void InitMergeKnn(KnnDistanceType knn_distance_type); public: diff --git a/src/network/connection.cpp b/src/network/connection.cpp index 8943a6f1ef..0bd4a30227 100644 --- a/src/network/connection.cpp +++ b/src/network/connection.cpp @@ -270,6 +270,7 @@ void Connection::SendTableDescription(const SharedPtr &result_table) object_width = 1; break; } + case kElemUInt8: case kElemInt8: { object_id = 1002; object_width = 1; @@ -319,6 +320,7 @@ void Connection::SendTableDescription(const SharedPtr &result_table) object_width = 1; break; } + case kElemUInt8: case kElemInt8: { object_id = 1002; object_width = 1; diff --git a/src/network/infinity_thrift/infinity_types.cpp b/src/network/infinity_thrift/infinity_types.cpp index ba9213281a..d31515972c 100644 --- a/src/network/infinity_thrift/infinity_types.cpp +++ b/src/network/infinity_thrift/infinity_types.cpp @@ -23,6 +23,8 @@ int _kLogicTypeValues[] = { LogicType::Decimal, LogicType::Float, LogicType::Double, + LogicType::Float16, + LogicType::BFloat16, LogicType::Varchar, LogicType::Embedding, LogicType::Tensor, @@ -40,6 +42,8 @@ const char* _kLogicTypeNames[] = { "Decimal", "Float", "Double", + "Float16", + "BFloat16", "Varchar", "Embedding", "Tensor", @@ -47,7 +51,7 @@ const char* _kLogicTypeNames[] = { "Sparse", "Invalid" }; -const std::map _LogicType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(15, _kLogicTypeValues, _kLogicTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); +const std::map _LogicType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(17, _kLogicTypeValues, _kLogicTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); std::ostream& operator<<(std::ostream& out, const LogicType::type& val) { std::map::const_iterator it = _LogicType_VALUES_TO_NAMES.find(val); @@ -130,6 +134,7 @@ std::string to_string(const DropConflict::type& val) { int _kElementTypeValues[] = { ElementType::ElementBit, + ElementType::ElementUInt8, ElementType::ElementInt8, ElementType::ElementInt16, ElementType::ElementInt32, @@ -139,6 +144,7 @@ int _kElementTypeValues[] = { }; const char* _kElementTypeNames[] = { "ElementBit", + "ElementUInt8", "ElementInt8", "ElementInt16", "ElementInt32", @@ -146,7 +152,7 @@ const char* _kElementTypeNames[] = { "ElementFloat32", "ElementFloat64" }; -const std::map _ElementType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kElementTypeValues, _kElementTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); +const std::map _ElementType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kElementTypeValues, _kElementTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); std::ostream& operator<<(std::ostream& out, const ElementType::type& val) { std::map::const_iterator it = _ElementType_VALUES_TO_NAMES.find(val); @@ -325,6 +331,8 @@ int _kColumnTypeValues[] = { ColumnType::ColumnInt64, ColumnType::ColumnFloat32, ColumnType::ColumnFloat64, + ColumnType::ColumnFloat16, + ColumnType::ColumnBFloat16, ColumnType::ColumnVarchar, ColumnType::ColumnEmbedding, ColumnType::ColumnTensor, @@ -341,6 +349,8 @@ const char* _kColumnTypeNames[] = { "ColumnInt64", "ColumnFloat32", "ColumnFloat64", + "ColumnFloat16", + "ColumnBFloat16", "ColumnVarchar", "ColumnEmbedding", "ColumnTensor", @@ -349,7 +359,7 @@ const char* _kColumnTypeNames[] = { "ColumnRowID", "ColumnInvalid" }; -const std::map _ColumnType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(14, _kColumnTypeValues, _kColumnTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); +const std::map _ColumnType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(16, _kColumnTypeValues, _kColumnTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); std::ostream& operator<<(std::ostream& out, const ColumnType::type& val) { std::map::const_iterator it = _ColumnType_VALUES_TO_NAMES.find(val); @@ -372,7 +382,6 @@ std::string to_string(const ColumnType::type& val) { int _kIndexTypeValues[] = { IndexType::IVFFlat, - IndexType::HnswLVQ, IndexType::Hnsw, IndexType::FullText, IndexType::BMP, @@ -381,14 +390,13 @@ int _kIndexTypeValues[] = { }; const char* _kIndexTypeNames[] = { "IVFFlat", - "HnswLVQ", "Hnsw", "FullText", "BMP", "Secondary", "EMVB" }; -const std::map _IndexType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kIndexTypeValues, _kIndexTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); +const std::map _IndexType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kIndexTypeValues, _kIndexTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr)); std::ostream& operator<<(std::ostream& out, const IndexType::type& val) { std::map::const_iterator it = _IndexType_VALUES_TO_NAMES.find(val); @@ -2135,7 +2143,12 @@ void EmbeddingData::__set_bool_array_value(const std::vector & val) { __isset.bool_array_value = true; } -void EmbeddingData::__set_i8_array_value(const std::vector & val) { +void EmbeddingData::__set_u8_array_value(const std::vector & val) { + this->u8_array_value = val; +__isset.u8_array_value = true; +} + +void EmbeddingData::__set_i8_array_value(const std::vector & val) { this->i8_array_value = val; __isset.i8_array_value = true; } @@ -2215,19 +2228,19 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 2: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->i8_array_value.clear(); + this->u8_array_value.clear(); uint32_t _size47; ::apache::thrift::protocol::TType _etype50; xfer += iprot->readListBegin(_etype50, _size47); - this->i8_array_value.resize(_size47); + this->u8_array_value.resize(_size47); uint32_t _i51; for (_i51 = 0; _i51 < _size47; ++_i51) { - xfer += iprot->readBinary(this->i8_array_value[_i51]); + xfer += iprot->readI16(this->u8_array_value[_i51]); } xfer += iprot->readListEnd(); } - this->__isset.i8_array_value = true; + this->__isset.u8_array_value = true; } else { xfer += iprot->skip(ftype); } @@ -2235,19 +2248,19 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 3: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->i16_array_value.clear(); + this->i8_array_value.clear(); uint32_t _size52; ::apache::thrift::protocol::TType _etype55; xfer += iprot->readListBegin(_etype55, _size52); - this->i16_array_value.resize(_size52); + this->i8_array_value.resize(_size52); uint32_t _i56; for (_i56 = 0; _i56 < _size52; ++_i56) { - xfer += iprot->readI16(this->i16_array_value[_i56]); + xfer += iprot->readI16(this->i8_array_value[_i56]); } xfer += iprot->readListEnd(); } - this->__isset.i16_array_value = true; + this->__isset.i8_array_value = true; } else { xfer += iprot->skip(ftype); } @@ -2255,19 +2268,19 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 4: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->i32_array_value.clear(); + this->i16_array_value.clear(); uint32_t _size57; ::apache::thrift::protocol::TType _etype60; xfer += iprot->readListBegin(_etype60, _size57); - this->i32_array_value.resize(_size57); + this->i16_array_value.resize(_size57); uint32_t _i61; for (_i61 = 0; _i61 < _size57; ++_i61) { - xfer += iprot->readI32(this->i32_array_value[_i61]); + xfer += iprot->readI16(this->i16_array_value[_i61]); } xfer += iprot->readListEnd(); } - this->__isset.i32_array_value = true; + this->__isset.i16_array_value = true; } else { xfer += iprot->skip(ftype); } @@ -2275,19 +2288,19 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 5: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->i64_array_value.clear(); + this->i32_array_value.clear(); uint32_t _size62; ::apache::thrift::protocol::TType _etype65; xfer += iprot->readListBegin(_etype65, _size62); - this->i64_array_value.resize(_size62); + this->i32_array_value.resize(_size62); uint32_t _i66; for (_i66 = 0; _i66 < _size62; ++_i66) { - xfer += iprot->readI64(this->i64_array_value[_i66]); + xfer += iprot->readI32(this->i32_array_value[_i66]); } xfer += iprot->readListEnd(); } - this->__isset.i64_array_value = true; + this->__isset.i32_array_value = true; } else { xfer += iprot->skip(ftype); } @@ -2295,19 +2308,19 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 6: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->f32_array_value.clear(); + this->i64_array_value.clear(); uint32_t _size67; ::apache::thrift::protocol::TType _etype70; xfer += iprot->readListBegin(_etype70, _size67); - this->f32_array_value.resize(_size67); + this->i64_array_value.resize(_size67); uint32_t _i71; for (_i71 = 0; _i71 < _size67; ++_i71) { - xfer += iprot->readDouble(this->f32_array_value[_i71]); + xfer += iprot->readI64(this->i64_array_value[_i71]); } xfer += iprot->readListEnd(); } - this->__isset.f32_array_value = true; + this->__isset.i64_array_value = true; } else { xfer += iprot->skip(ftype); } @@ -2315,15 +2328,35 @@ uint32_t EmbeddingData::read(::apache::thrift::protocol::TProtocol* iprot) { case 7: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->f64_array_value.clear(); + this->f32_array_value.clear(); uint32_t _size72; ::apache::thrift::protocol::TType _etype75; xfer += iprot->readListBegin(_etype75, _size72); - this->f64_array_value.resize(_size72); + this->f32_array_value.resize(_size72); uint32_t _i76; for (_i76 = 0; _i76 < _size72; ++_i76) { - xfer += iprot->readDouble(this->f64_array_value[_i76]); + xfer += iprot->readDouble(this->f32_array_value[_i76]); + } + xfer += iprot->readListEnd(); + } + this->__isset.f32_array_value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->f64_array_value.clear(); + uint32_t _size77; + ::apache::thrift::protocol::TType _etype80; + xfer += iprot->readListBegin(_etype80, _size77); + this->f64_array_value.resize(_size77); + uint32_t _i81; + for (_i81 = 0; _i81 < _size77; ++_i81) + { + xfer += iprot->readDouble(this->f64_array_value[_i81]); } xfer += iprot->readListEnd(); } @@ -2353,88 +2386,101 @@ uint32_t EmbeddingData::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("bool_array_value", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_BOOL, static_cast(this->bool_array_value.size())); - std::vector ::const_iterator _iter77; - for (_iter77 = this->bool_array_value.begin(); _iter77 != this->bool_array_value.end(); ++_iter77) + std::vector ::const_iterator _iter82; + for (_iter82 = this->bool_array_value.begin(); _iter82 != this->bool_array_value.end(); ++_iter82) { - xfer += oprot->writeBool((*_iter77)); + xfer += oprot->writeBool((*_iter82)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.u8_array_value) { + xfer += oprot->writeFieldBegin("u8_array_value", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I16, static_cast(this->u8_array_value.size())); + std::vector ::const_iterator _iter83; + for (_iter83 = this->u8_array_value.begin(); _iter83 != this->u8_array_value.end(); ++_iter83) + { + xfer += oprot->writeI16((*_iter83)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.i8_array_value) { - xfer += oprot->writeFieldBegin("i8_array_value", ::apache::thrift::protocol::T_LIST, 2); + xfer += oprot->writeFieldBegin("i8_array_value", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->i8_array_value.size())); - std::vector ::const_iterator _iter78; - for (_iter78 = this->i8_array_value.begin(); _iter78 != this->i8_array_value.end(); ++_iter78) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I16, static_cast(this->i8_array_value.size())); + std::vector ::const_iterator _iter84; + for (_iter84 = this->i8_array_value.begin(); _iter84 != this->i8_array_value.end(); ++_iter84) { - xfer += oprot->writeBinary((*_iter78)); + xfer += oprot->writeI16((*_iter84)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.i16_array_value) { - xfer += oprot->writeFieldBegin("i16_array_value", ::apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("i16_array_value", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I16, static_cast(this->i16_array_value.size())); - std::vector ::const_iterator _iter79; - for (_iter79 = this->i16_array_value.begin(); _iter79 != this->i16_array_value.end(); ++_iter79) + std::vector ::const_iterator _iter85; + for (_iter85 = this->i16_array_value.begin(); _iter85 != this->i16_array_value.end(); ++_iter85) { - xfer += oprot->writeI16((*_iter79)); + xfer += oprot->writeI16((*_iter85)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.i32_array_value) { - xfer += oprot->writeFieldBegin("i32_array_value", ::apache::thrift::protocol::T_LIST, 4); + xfer += oprot->writeFieldBegin("i32_array_value", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->i32_array_value.size())); - std::vector ::const_iterator _iter80; - for (_iter80 = this->i32_array_value.begin(); _iter80 != this->i32_array_value.end(); ++_iter80) + std::vector ::const_iterator _iter86; + for (_iter86 = this->i32_array_value.begin(); _iter86 != this->i32_array_value.end(); ++_iter86) { - xfer += oprot->writeI32((*_iter80)); + xfer += oprot->writeI32((*_iter86)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.i64_array_value) { - xfer += oprot->writeFieldBegin("i64_array_value", ::apache::thrift::protocol::T_LIST, 5); + xfer += oprot->writeFieldBegin("i64_array_value", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->i64_array_value.size())); - std::vector ::const_iterator _iter81; - for (_iter81 = this->i64_array_value.begin(); _iter81 != this->i64_array_value.end(); ++_iter81) + std::vector ::const_iterator _iter87; + for (_iter87 = this->i64_array_value.begin(); _iter87 != this->i64_array_value.end(); ++_iter87) { - xfer += oprot->writeI64((*_iter81)); + xfer += oprot->writeI64((*_iter87)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.f32_array_value) { - xfer += oprot->writeFieldBegin("f32_array_value", ::apache::thrift::protocol::T_LIST, 6); + xfer += oprot->writeFieldBegin("f32_array_value", ::apache::thrift::protocol::T_LIST, 7); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->f32_array_value.size())); - std::vector ::const_iterator _iter82; - for (_iter82 = this->f32_array_value.begin(); _iter82 != this->f32_array_value.end(); ++_iter82) + std::vector ::const_iterator _iter88; + for (_iter88 = this->f32_array_value.begin(); _iter88 != this->f32_array_value.end(); ++_iter88) { - xfer += oprot->writeDouble((*_iter82)); + xfer += oprot->writeDouble((*_iter88)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.f64_array_value) { - xfer += oprot->writeFieldBegin("f64_array_value", ::apache::thrift::protocol::T_LIST, 7); + xfer += oprot->writeFieldBegin("f64_array_value", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->f64_array_value.size())); - std::vector ::const_iterator _iter83; - for (_iter83 = this->f64_array_value.begin(); _iter83 != this->f64_array_value.end(); ++_iter83) + std::vector ::const_iterator _iter89; + for (_iter89 = this->f64_array_value.begin(); _iter89 != this->f64_array_value.end(); ++_iter89) { - xfer += oprot->writeDouble((*_iter83)); + xfer += oprot->writeDouble((*_iter89)); } xfer += oprot->writeListEnd(); } @@ -2448,6 +2494,7 @@ uint32_t EmbeddingData::write(::apache::thrift::protocol::TProtocol* oprot) cons void swap(EmbeddingData &a, EmbeddingData &b) { using ::std::swap; swap(a.bool_array_value, b.bool_array_value); + swap(a.u8_array_value, b.u8_array_value); swap(a.i8_array_value, b.i8_array_value); swap(a.i16_array_value, b.i16_array_value); swap(a.i32_array_value, b.i32_array_value); @@ -2457,31 +2504,34 @@ void swap(EmbeddingData &a, EmbeddingData &b) { swap(a.__isset, b.__isset); } -EmbeddingData::EmbeddingData(const EmbeddingData& other84) { - bool_array_value = other84.bool_array_value; - i8_array_value = other84.i8_array_value; - i16_array_value = other84.i16_array_value; - i32_array_value = other84.i32_array_value; - i64_array_value = other84.i64_array_value; - f32_array_value = other84.f32_array_value; - f64_array_value = other84.f64_array_value; - __isset = other84.__isset; -} -EmbeddingData& EmbeddingData::operator=(const EmbeddingData& other85) { - bool_array_value = other85.bool_array_value; - i8_array_value = other85.i8_array_value; - i16_array_value = other85.i16_array_value; - i32_array_value = other85.i32_array_value; - i64_array_value = other85.i64_array_value; - f32_array_value = other85.f32_array_value; - f64_array_value = other85.f64_array_value; - __isset = other85.__isset; +EmbeddingData::EmbeddingData(const EmbeddingData& other90) { + bool_array_value = other90.bool_array_value; + u8_array_value = other90.u8_array_value; + i8_array_value = other90.i8_array_value; + i16_array_value = other90.i16_array_value; + i32_array_value = other90.i32_array_value; + i64_array_value = other90.i64_array_value; + f32_array_value = other90.f32_array_value; + f64_array_value = other90.f64_array_value; + __isset = other90.__isset; +} +EmbeddingData& EmbeddingData::operator=(const EmbeddingData& other91) { + bool_array_value = other91.bool_array_value; + u8_array_value = other91.u8_array_value; + i8_array_value = other91.i8_array_value; + i16_array_value = other91.i16_array_value; + i32_array_value = other91.i32_array_value; + i64_array_value = other91.i64_array_value; + f32_array_value = other91.f32_array_value; + f64_array_value = other91.f64_array_value; + __isset = other91.__isset; return *this; } void EmbeddingData::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "EmbeddingData("; out << "bool_array_value="; (__isset.bool_array_value ? (out << to_string(bool_array_value)) : (out << "")); + out << ", " << "u8_array_value="; (__isset.u8_array_value ? (out << to_string(u8_array_value)) : (out << "")); out << ", " << "i8_array_value="; (__isset.i8_array_value ? (out << to_string(i8_array_value)) : (out << "")); out << ", " << "i16_array_value="; (__isset.i16_array_value ? (out << to_string(i16_array_value)) : (out << "")); out << ", " << "i32_array_value="; (__isset.i32_array_value ? (out << to_string(i32_array_value)) : (out << "")); @@ -2584,15 +2634,15 @@ void swap(InitParameter &a, InitParameter &b) { swap(a.__isset, b.__isset); } -InitParameter::InitParameter(const InitParameter& other86) { - param_name = other86.param_name; - param_value = other86.param_value; - __isset = other86.__isset; +InitParameter::InitParameter(const InitParameter& other92) { + param_name = other92.param_name; + param_value = other92.param_value; + __isset = other92.__isset; } -InitParameter& InitParameter::operator=(const InitParameter& other87) { - param_name = other87.param_name; - param_value = other87.param_value; - __isset = other87.__isset; +InitParameter& InitParameter::operator=(const InitParameter& other93) { + param_name = other93.param_name; + param_value = other93.param_value; + __isset = other93.__isset; return *this; } void InitParameter::printTo(std::ostream& out) const { @@ -2686,9 +2736,9 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast88; - xfer += iprot->readI32(ecast88); - this->literal_type = static_cast(ecast88); + int32_t ecast94; + xfer += iprot->readI32(ecast94); + this->literal_type = static_cast(ecast94); this->__isset.literal_type = true; } else { xfer += iprot->skip(ftype); @@ -2730,14 +2780,14 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->i64_array_value.clear(); - uint32_t _size89; - ::apache::thrift::protocol::TType _etype92; - xfer += iprot->readListBegin(_etype92, _size89); - this->i64_array_value.resize(_size89); - uint32_t _i93; - for (_i93 = 0; _i93 < _size89; ++_i93) + uint32_t _size95; + ::apache::thrift::protocol::TType _etype98; + xfer += iprot->readListBegin(_etype98, _size95); + this->i64_array_value.resize(_size95); + uint32_t _i99; + for (_i99 = 0; _i99 < _size95; ++_i99) { - xfer += iprot->readI64(this->i64_array_value[_i93]); + xfer += iprot->readI64(this->i64_array_value[_i99]); } xfer += iprot->readListEnd(); } @@ -2750,14 +2800,14 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->f64_array_value.clear(); - uint32_t _size94; - ::apache::thrift::protocol::TType _etype97; - xfer += iprot->readListBegin(_etype97, _size94); - this->f64_array_value.resize(_size94); - uint32_t _i98; - for (_i98 = 0; _i98 < _size94; ++_i98) + uint32_t _size100; + ::apache::thrift::protocol::TType _etype103; + xfer += iprot->readListBegin(_etype103, _size100); + this->f64_array_value.resize(_size100); + uint32_t _i104; + for (_i104 = 0; _i104 < _size100; ++_i104) { - xfer += iprot->readDouble(this->f64_array_value[_i98]); + xfer += iprot->readDouble(this->f64_array_value[_i104]); } xfer += iprot->readListEnd(); } @@ -2770,32 +2820,32 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->i64_tensor_array_value.clear(); - uint32_t _size99; - ::apache::thrift::protocol::TType _etype102; - xfer += iprot->readListBegin(_etype102, _size99); - this->i64_tensor_array_value.resize(_size99); - uint32_t _i103; - for (_i103 = 0; _i103 < _size99; ++_i103) + uint32_t _size105; + ::apache::thrift::protocol::TType _etype108; + xfer += iprot->readListBegin(_etype108, _size105); + this->i64_tensor_array_value.resize(_size105); + uint32_t _i109; + for (_i109 = 0; _i109 < _size105; ++_i109) { { - this->i64_tensor_array_value[_i103].clear(); - uint32_t _size104; - ::apache::thrift::protocol::TType _etype107; - xfer += iprot->readListBegin(_etype107, _size104); - this->i64_tensor_array_value[_i103].resize(_size104); - uint32_t _i108; - for (_i108 = 0; _i108 < _size104; ++_i108) + this->i64_tensor_array_value[_i109].clear(); + uint32_t _size110; + ::apache::thrift::protocol::TType _etype113; + xfer += iprot->readListBegin(_etype113, _size110); + this->i64_tensor_array_value[_i109].resize(_size110); + uint32_t _i114; + for (_i114 = 0; _i114 < _size110; ++_i114) { { - this->i64_tensor_array_value[_i103][_i108].clear(); - uint32_t _size109; - ::apache::thrift::protocol::TType _etype112; - xfer += iprot->readListBegin(_etype112, _size109); - this->i64_tensor_array_value[_i103][_i108].resize(_size109); - uint32_t _i113; - for (_i113 = 0; _i113 < _size109; ++_i113) + this->i64_tensor_array_value[_i109][_i114].clear(); + uint32_t _size115; + ::apache::thrift::protocol::TType _etype118; + xfer += iprot->readListBegin(_etype118, _size115); + this->i64_tensor_array_value[_i109][_i114].resize(_size115); + uint32_t _i119; + for (_i119 = 0; _i119 < _size115; ++_i119) { - xfer += iprot->readI64(this->i64_tensor_array_value[_i103][_i108][_i113]); + xfer += iprot->readI64(this->i64_tensor_array_value[_i109][_i114][_i119]); } xfer += iprot->readListEnd(); } @@ -2814,32 +2864,32 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->f64_tensor_array_value.clear(); - uint32_t _size114; - ::apache::thrift::protocol::TType _etype117; - xfer += iprot->readListBegin(_etype117, _size114); - this->f64_tensor_array_value.resize(_size114); - uint32_t _i118; - for (_i118 = 0; _i118 < _size114; ++_i118) + uint32_t _size120; + ::apache::thrift::protocol::TType _etype123; + xfer += iprot->readListBegin(_etype123, _size120); + this->f64_tensor_array_value.resize(_size120); + uint32_t _i124; + for (_i124 = 0; _i124 < _size120; ++_i124) { { - this->f64_tensor_array_value[_i118].clear(); - uint32_t _size119; - ::apache::thrift::protocol::TType _etype122; - xfer += iprot->readListBegin(_etype122, _size119); - this->f64_tensor_array_value[_i118].resize(_size119); - uint32_t _i123; - for (_i123 = 0; _i123 < _size119; ++_i123) + this->f64_tensor_array_value[_i124].clear(); + uint32_t _size125; + ::apache::thrift::protocol::TType _etype128; + xfer += iprot->readListBegin(_etype128, _size125); + this->f64_tensor_array_value[_i124].resize(_size125); + uint32_t _i129; + for (_i129 = 0; _i129 < _size125; ++_i129) { { - this->f64_tensor_array_value[_i118][_i123].clear(); - uint32_t _size124; - ::apache::thrift::protocol::TType _etype127; - xfer += iprot->readListBegin(_etype127, _size124); - this->f64_tensor_array_value[_i118][_i123].resize(_size124); - uint32_t _i128; - for (_i128 = 0; _i128 < _size124; ++_i128) + this->f64_tensor_array_value[_i124][_i129].clear(); + uint32_t _size130; + ::apache::thrift::protocol::TType _etype133; + xfer += iprot->readListBegin(_etype133, _size130); + this->f64_tensor_array_value[_i124][_i129].resize(_size130); + uint32_t _i134; + for (_i134 = 0; _i134 < _size130; ++_i134) { - xfer += iprot->readDouble(this->f64_tensor_array_value[_i118][_i123][_i128]); + xfer += iprot->readDouble(this->f64_tensor_array_value[_i124][_i129][_i134]); } xfer += iprot->readListEnd(); } @@ -2858,14 +2908,14 @@ uint32_t ConstantExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->i64_array_idx.clear(); - uint32_t _size129; - ::apache::thrift::protocol::TType _etype132; - xfer += iprot->readListBegin(_etype132, _size129); - this->i64_array_idx.resize(_size129); - uint32_t _i133; - for (_i133 = 0; _i133 < _size129; ++_i133) + uint32_t _size135; + ::apache::thrift::protocol::TType _etype138; + xfer += iprot->readListBegin(_etype138, _size135); + this->i64_array_idx.resize(_size135); + uint32_t _i139; + for (_i139 = 0; _i139 < _size135; ++_i139) { - xfer += iprot->readI64(this->i64_array_idx[_i133]); + xfer += iprot->readI64(this->i64_array_idx[_i139]); } xfer += iprot->readListEnd(); } @@ -2919,10 +2969,10 @@ uint32_t ConstantExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("i64_array_value", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->i64_array_value.size())); - std::vector ::const_iterator _iter134; - for (_iter134 = this->i64_array_value.begin(); _iter134 != this->i64_array_value.end(); ++_iter134) + std::vector ::const_iterator _iter140; + for (_iter140 = this->i64_array_value.begin(); _iter140 != this->i64_array_value.end(); ++_iter140) { - xfer += oprot->writeI64((*_iter134)); + xfer += oprot->writeI64((*_iter140)); } xfer += oprot->writeListEnd(); } @@ -2932,10 +2982,10 @@ uint32_t ConstantExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("f64_array_value", ::apache::thrift::protocol::T_LIST, 7); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast(this->f64_array_value.size())); - std::vector ::const_iterator _iter135; - for (_iter135 = this->f64_array_value.begin(); _iter135 != this->f64_array_value.end(); ++_iter135) + std::vector ::const_iterator _iter141; + for (_iter141 = this->f64_array_value.begin(); _iter141 != this->f64_array_value.end(); ++_iter141) { - xfer += oprot->writeDouble((*_iter135)); + xfer += oprot->writeDouble((*_iter141)); } xfer += oprot->writeListEnd(); } @@ -2945,20 +2995,20 @@ uint32_t ConstantExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("i64_tensor_array_value", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->i64_tensor_array_value.size())); - std::vector > > ::const_iterator _iter136; - for (_iter136 = this->i64_tensor_array_value.begin(); _iter136 != this->i64_tensor_array_value.end(); ++_iter136) + std::vector > > ::const_iterator _iter142; + for (_iter142 = this->i64_tensor_array_value.begin(); _iter142 != this->i64_tensor_array_value.end(); ++_iter142) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast((*_iter136).size())); - std::vector > ::const_iterator _iter137; - for (_iter137 = (*_iter136).begin(); _iter137 != (*_iter136).end(); ++_iter137) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast((*_iter142).size())); + std::vector > ::const_iterator _iter143; + for (_iter143 = (*_iter142).begin(); _iter143 != (*_iter142).end(); ++_iter143) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*_iter137).size())); - std::vector ::const_iterator _iter138; - for (_iter138 = (*_iter137).begin(); _iter138 != (*_iter137).end(); ++_iter138) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast((*_iter143).size())); + std::vector ::const_iterator _iter144; + for (_iter144 = (*_iter143).begin(); _iter144 != (*_iter143).end(); ++_iter144) { - xfer += oprot->writeI64((*_iter138)); + xfer += oprot->writeI64((*_iter144)); } xfer += oprot->writeListEnd(); } @@ -2974,20 +3024,20 @@ uint32_t ConstantExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("f64_tensor_array_value", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->f64_tensor_array_value.size())); - std::vector > > ::const_iterator _iter139; - for (_iter139 = this->f64_tensor_array_value.begin(); _iter139 != this->f64_tensor_array_value.end(); ++_iter139) + std::vector > > ::const_iterator _iter145; + for (_iter145 = this->f64_tensor_array_value.begin(); _iter145 != this->f64_tensor_array_value.end(); ++_iter145) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast((*_iter139).size())); - std::vector > ::const_iterator _iter140; - for (_iter140 = (*_iter139).begin(); _iter140 != (*_iter139).end(); ++_iter140) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast((*_iter145).size())); + std::vector > ::const_iterator _iter146; + for (_iter146 = (*_iter145).begin(); _iter146 != (*_iter145).end(); ++_iter146) { { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast((*_iter140).size())); - std::vector ::const_iterator _iter141; - for (_iter141 = (*_iter140).begin(); _iter141 != (*_iter140).end(); ++_iter141) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_DOUBLE, static_cast((*_iter146).size())); + std::vector ::const_iterator _iter147; + for (_iter147 = (*_iter146).begin(); _iter147 != (*_iter146).end(); ++_iter147) { - xfer += oprot->writeDouble((*_iter141)); + xfer += oprot->writeDouble((*_iter147)); } xfer += oprot->writeListEnd(); } @@ -3003,10 +3053,10 @@ uint32_t ConstantExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("i64_array_idx", ::apache::thrift::protocol::T_LIST, 10); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->i64_array_idx.size())); - std::vector ::const_iterator _iter142; - for (_iter142 = this->i64_array_idx.begin(); _iter142 != this->i64_array_idx.end(); ++_iter142) + std::vector ::const_iterator _iter148; + for (_iter148 = this->i64_array_idx.begin(); _iter148 != this->i64_array_idx.end(); ++_iter148) { - xfer += oprot->writeI64((*_iter142)); + xfer += oprot->writeI64((*_iter148)); } xfer += oprot->writeListEnd(); } @@ -3032,31 +3082,31 @@ void swap(ConstantExpr &a, ConstantExpr &b) { swap(a.__isset, b.__isset); } -ConstantExpr::ConstantExpr(const ConstantExpr& other143) { - literal_type = other143.literal_type; - bool_value = other143.bool_value; - i64_value = other143.i64_value; - f64_value = other143.f64_value; - str_value = other143.str_value; - i64_array_value = other143.i64_array_value; - f64_array_value = other143.f64_array_value; - i64_tensor_array_value = other143.i64_tensor_array_value; - f64_tensor_array_value = other143.f64_tensor_array_value; - i64_array_idx = other143.i64_array_idx; - __isset = other143.__isset; -} -ConstantExpr& ConstantExpr::operator=(const ConstantExpr& other144) { - literal_type = other144.literal_type; - bool_value = other144.bool_value; - i64_value = other144.i64_value; - f64_value = other144.f64_value; - str_value = other144.str_value; - i64_array_value = other144.i64_array_value; - f64_array_value = other144.f64_array_value; - i64_tensor_array_value = other144.i64_tensor_array_value; - f64_tensor_array_value = other144.f64_tensor_array_value; - i64_array_idx = other144.i64_array_idx; - __isset = other144.__isset; +ConstantExpr::ConstantExpr(const ConstantExpr& other149) { + literal_type = other149.literal_type; + bool_value = other149.bool_value; + i64_value = other149.i64_value; + f64_value = other149.f64_value; + str_value = other149.str_value; + i64_array_value = other149.i64_array_value; + f64_array_value = other149.f64_array_value; + i64_tensor_array_value = other149.i64_tensor_array_value; + f64_tensor_array_value = other149.f64_tensor_array_value; + i64_array_idx = other149.i64_array_idx; + __isset = other149.__isset; +} +ConstantExpr& ConstantExpr::operator=(const ConstantExpr& other150) { + literal_type = other150.literal_type; + bool_value = other150.bool_value; + i64_value = other150.i64_value; + f64_value = other150.f64_value; + str_value = other150.str_value; + i64_array_value = other150.i64_array_value; + f64_array_value = other150.f64_array_value; + i64_tensor_array_value = other150.i64_tensor_array_value; + f64_tensor_array_value = other150.f64_tensor_array_value; + i64_array_idx = other150.i64_array_idx; + __isset = other150.__isset; return *this; } void ConstantExpr::printTo(std::ostream& out) const { @@ -3149,9 +3199,9 @@ uint32_t KnnExpr::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast145; - xfer += iprot->readI32(ecast145); - this->embedding_data_type = static_cast(ecast145); + int32_t ecast151; + xfer += iprot->readI32(ecast151); + this->embedding_data_type = static_cast(ecast151); this->__isset.embedding_data_type = true; } else { xfer += iprot->skip(ftype); @@ -3159,9 +3209,9 @@ uint32_t KnnExpr::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast146; - xfer += iprot->readI32(ecast146); - this->distance_type = static_cast(ecast146); + int32_t ecast152; + xfer += iprot->readI32(ecast152); + this->distance_type = static_cast(ecast152); this->__isset.distance_type = true; } else { xfer += iprot->skip(ftype); @@ -3179,14 +3229,14 @@ uint32_t KnnExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->opt_params.clear(); - uint32_t _size147; - ::apache::thrift::protocol::TType _etype150; - xfer += iprot->readListBegin(_etype150, _size147); - this->opt_params.resize(_size147); - uint32_t _i151; - for (_i151 = 0; _i151 < _size147; ++_i151) + uint32_t _size153; + ::apache::thrift::protocol::TType _etype156; + xfer += iprot->readListBegin(_etype156, _size153); + this->opt_params.resize(_size153); + uint32_t _i157; + for (_i157 = 0; _i157 < _size153; ++_i157) { - xfer += this->opt_params[_i151].read(iprot); + xfer += this->opt_params[_i157].read(iprot); } xfer += iprot->readListEnd(); } @@ -3235,10 +3285,10 @@ uint32_t KnnExpr::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("opt_params", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->opt_params.size())); - std::vector ::const_iterator _iter152; - for (_iter152 = this->opt_params.begin(); _iter152 != this->opt_params.end(); ++_iter152) + std::vector ::const_iterator _iter158; + for (_iter158 = this->opt_params.begin(); _iter158 != this->opt_params.end(); ++_iter158) { - xfer += (*_iter152).write(oprot); + xfer += (*_iter158).write(oprot); } xfer += oprot->writeListEnd(); } @@ -3260,23 +3310,23 @@ void swap(KnnExpr &a, KnnExpr &b) { swap(a.__isset, b.__isset); } -KnnExpr::KnnExpr(const KnnExpr& other153) { - column_expr = other153.column_expr; - embedding_data = other153.embedding_data; - embedding_data_type = other153.embedding_data_type; - distance_type = other153.distance_type; - topn = other153.topn; - opt_params = other153.opt_params; - __isset = other153.__isset; -} -KnnExpr& KnnExpr::operator=(const KnnExpr& other154) { - column_expr = other154.column_expr; - embedding_data = other154.embedding_data; - embedding_data_type = other154.embedding_data_type; - distance_type = other154.distance_type; - topn = other154.topn; - opt_params = other154.opt_params; - __isset = other154.__isset; +KnnExpr::KnnExpr(const KnnExpr& other159) { + column_expr = other159.column_expr; + embedding_data = other159.embedding_data; + embedding_data_type = other159.embedding_data_type; + distance_type = other159.distance_type; + topn = other159.topn; + opt_params = other159.opt_params; + __isset = other159.__isset; +} +KnnExpr& KnnExpr::operator=(const KnnExpr& other160) { + column_expr = other160.column_expr; + embedding_data = other160.embedding_data; + embedding_data_type = other160.embedding_data_type; + distance_type = other160.distance_type; + topn = other160.topn; + opt_params = other160.opt_params; + __isset = other160.__isset; return *this; } void KnnExpr::printTo(std::ostream& out) const { @@ -3379,14 +3429,14 @@ uint32_t MatchSparseExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->opt_params.clear(); - uint32_t _size155; - ::apache::thrift::protocol::TType _etype158; - xfer += iprot->readListBegin(_etype158, _size155); - this->opt_params.resize(_size155); - uint32_t _i159; - for (_i159 = 0; _i159 < _size155; ++_i159) + uint32_t _size161; + ::apache::thrift::protocol::TType _etype164; + xfer += iprot->readListBegin(_etype164, _size161); + this->opt_params.resize(_size161); + uint32_t _i165; + for (_i165 = 0; _i165 < _size161; ++_i165) { - xfer += this->opt_params[_i159].read(iprot); + xfer += this->opt_params[_i165].read(iprot); } xfer += iprot->readListEnd(); } @@ -3431,10 +3481,10 @@ uint32_t MatchSparseExpr::write(::apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeFieldBegin("opt_params", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->opt_params.size())); - std::vector ::const_iterator _iter160; - for (_iter160 = this->opt_params.begin(); _iter160 != this->opt_params.end(); ++_iter160) + std::vector ::const_iterator _iter166; + for (_iter166 = this->opt_params.begin(); _iter166 != this->opt_params.end(); ++_iter166) { - xfer += (*_iter160).write(oprot); + xfer += (*_iter166).write(oprot); } xfer += oprot->writeListEnd(); } @@ -3455,21 +3505,21 @@ void swap(MatchSparseExpr &a, MatchSparseExpr &b) { swap(a.__isset, b.__isset); } -MatchSparseExpr::MatchSparseExpr(const MatchSparseExpr& other161) { - column_expr = other161.column_expr; - query_sparse_expr = other161.query_sparse_expr; - metric_type = other161.metric_type; - topn = other161.topn; - opt_params = other161.opt_params; - __isset = other161.__isset; -} -MatchSparseExpr& MatchSparseExpr::operator=(const MatchSparseExpr& other162) { - column_expr = other162.column_expr; - query_sparse_expr = other162.query_sparse_expr; - metric_type = other162.metric_type; - topn = other162.topn; - opt_params = other162.opt_params; - __isset = other162.__isset; +MatchSparseExpr::MatchSparseExpr(const MatchSparseExpr& other167) { + column_expr = other167.column_expr; + query_sparse_expr = other167.query_sparse_expr; + metric_type = other167.metric_type; + topn = other167.topn; + opt_params = other167.opt_params; + __isset = other167.__isset; +} +MatchSparseExpr& MatchSparseExpr::operator=(const MatchSparseExpr& other168) { + column_expr = other168.column_expr; + query_sparse_expr = other168.query_sparse_expr; + metric_type = other168.metric_type; + topn = other168.topn; + opt_params = other168.opt_params; + __isset = other168.__isset; return *this; } void MatchSparseExpr::printTo(std::ostream& out) const { @@ -3553,9 +3603,9 @@ uint32_t MatchTensorExpr::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast163; - xfer += iprot->readI32(ecast163); - this->embedding_data_type = static_cast(ecast163); + int32_t ecast169; + xfer += iprot->readI32(ecast169); + this->embedding_data_type = static_cast(ecast169); this->__isset.embedding_data_type = true; } else { xfer += iprot->skip(ftype); @@ -3629,21 +3679,21 @@ void swap(MatchTensorExpr &a, MatchTensorExpr &b) { swap(a.__isset, b.__isset); } -MatchTensorExpr::MatchTensorExpr(const MatchTensorExpr& other164) { - search_method = other164.search_method; - column_expr = other164.column_expr; - embedding_data_type = other164.embedding_data_type; - embedding_data = other164.embedding_data; - extra_options = other164.extra_options; - __isset = other164.__isset; -} -MatchTensorExpr& MatchTensorExpr::operator=(const MatchTensorExpr& other165) { - search_method = other165.search_method; - column_expr = other165.column_expr; - embedding_data_type = other165.embedding_data_type; - embedding_data = other165.embedding_data; - extra_options = other165.extra_options; - __isset = other165.__isset; +MatchTensorExpr::MatchTensorExpr(const MatchTensorExpr& other170) { + search_method = other170.search_method; + column_expr = other170.column_expr; + embedding_data_type = other170.embedding_data_type; + embedding_data = other170.embedding_data; + extra_options = other170.extra_options; + __isset = other170.__isset; +} +MatchTensorExpr& MatchTensorExpr::operator=(const MatchTensorExpr& other171) { + search_method = other171.search_method; + column_expr = other171.column_expr; + embedding_data_type = other171.embedding_data_type; + embedding_data = other171.embedding_data; + extra_options = other171.extra_options; + __isset = other171.__isset; return *this; } void MatchTensorExpr::printTo(std::ostream& out) const { @@ -3767,17 +3817,17 @@ void swap(MatchExpr &a, MatchExpr &b) { swap(a.__isset, b.__isset); } -MatchExpr::MatchExpr(const MatchExpr& other166) { - fields = other166.fields; - matching_text = other166.matching_text; - options_text = other166.options_text; - __isset = other166.__isset; +MatchExpr::MatchExpr(const MatchExpr& other172) { + fields = other172.fields; + matching_text = other172.matching_text; + options_text = other172.options_text; + __isset = other172.__isset; } -MatchExpr& MatchExpr::operator=(const MatchExpr& other167) { - fields = other167.fields; - matching_text = other167.matching_text; - options_text = other167.options_text; - __isset = other167.__isset; +MatchExpr& MatchExpr::operator=(const MatchExpr& other173) { + fields = other173.fields; + matching_text = other173.matching_text; + options_text = other173.options_text; + __isset = other173.__isset; return *this; } void MatchExpr::printTo(std::ostream& out) const { @@ -3983,19 +4033,19 @@ void swap(GenericMatchExpr &a, GenericMatchExpr &b) { swap(a.__isset, b.__isset); } -GenericMatchExpr::GenericMatchExpr(const GenericMatchExpr& other168) { - match_vector_expr = other168.match_vector_expr; - match_sparse_expr = other168.match_sparse_expr; - match_tensor_expr = other168.match_tensor_expr; - match_text_expr = other168.match_text_expr; - __isset = other168.__isset; +GenericMatchExpr::GenericMatchExpr(const GenericMatchExpr& other174) { + match_vector_expr = other174.match_vector_expr; + match_sparse_expr = other174.match_sparse_expr; + match_tensor_expr = other174.match_tensor_expr; + match_text_expr = other174.match_text_expr; + __isset = other174.__isset; } -GenericMatchExpr& GenericMatchExpr::operator=(const GenericMatchExpr& other169) { - match_vector_expr = other169.match_vector_expr; - match_sparse_expr = other169.match_sparse_expr; - match_tensor_expr = other169.match_tensor_expr; - match_text_expr = other169.match_text_expr; - __isset = other169.__isset; +GenericMatchExpr& GenericMatchExpr::operator=(const GenericMatchExpr& other175) { + match_vector_expr = other175.match_vector_expr; + match_sparse_expr = other175.match_sparse_expr; + match_tensor_expr = other175.match_tensor_expr; + match_text_expr = other175.match_text_expr; + __isset = other175.__isset; return *this; } void GenericMatchExpr::printTo(std::ostream& out) const { @@ -4120,17 +4170,17 @@ void swap(FusionExpr &a, FusionExpr &b) { swap(a.__isset, b.__isset); } -FusionExpr::FusionExpr(const FusionExpr& other170) { - method = other170.method; - options_text = other170.options_text; - optional_match_tensor_expr = other170.optional_match_tensor_expr; - __isset = other170.__isset; +FusionExpr::FusionExpr(const FusionExpr& other176) { + method = other176.method; + options_text = other176.options_text; + optional_match_tensor_expr = other176.optional_match_tensor_expr; + __isset = other176.__isset; } -FusionExpr& FusionExpr::operator=(const FusionExpr& other171) { - method = other171.method; - options_text = other171.options_text; - optional_match_tensor_expr = other171.optional_match_tensor_expr; - __isset = other171.__isset; +FusionExpr& FusionExpr::operator=(const FusionExpr& other177) { + method = other177.method; + options_text = other177.options_text; + optional_match_tensor_expr = other177.optional_match_tensor_expr; + __isset = other177.__isset; return *this; } void FusionExpr::printTo(std::ostream& out) const { @@ -4188,14 +4238,14 @@ uint32_t SearchExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->match_exprs.clear(); - uint32_t _size172; - ::apache::thrift::protocol::TType _etype175; - xfer += iprot->readListBegin(_etype175, _size172); - this->match_exprs.resize(_size172); - uint32_t _i176; - for (_i176 = 0; _i176 < _size172; ++_i176) + uint32_t _size178; + ::apache::thrift::protocol::TType _etype181; + xfer += iprot->readListBegin(_etype181, _size178); + this->match_exprs.resize(_size178); + uint32_t _i182; + for (_i182 = 0; _i182 < _size178; ++_i182) { - xfer += this->match_exprs[_i176].read(iprot); + xfer += this->match_exprs[_i182].read(iprot); } xfer += iprot->readListEnd(); } @@ -4208,14 +4258,14 @@ uint32_t SearchExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fusion_exprs.clear(); - uint32_t _size177; - ::apache::thrift::protocol::TType _etype180; - xfer += iprot->readListBegin(_etype180, _size177); - this->fusion_exprs.resize(_size177); - uint32_t _i181; - for (_i181 = 0; _i181 < _size177; ++_i181) + uint32_t _size183; + ::apache::thrift::protocol::TType _etype186; + xfer += iprot->readListBegin(_etype186, _size183); + this->fusion_exprs.resize(_size183); + uint32_t _i187; + for (_i187 = 0; _i187 < _size183; ++_i187) { - xfer += this->fusion_exprs[_i181].read(iprot); + xfer += this->fusion_exprs[_i187].read(iprot); } xfer += iprot->readListEnd(); } @@ -4245,10 +4295,10 @@ uint32_t SearchExpr::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("match_exprs", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->match_exprs.size())); - std::vector ::const_iterator _iter182; - for (_iter182 = this->match_exprs.begin(); _iter182 != this->match_exprs.end(); ++_iter182) + std::vector ::const_iterator _iter188; + for (_iter188 = this->match_exprs.begin(); _iter188 != this->match_exprs.end(); ++_iter188) { - xfer += (*_iter182).write(oprot); + xfer += (*_iter188).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4258,10 +4308,10 @@ uint32_t SearchExpr::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("fusion_exprs", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fusion_exprs.size())); - std::vector ::const_iterator _iter183; - for (_iter183 = this->fusion_exprs.begin(); _iter183 != this->fusion_exprs.end(); ++_iter183) + std::vector ::const_iterator _iter189; + for (_iter189 = this->fusion_exprs.begin(); _iter189 != this->fusion_exprs.end(); ++_iter189) { - xfer += (*_iter183).write(oprot); + xfer += (*_iter189).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4279,15 +4329,15 @@ void swap(SearchExpr &a, SearchExpr &b) { swap(a.__isset, b.__isset); } -SearchExpr::SearchExpr(const SearchExpr& other184) { - match_exprs = other184.match_exprs; - fusion_exprs = other184.fusion_exprs; - __isset = other184.__isset; +SearchExpr::SearchExpr(const SearchExpr& other190) { + match_exprs = other190.match_exprs; + fusion_exprs = other190.fusion_exprs; + __isset = other190.__isset; } -SearchExpr& SearchExpr::operator=(const SearchExpr& other185) { - match_exprs = other185.match_exprs; - fusion_exprs = other185.fusion_exprs; - __isset = other185.__isset; +SearchExpr& SearchExpr::operator=(const SearchExpr& other191) { + match_exprs = other191.match_exprs; + fusion_exprs = other191.fusion_exprs; + __isset = other191.__isset; return *this; } void SearchExpr::printTo(std::ostream& out) const { @@ -4350,14 +4400,14 @@ uint32_t FunctionExpr::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->arguments.clear(); - uint32_t _size186; - ::apache::thrift::protocol::TType _etype189; - xfer += iprot->readListBegin(_etype189, _size186); - this->arguments.resize(_size186); - uint32_t _i190; - for (_i190 = 0; _i190 < _size186; ++_i190) + uint32_t _size192; + ::apache::thrift::protocol::TType _etype195; + xfer += iprot->readListBegin(_etype195, _size192); + this->arguments.resize(_size192); + uint32_t _i196; + for (_i196 = 0; _i196 < _size192; ++_i196) { - xfer += this->arguments[_i190].read(iprot); + xfer += this->arguments[_i196].read(iprot); } xfer += iprot->readListEnd(); } @@ -4390,10 +4440,10 @@ uint32_t FunctionExpr::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("arguments", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->arguments.size())); - std::vector ::const_iterator _iter191; - for (_iter191 = this->arguments.begin(); _iter191 != this->arguments.end(); ++_iter191) + std::vector ::const_iterator _iter197; + for (_iter197 = this->arguments.begin(); _iter197 != this->arguments.end(); ++_iter197) { - xfer += (*_iter191).write(oprot); + xfer += (*_iter197).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4411,15 +4461,15 @@ void swap(FunctionExpr &a, FunctionExpr &b) { swap(a.__isset, b.__isset); } -FunctionExpr::FunctionExpr(const FunctionExpr& other192) { - function_name = other192.function_name; - arguments = other192.arguments; - __isset = other192.__isset; +FunctionExpr::FunctionExpr(const FunctionExpr& other198) { + function_name = other198.function_name; + arguments = other198.arguments; + __isset = other198.__isset; } -FunctionExpr& FunctionExpr::operator=(const FunctionExpr& other193) { - function_name = other193.function_name; - arguments = other193.arguments; - __isset = other193.__isset; +FunctionExpr& FunctionExpr::operator=(const FunctionExpr& other199) { + function_name = other199.function_name; + arguments = other199.arguments; + __isset = other199.__isset; return *this; } void FunctionExpr::printTo(std::ostream& out) const { @@ -4540,17 +4590,17 @@ void swap(BetweenExpr &a, BetweenExpr &b) { swap(a.__isset, b.__isset); } -BetweenExpr::BetweenExpr(const BetweenExpr& other194) { - value = other194.value; - upper_bound = other194.upper_bound; - lower_bound = other194.lower_bound; - __isset = other194.__isset; +BetweenExpr::BetweenExpr(const BetweenExpr& other200) { + value = other200.value; + upper_bound = other200.upper_bound; + lower_bound = other200.lower_bound; + __isset = other200.__isset; } -BetweenExpr& BetweenExpr::operator=(const BetweenExpr& other195) { - value = other195.value; - upper_bound = other195.upper_bound; - lower_bound = other195.lower_bound; - __isset = other195.__isset; +BetweenExpr& BetweenExpr::operator=(const BetweenExpr& other201) { + value = other201.value; + upper_bound = other201.upper_bound; + lower_bound = other201.lower_bound; + __isset = other201.__isset; return *this; } void BetweenExpr::printTo(std::ostream& out) const { @@ -4655,15 +4705,15 @@ void swap(UpdateExpr &a, UpdateExpr &b) { swap(a.__isset, b.__isset); } -UpdateExpr::UpdateExpr(const UpdateExpr& other196) { - column_name = other196.column_name; - value = other196.value; - __isset = other196.__isset; +UpdateExpr::UpdateExpr(const UpdateExpr& other202) { + column_name = other202.column_name; + value = other202.value; + __isset = other202.__isset; } -UpdateExpr& UpdateExpr::operator=(const UpdateExpr& other197) { - column_name = other197.column_name; - value = other197.value; - __isset = other197.__isset; +UpdateExpr& UpdateExpr::operator=(const UpdateExpr& other203) { + column_name = other203.column_name; + value = other203.value; + __isset = other203.__isset; return *this; } void UpdateExpr::printTo(std::ostream& out) const { @@ -4767,15 +4817,15 @@ void swap(OrderByExpr &a, OrderByExpr &b) { swap(a.__isset, b.__isset); } -OrderByExpr::OrderByExpr(const OrderByExpr& other198) { - expr = other198.expr; - asc = other198.asc; - __isset = other198.__isset; +OrderByExpr::OrderByExpr(const OrderByExpr& other204) { + expr = other204.expr; + asc = other204.asc; + __isset = other204.__isset; } -OrderByExpr& OrderByExpr::operator=(const OrderByExpr& other199) { - expr = other199.expr; - asc = other199.asc; - __isset = other199.__isset; +OrderByExpr& OrderByExpr::operator=(const OrderByExpr& other205) { + expr = other205.expr; + asc = other205.asc; + __isset = other205.__isset; return *this; } void OrderByExpr::printTo(std::ostream& out) const { @@ -4866,16 +4916,16 @@ uint32_t ColumnDef::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->constraints.clear(); - uint32_t _size200; - ::apache::thrift::protocol::TType _etype203; - xfer += iprot->readListBegin(_etype203, _size200); - this->constraints.resize(_size200); - uint32_t _i204; - for (_i204 = 0; _i204 < _size200; ++_i204) + uint32_t _size206; + ::apache::thrift::protocol::TType _etype209; + xfer += iprot->readListBegin(_etype209, _size206); + this->constraints.resize(_size206); + uint32_t _i210; + for (_i210 = 0; _i210 < _size206; ++_i210) { - int32_t ecast205; - xfer += iprot->readI32(ecast205); - this->constraints[_i204] = static_cast(ecast205); + int32_t ecast211; + xfer += iprot->readI32(ecast211); + this->constraints[_i210] = static_cast(ecast211); } xfer += iprot->readListEnd(); } @@ -4924,10 +4974,10 @@ uint32_t ColumnDef::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("constraints", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->constraints.size())); - std::vector ::const_iterator _iter206; - for (_iter206 = this->constraints.begin(); _iter206 != this->constraints.end(); ++_iter206) + std::vector ::const_iterator _iter212; + for (_iter212 = this->constraints.begin(); _iter212 != this->constraints.end(); ++_iter212) { - xfer += oprot->writeI32(static_cast((*_iter206))); + xfer += oprot->writeI32(static_cast((*_iter212))); } xfer += oprot->writeListEnd(); } @@ -4952,21 +5002,21 @@ void swap(ColumnDef &a, ColumnDef &b) { swap(a.__isset, b.__isset); } -ColumnDef::ColumnDef(const ColumnDef& other207) { - id = other207.id; - name = other207.name; - data_type = other207.data_type; - constraints = other207.constraints; - constant_expr = other207.constant_expr; - __isset = other207.__isset; -} -ColumnDef& ColumnDef::operator=(const ColumnDef& other208) { - id = other208.id; - name = other208.name; - data_type = other208.data_type; - constraints = other208.constraints; - constant_expr = other208.constant_expr; - __isset = other208.__isset; +ColumnDef::ColumnDef(const ColumnDef& other213) { + id = other213.id; + name = other213.name; + data_type = other213.data_type; + constraints = other213.constraints; + constant_expr = other213.constant_expr; + __isset = other213.__isset; +} +ColumnDef& ColumnDef::operator=(const ColumnDef& other214) { + id = other214.id; + name = other214.name; + data_type = other214.data_type; + constraints = other214.constraints; + constant_expr = other214.constant_expr; + __isset = other214.__isset; return *this; } void ColumnDef::printTo(std::ostream& out) const { @@ -5020,14 +5070,14 @@ uint32_t Field::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->parse_exprs.clear(); - uint32_t _size209; - ::apache::thrift::protocol::TType _etype212; - xfer += iprot->readListBegin(_etype212, _size209); - this->parse_exprs.resize(_size209); - uint32_t _i213; - for (_i213 = 0; _i213 < _size209; ++_i213) + uint32_t _size215; + ::apache::thrift::protocol::TType _etype218; + xfer += iprot->readListBegin(_etype218, _size215); + this->parse_exprs.resize(_size215); + uint32_t _i219; + for (_i219 = 0; _i219 < _size215; ++_i219) { - xfer += this->parse_exprs[_i213].read(iprot); + xfer += this->parse_exprs[_i219].read(iprot); } xfer += iprot->readListEnd(); } @@ -5056,10 +5106,10 @@ uint32_t Field::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("parse_exprs", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->parse_exprs.size())); - std::vector ::const_iterator _iter214; - for (_iter214 = this->parse_exprs.begin(); _iter214 != this->parse_exprs.end(); ++_iter214) + std::vector ::const_iterator _iter220; + for (_iter220 = this->parse_exprs.begin(); _iter220 != this->parse_exprs.end(); ++_iter220) { - xfer += (*_iter214).write(oprot); + xfer += (*_iter220).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5076,13 +5126,13 @@ void swap(Field &a, Field &b) { swap(a.__isset, b.__isset); } -Field::Field(const Field& other215) { - parse_exprs = other215.parse_exprs; - __isset = other215.__isset; +Field::Field(const Field& other221) { + parse_exprs = other221.parse_exprs; + __isset = other221.__isset; } -Field& Field::operator=(const Field& other216) { - parse_exprs = other216.parse_exprs; - __isset = other216.__isset; +Field& Field::operator=(const Field& other222) { + parse_exprs = other222.parse_exprs; + __isset = other222.__isset; return *this; } void Field::printTo(std::ostream& out) const { @@ -5138,9 +5188,9 @@ uint32_t ColumnField::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast217; - xfer += iprot->readI32(ecast217); - this->column_type = static_cast(ecast217); + int32_t ecast223; + xfer += iprot->readI32(ecast223); + this->column_type = static_cast(ecast223); this->__isset.column_type = true; } else { xfer += iprot->skip(ftype); @@ -5150,14 +5200,14 @@ uint32_t ColumnField::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_vectors.clear(); - uint32_t _size218; - ::apache::thrift::protocol::TType _etype221; - xfer += iprot->readListBegin(_etype221, _size218); - this->column_vectors.resize(_size218); - uint32_t _i222; - for (_i222 = 0; _i222 < _size218; ++_i222) + uint32_t _size224; + ::apache::thrift::protocol::TType _etype227; + xfer += iprot->readListBegin(_etype227, _size224); + this->column_vectors.resize(_size224); + uint32_t _i228; + for (_i228 = 0; _i228 < _size224; ++_i228) { - xfer += iprot->readBinary(this->column_vectors[_i222]); + xfer += iprot->readBinary(this->column_vectors[_i228]); } xfer += iprot->readListEnd(); } @@ -5198,10 +5248,10 @@ uint32_t ColumnField::write(::apache::thrift::protocol::TProtocol* oprot) const xfer += oprot->writeFieldBegin("column_vectors", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->column_vectors.size())); - std::vector ::const_iterator _iter223; - for (_iter223 = this->column_vectors.begin(); _iter223 != this->column_vectors.end(); ++_iter223) + std::vector ::const_iterator _iter229; + for (_iter229 = this->column_vectors.begin(); _iter229 != this->column_vectors.end(); ++_iter229) { - xfer += oprot->writeBinary((*_iter223)); + xfer += oprot->writeBinary((*_iter229)); } xfer += oprot->writeListEnd(); } @@ -5224,17 +5274,17 @@ void swap(ColumnField &a, ColumnField &b) { swap(a.__isset, b.__isset); } -ColumnField::ColumnField(const ColumnField& other224) { - column_type = other224.column_type; - column_vectors = other224.column_vectors; - column_name = other224.column_name; - __isset = other224.__isset; +ColumnField::ColumnField(const ColumnField& other230) { + column_type = other230.column_type; + column_vectors = other230.column_vectors; + column_name = other230.column_name; + __isset = other230.__isset; } -ColumnField& ColumnField::operator=(const ColumnField& other225) { - column_type = other225.column_type; - column_vectors = other225.column_vectors; - column_name = other225.column_name; - __isset = other225.__isset; +ColumnField& ColumnField::operator=(const ColumnField& other231) { + column_type = other231.column_type; + column_vectors = other231.column_vectors; + column_name = other231.column_name; + __isset = other231.__isset; return *this; } void ColumnField::printTo(std::ostream& out) const { @@ -5308,9 +5358,9 @@ uint32_t ImportOption::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast226; - xfer += iprot->readI32(ecast226); - this->copy_file_type = static_cast(ecast226); + int32_t ecast232; + xfer += iprot->readI32(ecast232); + this->copy_file_type = static_cast(ecast232); this->__isset.copy_file_type = true; } else { xfer += iprot->skip(ftype); @@ -5358,17 +5408,17 @@ void swap(ImportOption &a, ImportOption &b) { swap(a.__isset, b.__isset); } -ImportOption::ImportOption(const ImportOption& other227) { - delimiter = other227.delimiter; - has_header = other227.has_header; - copy_file_type = other227.copy_file_type; - __isset = other227.__isset; +ImportOption::ImportOption(const ImportOption& other233) { + delimiter = other233.delimiter; + has_header = other233.has_header; + copy_file_type = other233.copy_file_type; + __isset = other233.__isset; } -ImportOption& ImportOption::operator=(const ImportOption& other228) { - delimiter = other228.delimiter; - has_header = other228.has_header; - copy_file_type = other228.copy_file_type; - __isset = other228.__isset; +ImportOption& ImportOption::operator=(const ImportOption& other234) { + delimiter = other234.delimiter; + has_header = other234.has_header; + copy_file_type = other234.copy_file_type; + __isset = other234.__isset; return *this; } void ImportOption::printTo(std::ostream& out) const { @@ -5454,9 +5504,9 @@ uint32_t ExportOption::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast229; - xfer += iprot->readI32(ecast229); - this->copy_file_type = static_cast(ecast229); + int32_t ecast235; + xfer += iprot->readI32(ecast235); + this->copy_file_type = static_cast(ecast235); this->__isset.copy_file_type = true; } else { xfer += iprot->skip(ftype); @@ -5543,23 +5593,23 @@ void swap(ExportOption &a, ExportOption &b) { swap(a.__isset, b.__isset); } -ExportOption::ExportOption(const ExportOption& other230) { - delimiter = other230.delimiter; - has_header = other230.has_header; - copy_file_type = other230.copy_file_type; - offset = other230.offset; - limit = other230.limit; - row_limit = other230.row_limit; - __isset = other230.__isset; -} -ExportOption& ExportOption::operator=(const ExportOption& other231) { - delimiter = other231.delimiter; - has_header = other231.has_header; - copy_file_type = other231.copy_file_type; - offset = other231.offset; - limit = other231.limit; - row_limit = other231.row_limit; - __isset = other231.__isset; +ExportOption::ExportOption(const ExportOption& other236) { + delimiter = other236.delimiter; + has_header = other236.has_header; + copy_file_type = other236.copy_file_type; + offset = other236.offset; + limit = other236.limit; + row_limit = other236.row_limit; + __isset = other236.__isset; +} +ExportOption& ExportOption::operator=(const ExportOption& other237) { + delimiter = other237.delimiter; + has_header = other237.has_header; + copy_file_type = other237.copy_file_type; + offset = other237.offset; + limit = other237.limit; + row_limit = other237.row_limit; + __isset = other237.__isset; return *this; } void ExportOption::printTo(std::ostream& out) const { @@ -5626,14 +5676,14 @@ uint32_t OptimizeOptions::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->opt_params.clear(); - uint32_t _size232; - ::apache::thrift::protocol::TType _etype235; - xfer += iprot->readListBegin(_etype235, _size232); - this->opt_params.resize(_size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) + uint32_t _size238; + ::apache::thrift::protocol::TType _etype241; + xfer += iprot->readListBegin(_etype241, _size238); + this->opt_params.resize(_size238); + uint32_t _i242; + for (_i242 = 0; _i242 < _size238; ++_i242) { - xfer += this->opt_params[_i236].read(iprot); + xfer += this->opt_params[_i242].read(iprot); } xfer += iprot->readListEnd(); } @@ -5666,10 +5716,10 @@ uint32_t OptimizeOptions::write(::apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeFieldBegin("opt_params", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->opt_params.size())); - std::vector ::const_iterator _iter237; - for (_iter237 = this->opt_params.begin(); _iter237 != this->opt_params.end(); ++_iter237) + std::vector ::const_iterator _iter243; + for (_iter243 = this->opt_params.begin(); _iter243 != this->opt_params.end(); ++_iter243) { - xfer += (*_iter237).write(oprot); + xfer += (*_iter243).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5687,15 +5737,15 @@ void swap(OptimizeOptions &a, OptimizeOptions &b) { swap(a.__isset, b.__isset); } -OptimizeOptions::OptimizeOptions(const OptimizeOptions& other238) { - index_name = other238.index_name; - opt_params = other238.opt_params; - __isset = other238.__isset; +OptimizeOptions::OptimizeOptions(const OptimizeOptions& other244) { + index_name = other244.index_name; + opt_params = other244.opt_params; + __isset = other244.__isset; } -OptimizeOptions& OptimizeOptions::operator=(const OptimizeOptions& other239) { - index_name = other239.index_name; - opt_params = other239.opt_params; - __isset = other239.__isset; +OptimizeOptions& OptimizeOptions::operator=(const OptimizeOptions& other245) { + index_name = other245.index_name; + opt_params = other245.opt_params; + __isset = other245.__isset; return *this; } void OptimizeOptions::printTo(std::ostream& out) const { @@ -5782,13 +5832,13 @@ void swap(ConnectRequest &a, ConnectRequest &b) { swap(a.__isset, b.__isset); } -ConnectRequest::ConnectRequest(const ConnectRequest& other240) noexcept { - client_version = other240.client_version; - __isset = other240.__isset; +ConnectRequest::ConnectRequest(const ConnectRequest& other246) noexcept { + client_version = other246.client_version; + __isset = other246.__isset; } -ConnectRequest& ConnectRequest::operator=(const ConnectRequest& other241) noexcept { - client_version = other241.client_version; - __isset = other241.__isset; +ConnectRequest& ConnectRequest::operator=(const ConnectRequest& other247) noexcept { + client_version = other247.client_version; + __isset = other247.__isset; return *this; } void ConnectRequest::printTo(std::ostream& out) const { @@ -5874,13 +5924,13 @@ void swap(CommonRequest &a, CommonRequest &b) { swap(a.__isset, b.__isset); } -CommonRequest::CommonRequest(const CommonRequest& other242) noexcept { - session_id = other242.session_id; - __isset = other242.__isset; +CommonRequest::CommonRequest(const CommonRequest& other248) noexcept { + session_id = other248.session_id; + __isset = other248.__isset; } -CommonRequest& CommonRequest::operator=(const CommonRequest& other243) noexcept { - session_id = other243.session_id; - __isset = other243.__isset; +CommonRequest& CommonRequest::operator=(const CommonRequest& other249) noexcept { + session_id = other249.session_id; + __isset = other249.__isset; return *this; } void CommonRequest::printTo(std::ostream& out) const { @@ -6000,17 +6050,17 @@ void swap(CommonResponse &a, CommonResponse &b) { swap(a.__isset, b.__isset); } -CommonResponse::CommonResponse(const CommonResponse& other244) { - error_code = other244.error_code; - error_msg = other244.error_msg; - session_id = other244.session_id; - __isset = other244.__isset; +CommonResponse::CommonResponse(const CommonResponse& other250) { + error_code = other250.error_code; + error_msg = other250.error_msg; + session_id = other250.session_id; + __isset = other250.__isset; } -CommonResponse& CommonResponse::operator=(const CommonResponse& other245) { - error_code = other245.error_code; - error_msg = other245.error_msg; - session_id = other245.session_id; - __isset = other245.__isset; +CommonResponse& CommonResponse::operator=(const CommonResponse& other251) { + error_code = other251.error_code; + error_msg = other251.error_msg; + session_id = other251.session_id; + __isset = other251.__isset; return *this; } void CommonResponse::printTo(std::ostream& out) const { @@ -6098,13 +6148,13 @@ void swap(ListDatabaseRequest &a, ListDatabaseRequest &b) { swap(a.__isset, b.__isset); } -ListDatabaseRequest::ListDatabaseRequest(const ListDatabaseRequest& other246) noexcept { - session_id = other246.session_id; - __isset = other246.__isset; +ListDatabaseRequest::ListDatabaseRequest(const ListDatabaseRequest& other252) noexcept { + session_id = other252.session_id; + __isset = other252.__isset; } -ListDatabaseRequest& ListDatabaseRequest::operator=(const ListDatabaseRequest& other247) noexcept { - session_id = other247.session_id; - __isset = other247.__isset; +ListDatabaseRequest& ListDatabaseRequest::operator=(const ListDatabaseRequest& other253) noexcept { + session_id = other253.session_id; + __isset = other253.__isset; return *this; } void ListDatabaseRequest::printTo(std::ostream& out) const { @@ -6178,14 +6228,14 @@ uint32_t ListDatabaseResponse::read(::apache::thrift::protocol::TProtocol* iprot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->db_names.clear(); - uint32_t _size248; - ::apache::thrift::protocol::TType _etype251; - xfer += iprot->readListBegin(_etype251, _size248); - this->db_names.resize(_size248); - uint32_t _i252; - for (_i252 = 0; _i252 < _size248; ++_i252) + uint32_t _size254; + ::apache::thrift::protocol::TType _etype257; + xfer += iprot->readListBegin(_etype257, _size254); + this->db_names.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) { - xfer += iprot->readString(this->db_names[_i252]); + xfer += iprot->readString(this->db_names[_i258]); } xfer += iprot->readListEnd(); } @@ -6222,10 +6272,10 @@ uint32_t ListDatabaseResponse::write(::apache::thrift::protocol::TProtocol* opro xfer += oprot->writeFieldBegin("db_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->db_names.size())); - std::vector ::const_iterator _iter253; - for (_iter253 = this->db_names.begin(); _iter253 != this->db_names.end(); ++_iter253) + std::vector ::const_iterator _iter259; + for (_iter259 = this->db_names.begin(); _iter259 != this->db_names.end(); ++_iter259) { - xfer += oprot->writeString((*_iter253)); + xfer += oprot->writeString((*_iter259)); } xfer += oprot->writeListEnd(); } @@ -6244,17 +6294,17 @@ void swap(ListDatabaseResponse &a, ListDatabaseResponse &b) { swap(a.__isset, b.__isset); } -ListDatabaseResponse::ListDatabaseResponse(const ListDatabaseResponse& other254) { - error_code = other254.error_code; - error_msg = other254.error_msg; - db_names = other254.db_names; - __isset = other254.__isset; +ListDatabaseResponse::ListDatabaseResponse(const ListDatabaseResponse& other260) { + error_code = other260.error_code; + error_msg = other260.error_msg; + db_names = other260.db_names; + __isset = other260.__isset; } -ListDatabaseResponse& ListDatabaseResponse::operator=(const ListDatabaseResponse& other255) { - error_code = other255.error_code; - error_msg = other255.error_msg; - db_names = other255.db_names; - __isset = other255.__isset; +ListDatabaseResponse& ListDatabaseResponse::operator=(const ListDatabaseResponse& other261) { + error_code = other261.error_code; + error_msg = other261.error_msg; + db_names = other261.db_names; + __isset = other261.__isset; return *this; } void ListDatabaseResponse::printTo(std::ostream& out) const { @@ -6359,15 +6409,15 @@ void swap(ListTableRequest &a, ListTableRequest &b) { swap(a.__isset, b.__isset); } -ListTableRequest::ListTableRequest(const ListTableRequest& other256) { - db_name = other256.db_name; - session_id = other256.session_id; - __isset = other256.__isset; +ListTableRequest::ListTableRequest(const ListTableRequest& other262) { + db_name = other262.db_name; + session_id = other262.session_id; + __isset = other262.__isset; } -ListTableRequest& ListTableRequest::operator=(const ListTableRequest& other257) { - db_name = other257.db_name; - session_id = other257.session_id; - __isset = other257.__isset; +ListTableRequest& ListTableRequest::operator=(const ListTableRequest& other263) { + db_name = other263.db_name; + session_id = other263.session_id; + __isset = other263.__isset; return *this; } void ListTableRequest::printTo(std::ostream& out) const { @@ -6442,14 +6492,14 @@ uint32_t ListTableResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->table_names.clear(); - uint32_t _size258; - ::apache::thrift::protocol::TType _etype261; - xfer += iprot->readListBegin(_etype261, _size258); - this->table_names.resize(_size258); - uint32_t _i262; - for (_i262 = 0; _i262 < _size258; ++_i262) + uint32_t _size264; + ::apache::thrift::protocol::TType _etype267; + xfer += iprot->readListBegin(_etype267, _size264); + this->table_names.resize(_size264); + uint32_t _i268; + for (_i268 = 0; _i268 < _size264; ++_i268) { - xfer += iprot->readString(this->table_names[_i262]); + xfer += iprot->readString(this->table_names[_i268]); } xfer += iprot->readListEnd(); } @@ -6486,10 +6536,10 @@ uint32_t ListTableResponse::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("table_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->table_names.size())); - std::vector ::const_iterator _iter263; - for (_iter263 = this->table_names.begin(); _iter263 != this->table_names.end(); ++_iter263) + std::vector ::const_iterator _iter269; + for (_iter269 = this->table_names.begin(); _iter269 != this->table_names.end(); ++_iter269) { - xfer += oprot->writeString((*_iter263)); + xfer += oprot->writeString((*_iter269)); } xfer += oprot->writeListEnd(); } @@ -6508,17 +6558,17 @@ void swap(ListTableResponse &a, ListTableResponse &b) { swap(a.__isset, b.__isset); } -ListTableResponse::ListTableResponse(const ListTableResponse& other264) { - error_code = other264.error_code; - error_msg = other264.error_msg; - table_names = other264.table_names; - __isset = other264.__isset; +ListTableResponse::ListTableResponse(const ListTableResponse& other270) { + error_code = other270.error_code; + error_msg = other270.error_msg; + table_names = other270.table_names; + __isset = other270.__isset; } -ListTableResponse& ListTableResponse::operator=(const ListTableResponse& other265) { - error_code = other265.error_code; - error_msg = other265.error_msg; - table_names = other265.table_names; - __isset = other265.__isset; +ListTableResponse& ListTableResponse::operator=(const ListTableResponse& other271) { + error_code = other271.error_code; + error_msg = other271.error_msg; + table_names = other271.table_names; + __isset = other271.__isset; return *this; } void ListTableResponse::printTo(std::ostream& out) const { @@ -6640,17 +6690,17 @@ void swap(ListIndexRequest &a, ListIndexRequest &b) { swap(a.__isset, b.__isset); } -ListIndexRequest::ListIndexRequest(const ListIndexRequest& other266) { - db_name = other266.db_name; - table_name = other266.table_name; - session_id = other266.session_id; - __isset = other266.__isset; +ListIndexRequest::ListIndexRequest(const ListIndexRequest& other272) { + db_name = other272.db_name; + table_name = other272.table_name; + session_id = other272.session_id; + __isset = other272.__isset; } -ListIndexRequest& ListIndexRequest::operator=(const ListIndexRequest& other267) { - db_name = other267.db_name; - table_name = other267.table_name; - session_id = other267.session_id; - __isset = other267.__isset; +ListIndexRequest& ListIndexRequest::operator=(const ListIndexRequest& other273) { + db_name = other273.db_name; + table_name = other273.table_name; + session_id = other273.session_id; + __isset = other273.__isset; return *this; } void ListIndexRequest::printTo(std::ostream& out) const { @@ -6726,14 +6776,14 @@ uint32_t ListIndexResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->index_names.clear(); - uint32_t _size268; - ::apache::thrift::protocol::TType _etype271; - xfer += iprot->readListBegin(_etype271, _size268); - this->index_names.resize(_size268); - uint32_t _i272; - for (_i272 = 0; _i272 < _size268; ++_i272) + uint32_t _size274; + ::apache::thrift::protocol::TType _etype277; + xfer += iprot->readListBegin(_etype277, _size274); + this->index_names.resize(_size274); + uint32_t _i278; + for (_i278 = 0; _i278 < _size274; ++_i278) { - xfer += iprot->readString(this->index_names[_i272]); + xfer += iprot->readString(this->index_names[_i278]); } xfer += iprot->readListEnd(); } @@ -6770,10 +6820,10 @@ uint32_t ListIndexResponse::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("index_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->index_names.size())); - std::vector ::const_iterator _iter273; - for (_iter273 = this->index_names.begin(); _iter273 != this->index_names.end(); ++_iter273) + std::vector ::const_iterator _iter279; + for (_iter279 = this->index_names.begin(); _iter279 != this->index_names.end(); ++_iter279) { - xfer += oprot->writeString((*_iter273)); + xfer += oprot->writeString((*_iter279)); } xfer += oprot->writeListEnd(); } @@ -6792,17 +6842,17 @@ void swap(ListIndexResponse &a, ListIndexResponse &b) { swap(a.__isset, b.__isset); } -ListIndexResponse::ListIndexResponse(const ListIndexResponse& other274) { - error_code = other274.error_code; - error_msg = other274.error_msg; - index_names = other274.index_names; - __isset = other274.__isset; +ListIndexResponse::ListIndexResponse(const ListIndexResponse& other280) { + error_code = other280.error_code; + error_msg = other280.error_msg; + index_names = other280.index_names; + __isset = other280.__isset; } -ListIndexResponse& ListIndexResponse::operator=(const ListIndexResponse& other275) { - error_code = other275.error_code; - error_msg = other275.error_msg; - index_names = other275.index_names; - __isset = other275.__isset; +ListIndexResponse& ListIndexResponse::operator=(const ListIndexResponse& other281) { + error_code = other281.error_code; + error_msg = other281.error_msg; + index_names = other281.index_names; + __isset = other281.__isset; return *this; } void ListIndexResponse::printTo(std::ostream& out) const { @@ -6907,15 +6957,15 @@ void swap(ShowDatabaseRequest &a, ShowDatabaseRequest &b) { swap(a.__isset, b.__isset); } -ShowDatabaseRequest::ShowDatabaseRequest(const ShowDatabaseRequest& other276) { - db_name = other276.db_name; - session_id = other276.session_id; - __isset = other276.__isset; +ShowDatabaseRequest::ShowDatabaseRequest(const ShowDatabaseRequest& other282) { + db_name = other282.db_name; + session_id = other282.session_id; + __isset = other282.__isset; } -ShowDatabaseRequest& ShowDatabaseRequest::operator=(const ShowDatabaseRequest& other277) { - db_name = other277.db_name; - session_id = other277.session_id; - __isset = other277.__isset; +ShowDatabaseRequest& ShowDatabaseRequest::operator=(const ShowDatabaseRequest& other283) { + db_name = other283.db_name; + session_id = other283.session_id; + __isset = other283.__isset; return *this; } void ShowDatabaseRequest::printTo(std::ostream& out) const { @@ -7070,21 +7120,21 @@ void swap(ShowDatabaseResponse &a, ShowDatabaseResponse &b) { swap(a.__isset, b.__isset); } -ShowDatabaseResponse::ShowDatabaseResponse(const ShowDatabaseResponse& other278) { - error_code = other278.error_code; - error_msg = other278.error_msg; - database_name = other278.database_name; - store_dir = other278.store_dir; - table_count = other278.table_count; - __isset = other278.__isset; -} -ShowDatabaseResponse& ShowDatabaseResponse::operator=(const ShowDatabaseResponse& other279) { - error_code = other279.error_code; - error_msg = other279.error_msg; - database_name = other279.database_name; - store_dir = other279.store_dir; - table_count = other279.table_count; - __isset = other279.__isset; +ShowDatabaseResponse::ShowDatabaseResponse(const ShowDatabaseResponse& other284) { + error_code = other284.error_code; + error_msg = other284.error_msg; + database_name = other284.database_name; + store_dir = other284.store_dir; + table_count = other284.table_count; + __isset = other284.__isset; +} +ShowDatabaseResponse& ShowDatabaseResponse::operator=(const ShowDatabaseResponse& other285) { + error_code = other285.error_code; + error_msg = other285.error_msg; + database_name = other285.database_name; + store_dir = other285.store_dir; + table_count = other285.table_count; + __isset = other285.__isset; return *this; } void ShowDatabaseResponse::printTo(std::ostream& out) const { @@ -7208,17 +7258,17 @@ void swap(ShowTableRequest &a, ShowTableRequest &b) { swap(a.__isset, b.__isset); } -ShowTableRequest::ShowTableRequest(const ShowTableRequest& other280) { - db_name = other280.db_name; - table_name = other280.table_name; - session_id = other280.session_id; - __isset = other280.__isset; +ShowTableRequest::ShowTableRequest(const ShowTableRequest& other286) { + db_name = other286.db_name; + table_name = other286.table_name; + session_id = other286.session_id; + __isset = other286.__isset; } -ShowTableRequest& ShowTableRequest::operator=(const ShowTableRequest& other281) { - db_name = other281.db_name; - table_name = other281.table_name; - session_id = other281.session_id; - __isset = other281.__isset; +ShowTableRequest& ShowTableRequest::operator=(const ShowTableRequest& other287) { + db_name = other287.db_name; + table_name = other287.table_name; + session_id = other287.session_id; + __isset = other287.__isset; return *this; } void ShowTableRequest::printTo(std::ostream& out) const { @@ -7425,27 +7475,27 @@ void swap(ShowTableResponse &a, ShowTableResponse &b) { swap(a.__isset, b.__isset); } -ShowTableResponse::ShowTableResponse(const ShowTableResponse& other282) { - error_code = other282.error_code; - error_msg = other282.error_msg; - database_name = other282.database_name; - table_name = other282.table_name; - store_dir = other282.store_dir; - column_count = other282.column_count; - segment_count = other282.segment_count; - row_count = other282.row_count; - __isset = other282.__isset; -} -ShowTableResponse& ShowTableResponse::operator=(const ShowTableResponse& other283) { - error_code = other283.error_code; - error_msg = other283.error_msg; - database_name = other283.database_name; - table_name = other283.table_name; - store_dir = other283.store_dir; - column_count = other283.column_count; - segment_count = other283.segment_count; - row_count = other283.row_count; - __isset = other283.__isset; +ShowTableResponse::ShowTableResponse(const ShowTableResponse& other288) { + error_code = other288.error_code; + error_msg = other288.error_msg; + database_name = other288.database_name; + table_name = other288.table_name; + store_dir = other288.store_dir; + column_count = other288.column_count; + segment_count = other288.segment_count; + row_count = other288.row_count; + __isset = other288.__isset; +} +ShowTableResponse& ShowTableResponse::operator=(const ShowTableResponse& other289) { + error_code = other289.error_code; + error_msg = other289.error_msg; + database_name = other289.database_name; + table_name = other289.table_name; + store_dir = other289.store_dir; + column_count = other289.column_count; + segment_count = other289.segment_count; + row_count = other289.row_count; + __isset = other289.__isset; return *this; } void ShowTableResponse::printTo(std::ostream& out) const { @@ -7572,17 +7622,17 @@ void swap(ShowColumnsRequest &a, ShowColumnsRequest &b) { swap(a.__isset, b.__isset); } -ShowColumnsRequest::ShowColumnsRequest(const ShowColumnsRequest& other284) { - db_name = other284.db_name; - table_name = other284.table_name; - session_id = other284.session_id; - __isset = other284.__isset; +ShowColumnsRequest::ShowColumnsRequest(const ShowColumnsRequest& other290) { + db_name = other290.db_name; + table_name = other290.table_name; + session_id = other290.session_id; + __isset = other290.__isset; } -ShowColumnsRequest& ShowColumnsRequest::operator=(const ShowColumnsRequest& other285) { - db_name = other285.db_name; - table_name = other285.table_name; - session_id = other285.session_id; - __isset = other285.__isset; +ShowColumnsRequest& ShowColumnsRequest::operator=(const ShowColumnsRequest& other291) { + db_name = other291.db_name; + table_name = other291.table_name; + session_id = other291.session_id; + __isset = other291.__isset; return *this; } void ShowColumnsRequest::printTo(std::ostream& out) const { @@ -7704,17 +7754,17 @@ void swap(GetTableRequest &a, GetTableRequest &b) { swap(a.__isset, b.__isset); } -GetTableRequest::GetTableRequest(const GetTableRequest& other286) { - db_name = other286.db_name; - table_name = other286.table_name; - session_id = other286.session_id; - __isset = other286.__isset; +GetTableRequest::GetTableRequest(const GetTableRequest& other292) { + db_name = other292.db_name; + table_name = other292.table_name; + session_id = other292.session_id; + __isset = other292.__isset; } -GetTableRequest& GetTableRequest::operator=(const GetTableRequest& other287) { - db_name = other287.db_name; - table_name = other287.table_name; - session_id = other287.session_id; - __isset = other287.__isset; +GetTableRequest& GetTableRequest::operator=(const GetTableRequest& other293) { + db_name = other293.db_name; + table_name = other293.table_name; + session_id = other293.session_id; + __isset = other293.__isset; return *this; } void GetTableRequest::printTo(std::ostream& out) const { @@ -7780,9 +7830,9 @@ uint32_t IndexInfo::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast288; - xfer += iprot->readI32(ecast288); - this->index_type = static_cast(ecast288); + int32_t ecast294; + xfer += iprot->readI32(ecast294); + this->index_type = static_cast(ecast294); this->__isset.index_type = true; } else { xfer += iprot->skip(ftype); @@ -7792,14 +7842,14 @@ uint32_t IndexInfo::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->index_param_list.clear(); - uint32_t _size289; - ::apache::thrift::protocol::TType _etype292; - xfer += iprot->readListBegin(_etype292, _size289); - this->index_param_list.resize(_size289); - uint32_t _i293; - for (_i293 = 0; _i293 < _size289; ++_i293) + uint32_t _size295; + ::apache::thrift::protocol::TType _etype298; + xfer += iprot->readListBegin(_etype298, _size295); + this->index_param_list.resize(_size295); + uint32_t _i299; + for (_i299 = 0; _i299 < _size295; ++_i299) { - xfer += this->index_param_list[_i293].read(iprot); + xfer += this->index_param_list[_i299].read(iprot); } xfer += iprot->readListEnd(); } @@ -7836,10 +7886,10 @@ uint32_t IndexInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("index_param_list", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->index_param_list.size())); - std::vector ::const_iterator _iter294; - for (_iter294 = this->index_param_list.begin(); _iter294 != this->index_param_list.end(); ++_iter294) + std::vector ::const_iterator _iter300; + for (_iter300 = this->index_param_list.begin(); _iter300 != this->index_param_list.end(); ++_iter300) { - xfer += (*_iter294).write(oprot); + xfer += (*_iter300).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7858,17 +7908,17 @@ void swap(IndexInfo &a, IndexInfo &b) { swap(a.__isset, b.__isset); } -IndexInfo::IndexInfo(const IndexInfo& other295) { - column_name = other295.column_name; - index_type = other295.index_type; - index_param_list = other295.index_param_list; - __isset = other295.__isset; +IndexInfo::IndexInfo(const IndexInfo& other301) { + column_name = other301.column_name; + index_type = other301.index_type; + index_param_list = other301.index_param_list; + __isset = other301.__isset; } -IndexInfo& IndexInfo::operator=(const IndexInfo& other296) { - column_name = other296.column_name; - index_type = other296.index_type; - index_param_list = other296.index_param_list; - __isset = other296.__isset; +IndexInfo& IndexInfo::operator=(const IndexInfo& other302) { + column_name = other302.column_name; + index_type = other302.index_type; + index_param_list = other302.index_param_list; + __isset = other302.__isset; return *this; } void IndexInfo::printTo(std::ostream& out) const { @@ -7964,14 +8014,14 @@ uint32_t CreateIndexRequest::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->index_info_list.clear(); - uint32_t _size297; - ::apache::thrift::protocol::TType _etype300; - xfer += iprot->readListBegin(_etype300, _size297); - this->index_info_list.resize(_size297); - uint32_t _i301; - for (_i301 = 0; _i301 < _size297; ++_i301) + uint32_t _size303; + ::apache::thrift::protocol::TType _etype306; + xfer += iprot->readListBegin(_etype306, _size303); + this->index_info_list.resize(_size303); + uint32_t _i307; + for (_i307 = 0; _i307 < _size303; ++_i307) { - xfer += this->index_info_list[_i301].read(iprot); + xfer += this->index_info_list[_i307].read(iprot); } xfer += iprot->readListEnd(); } @@ -8028,10 +8078,10 @@ uint32_t CreateIndexRequest::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("index_info_list", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->index_info_list.size())); - std::vector ::const_iterator _iter302; - for (_iter302 = this->index_info_list.begin(); _iter302 != this->index_info_list.end(); ++_iter302) + std::vector ::const_iterator _iter308; + for (_iter308 = this->index_info_list.begin(); _iter308 != this->index_info_list.end(); ++_iter308) { - xfer += (*_iter302).write(oprot); + xfer += (*_iter308).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8061,23 +8111,23 @@ void swap(CreateIndexRequest &a, CreateIndexRequest &b) { swap(a.__isset, b.__isset); } -CreateIndexRequest::CreateIndexRequest(const CreateIndexRequest& other303) { - db_name = other303.db_name; - table_name = other303.table_name; - index_name = other303.index_name; - index_info_list = other303.index_info_list; - session_id = other303.session_id; - create_option = other303.create_option; - __isset = other303.__isset; -} -CreateIndexRequest& CreateIndexRequest::operator=(const CreateIndexRequest& other304) { - db_name = other304.db_name; - table_name = other304.table_name; - index_name = other304.index_name; - index_info_list = other304.index_info_list; - session_id = other304.session_id; - create_option = other304.create_option; - __isset = other304.__isset; +CreateIndexRequest::CreateIndexRequest(const CreateIndexRequest& other309) { + db_name = other309.db_name; + table_name = other309.table_name; + index_name = other309.index_name; + index_info_list = other309.index_info_list; + session_id = other309.session_id; + create_option = other309.create_option; + __isset = other309.__isset; +} +CreateIndexRequest& CreateIndexRequest::operator=(const CreateIndexRequest& other310) { + db_name = other310.db_name; + table_name = other310.table_name; + index_name = other310.index_name; + index_info_list = other310.index_info_list; + session_id = other310.session_id; + create_option = other310.create_option; + __isset = other310.__isset; return *this; } void CreateIndexRequest::printTo(std::ostream& out) const { @@ -8236,21 +8286,21 @@ void swap(DropIndexRequest &a, DropIndexRequest &b) { swap(a.__isset, b.__isset); } -DropIndexRequest::DropIndexRequest(const DropIndexRequest& other305) { - db_name = other305.db_name; - table_name = other305.table_name; - index_name = other305.index_name; - session_id = other305.session_id; - drop_option = other305.drop_option; - __isset = other305.__isset; -} -DropIndexRequest& DropIndexRequest::operator=(const DropIndexRequest& other306) { - db_name = other306.db_name; - table_name = other306.table_name; - index_name = other306.index_name; - session_id = other306.session_id; - drop_option = other306.drop_option; - __isset = other306.__isset; +DropIndexRequest::DropIndexRequest(const DropIndexRequest& other311) { + db_name = other311.db_name; + table_name = other311.table_name; + index_name = other311.index_name; + session_id = other311.session_id; + drop_option = other311.drop_option; + __isset = other311.__isset; +} +DropIndexRequest& DropIndexRequest::operator=(const DropIndexRequest& other312) { + db_name = other312.db_name; + table_name = other312.table_name; + index_name = other312.index_name; + session_id = other312.session_id; + drop_option = other312.drop_option; + __isset = other312.__isset; return *this; } void DropIndexRequest::printTo(std::ostream& out) const { @@ -8391,19 +8441,19 @@ void swap(ShowIndexRequest &a, ShowIndexRequest &b) { swap(a.__isset, b.__isset); } -ShowIndexRequest::ShowIndexRequest(const ShowIndexRequest& other307) { - db_name = other307.db_name; - table_name = other307.table_name; - index_name = other307.index_name; - session_id = other307.session_id; - __isset = other307.__isset; +ShowIndexRequest::ShowIndexRequest(const ShowIndexRequest& other313) { + db_name = other313.db_name; + table_name = other313.table_name; + index_name = other313.index_name; + session_id = other313.session_id; + __isset = other313.__isset; } -ShowIndexRequest& ShowIndexRequest::operator=(const ShowIndexRequest& other308) { - db_name = other308.db_name; - table_name = other308.table_name; - index_name = other308.index_name; - session_id = other308.session_id; - __isset = other308.__isset; +ShowIndexRequest& ShowIndexRequest::operator=(const ShowIndexRequest& other314) { + db_name = other314.db_name; + table_name = other314.table_name; + index_name = other314.index_name; + session_id = other314.session_id; + __isset = other314.__isset; return *this; } void ShowIndexRequest::printTo(std::ostream& out) const { @@ -8679,35 +8729,35 @@ void swap(ShowIndexResponse &a, ShowIndexResponse &b) { swap(a.__isset, b.__isset); } -ShowIndexResponse::ShowIndexResponse(const ShowIndexResponse& other309) { - error_code = other309.error_code; - error_msg = other309.error_msg; - db_name = other309.db_name; - table_name = other309.table_name; - index_name = other309.index_name; - index_type = other309.index_type; - index_column_names = other309.index_column_names; - index_column_ids = other309.index_column_ids; - other_parameters = other309.other_parameters; - store_dir = other309.store_dir; - store_size = other309.store_size; - segment_index_count = other309.segment_index_count; - __isset = other309.__isset; +ShowIndexResponse::ShowIndexResponse(const ShowIndexResponse& other315) { + error_code = other315.error_code; + error_msg = other315.error_msg; + db_name = other315.db_name; + table_name = other315.table_name; + index_name = other315.index_name; + index_type = other315.index_type; + index_column_names = other315.index_column_names; + index_column_ids = other315.index_column_ids; + other_parameters = other315.other_parameters; + store_dir = other315.store_dir; + store_size = other315.store_size; + segment_index_count = other315.segment_index_count; + __isset = other315.__isset; } -ShowIndexResponse& ShowIndexResponse::operator=(const ShowIndexResponse& other310) { - error_code = other310.error_code; - error_msg = other310.error_msg; - db_name = other310.db_name; - table_name = other310.table_name; - index_name = other310.index_name; - index_type = other310.index_type; - index_column_names = other310.index_column_names; - index_column_ids = other310.index_column_ids; - other_parameters = other310.other_parameters; - store_dir = other310.store_dir; - store_size = other310.store_size; - segment_index_count = other310.segment_index_count; - __isset = other310.__isset; +ShowIndexResponse& ShowIndexResponse::operator=(const ShowIndexResponse& other316) { + error_code = other316.error_code; + error_msg = other316.error_msg; + db_name = other316.db_name; + table_name = other316.table_name; + index_name = other316.index_name; + index_type = other316.index_type; + index_column_names = other316.index_column_names; + index_column_ids = other316.index_column_ids; + other_parameters = other316.other_parameters; + store_dir = other316.store_dir; + store_size = other316.store_size; + segment_index_count = other316.segment_index_count; + __isset = other316.__isset; return *this; } void ShowIndexResponse::printTo(std::ostream& out) const { @@ -8855,19 +8905,19 @@ void swap(OptimizeRequest &a, OptimizeRequest &b) { swap(a.__isset, b.__isset); } -OptimizeRequest::OptimizeRequest(const OptimizeRequest& other311) { - db_name = other311.db_name; - table_name = other311.table_name; - optimize_options = other311.optimize_options; - session_id = other311.session_id; - __isset = other311.__isset; +OptimizeRequest::OptimizeRequest(const OptimizeRequest& other317) { + db_name = other317.db_name; + table_name = other317.table_name; + optimize_options = other317.optimize_options; + session_id = other317.session_id; + __isset = other317.__isset; } -OptimizeRequest& OptimizeRequest::operator=(const OptimizeRequest& other312) { - db_name = other312.db_name; - table_name = other312.table_name; - optimize_options = other312.optimize_options; - session_id = other312.session_id; - __isset = other312.__isset; +OptimizeRequest& OptimizeRequest::operator=(const OptimizeRequest& other318) { + db_name = other318.db_name; + table_name = other318.table_name; + optimize_options = other318.optimize_options; + session_id = other318.session_id; + __isset = other318.__isset; return *this; } void OptimizeRequest::printTo(std::ostream& out) const { @@ -8973,15 +9023,15 @@ void swap(GetDatabaseRequest &a, GetDatabaseRequest &b) { swap(a.__isset, b.__isset); } -GetDatabaseRequest::GetDatabaseRequest(const GetDatabaseRequest& other313) { - db_name = other313.db_name; - session_id = other313.session_id; - __isset = other313.__isset; +GetDatabaseRequest::GetDatabaseRequest(const GetDatabaseRequest& other319) { + db_name = other319.db_name; + session_id = other319.session_id; + __isset = other319.__isset; } -GetDatabaseRequest& GetDatabaseRequest::operator=(const GetDatabaseRequest& other314) { - db_name = other314.db_name; - session_id = other314.session_id; - __isset = other314.__isset; +GetDatabaseRequest& GetDatabaseRequest::operator=(const GetDatabaseRequest& other320) { + db_name = other320.db_name; + session_id = other320.session_id; + __isset = other320.__isset; return *this; } void GetDatabaseRequest::printTo(std::ostream& out) const { @@ -9102,17 +9152,17 @@ void swap(CreateDatabaseRequest &a, CreateDatabaseRequest &b) { swap(a.__isset, b.__isset); } -CreateDatabaseRequest::CreateDatabaseRequest(const CreateDatabaseRequest& other315) { - db_name = other315.db_name; - session_id = other315.session_id; - create_option = other315.create_option; - __isset = other315.__isset; +CreateDatabaseRequest::CreateDatabaseRequest(const CreateDatabaseRequest& other321) { + db_name = other321.db_name; + session_id = other321.session_id; + create_option = other321.create_option; + __isset = other321.__isset; } -CreateDatabaseRequest& CreateDatabaseRequest::operator=(const CreateDatabaseRequest& other316) { - db_name = other316.db_name; - session_id = other316.session_id; - create_option = other316.create_option; - __isset = other316.__isset; +CreateDatabaseRequest& CreateDatabaseRequest::operator=(const CreateDatabaseRequest& other322) { + db_name = other322.db_name; + session_id = other322.session_id; + create_option = other322.create_option; + __isset = other322.__isset; return *this; } void CreateDatabaseRequest::printTo(std::ostream& out) const { @@ -9234,17 +9284,17 @@ void swap(DropDatabaseRequest &a, DropDatabaseRequest &b) { swap(a.__isset, b.__isset); } -DropDatabaseRequest::DropDatabaseRequest(const DropDatabaseRequest& other317) { - db_name = other317.db_name; - session_id = other317.session_id; - drop_option = other317.drop_option; - __isset = other317.__isset; +DropDatabaseRequest::DropDatabaseRequest(const DropDatabaseRequest& other323) { + db_name = other323.db_name; + session_id = other323.session_id; + drop_option = other323.drop_option; + __isset = other323.__isset; } -DropDatabaseRequest& DropDatabaseRequest::operator=(const DropDatabaseRequest& other318) { - db_name = other318.db_name; - session_id = other318.session_id; - drop_option = other318.drop_option; - __isset = other318.__isset; +DropDatabaseRequest& DropDatabaseRequest::operator=(const DropDatabaseRequest& other324) { + db_name = other324.db_name; + session_id = other324.session_id; + drop_option = other324.drop_option; + __isset = other324.__isset; return *this; } void DropDatabaseRequest::printTo(std::ostream& out) const { @@ -9328,14 +9378,14 @@ uint32_t CreateTableRequest::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_defs.clear(); - uint32_t _size319; - ::apache::thrift::protocol::TType _etype322; - xfer += iprot->readListBegin(_etype322, _size319); - this->column_defs.resize(_size319); - uint32_t _i323; - for (_i323 = 0; _i323 < _size319; ++_i323) + uint32_t _size325; + ::apache::thrift::protocol::TType _etype328; + xfer += iprot->readListBegin(_etype328, _size325); + this->column_defs.resize(_size325); + uint32_t _i329; + for (_i329 = 0; _i329 < _size325; ++_i329) { - xfer += this->column_defs[_i323].read(iprot); + xfer += this->column_defs[_i329].read(iprot); } xfer += iprot->readListEnd(); } @@ -9388,10 +9438,10 @@ uint32_t CreateTableRequest::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("column_defs", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->column_defs.size())); - std::vector ::const_iterator _iter324; - for (_iter324 = this->column_defs.begin(); _iter324 != this->column_defs.end(); ++_iter324) + std::vector ::const_iterator _iter330; + for (_iter330 = this->column_defs.begin(); _iter330 != this->column_defs.end(); ++_iter330) { - xfer += (*_iter324).write(oprot); + xfer += (*_iter330).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9420,21 +9470,21 @@ void swap(CreateTableRequest &a, CreateTableRequest &b) { swap(a.__isset, b.__isset); } -CreateTableRequest::CreateTableRequest(const CreateTableRequest& other325) { - db_name = other325.db_name; - table_name = other325.table_name; - column_defs = other325.column_defs; - session_id = other325.session_id; - create_option = other325.create_option; - __isset = other325.__isset; -} -CreateTableRequest& CreateTableRequest::operator=(const CreateTableRequest& other326) { - db_name = other326.db_name; - table_name = other326.table_name; - column_defs = other326.column_defs; - session_id = other326.session_id; - create_option = other326.create_option; - __isset = other326.__isset; +CreateTableRequest::CreateTableRequest(const CreateTableRequest& other331) { + db_name = other331.db_name; + table_name = other331.table_name; + column_defs = other331.column_defs; + session_id = other331.session_id; + create_option = other331.create_option; + __isset = other331.__isset; +} +CreateTableRequest& CreateTableRequest::operator=(const CreateTableRequest& other332) { + db_name = other332.db_name; + table_name = other332.table_name; + column_defs = other332.column_defs; + session_id = other332.session_id; + create_option = other332.create_option; + __isset = other332.__isset; return *this; } void CreateTableRequest::printTo(std::ostream& out) const { @@ -9575,19 +9625,19 @@ void swap(DropTableRequest &a, DropTableRequest &b) { swap(a.__isset, b.__isset); } -DropTableRequest::DropTableRequest(const DropTableRequest& other327) { - db_name = other327.db_name; - table_name = other327.table_name; - session_id = other327.session_id; - drop_option = other327.drop_option; - __isset = other327.__isset; +DropTableRequest::DropTableRequest(const DropTableRequest& other333) { + db_name = other333.db_name; + table_name = other333.table_name; + session_id = other333.session_id; + drop_option = other333.drop_option; + __isset = other333.__isset; } -DropTableRequest& DropTableRequest::operator=(const DropTableRequest& other328) { - db_name = other328.db_name; - table_name = other328.table_name; - session_id = other328.session_id; - drop_option = other328.drop_option; - __isset = other328.__isset; +DropTableRequest& DropTableRequest::operator=(const DropTableRequest& other334) { + db_name = other334.db_name; + table_name = other334.table_name; + session_id = other334.session_id; + drop_option = other334.drop_option; + __isset = other334.__isset; return *this; } void DropTableRequest::printTo(std::ostream& out) const { @@ -9672,14 +9722,14 @@ uint32_t InsertRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_names.clear(); - uint32_t _size329; - ::apache::thrift::protocol::TType _etype332; - xfer += iprot->readListBegin(_etype332, _size329); - this->column_names.resize(_size329); - uint32_t _i333; - for (_i333 = 0; _i333 < _size329; ++_i333) + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + xfer += iprot->readListBegin(_etype338, _size335); + this->column_names.resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) { - xfer += iprot->readString(this->column_names[_i333]); + xfer += iprot->readString(this->column_names[_i339]); } xfer += iprot->readListEnd(); } @@ -9692,14 +9742,14 @@ uint32_t InsertRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fields.clear(); - uint32_t _size334; - ::apache::thrift::protocol::TType _etype337; - xfer += iprot->readListBegin(_etype337, _size334); - this->fields.resize(_size334); - uint32_t _i338; - for (_i338 = 0; _i338 < _size334; ++_i338) + uint32_t _size340; + ::apache::thrift::protocol::TType _etype343; + xfer += iprot->readListBegin(_etype343, _size340); + this->fields.resize(_size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) { - xfer += this->fields[_i338].read(iprot); + xfer += this->fields[_i344].read(iprot); } xfer += iprot->readListEnd(); } @@ -9744,10 +9794,10 @@ uint32_t InsertRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("column_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->column_names.size())); - std::vector ::const_iterator _iter339; - for (_iter339 = this->column_names.begin(); _iter339 != this->column_names.end(); ++_iter339) + std::vector ::const_iterator _iter345; + for (_iter345 = this->column_names.begin(); _iter345 != this->column_names.end(); ++_iter345) { - xfer += oprot->writeString((*_iter339)); + xfer += oprot->writeString((*_iter345)); } xfer += oprot->writeListEnd(); } @@ -9756,10 +9806,10 @@ uint32_t InsertRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fields.size())); - std::vector ::const_iterator _iter340; - for (_iter340 = this->fields.begin(); _iter340 != this->fields.end(); ++_iter340) + std::vector ::const_iterator _iter346; + for (_iter346 = this->fields.begin(); _iter346 != this->fields.end(); ++_iter346) { - xfer += (*_iter340).write(oprot); + xfer += (*_iter346).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9784,21 +9834,21 @@ void swap(InsertRequest &a, InsertRequest &b) { swap(a.__isset, b.__isset); } -InsertRequest::InsertRequest(const InsertRequest& other341) { - db_name = other341.db_name; - table_name = other341.table_name; - column_names = other341.column_names; - fields = other341.fields; - session_id = other341.session_id; - __isset = other341.__isset; -} -InsertRequest& InsertRequest::operator=(const InsertRequest& other342) { - db_name = other342.db_name; - table_name = other342.table_name; - column_names = other342.column_names; - fields = other342.fields; - session_id = other342.session_id; - __isset = other342.__isset; +InsertRequest::InsertRequest(const InsertRequest& other347) { + db_name = other347.db_name; + table_name = other347.table_name; + column_names = other347.column_names; + fields = other347.fields; + session_id = other347.session_id; + __isset = other347.__isset; +} +InsertRequest& InsertRequest::operator=(const InsertRequest& other348) { + db_name = other348.db_name; + table_name = other348.table_name; + column_names = other348.column_names; + fields = other348.fields; + session_id = other348.session_id; + __isset = other348.__isset; return *this; } void InsertRequest::printTo(std::ostream& out) const { @@ -9956,21 +10006,21 @@ void swap(ImportRequest &a, ImportRequest &b) { swap(a.__isset, b.__isset); } -ImportRequest::ImportRequest(const ImportRequest& other343) { - db_name = other343.db_name; - table_name = other343.table_name; - file_name = other343.file_name; - import_option = other343.import_option; - session_id = other343.session_id; - __isset = other343.__isset; -} -ImportRequest& ImportRequest::operator=(const ImportRequest& other344) { - db_name = other344.db_name; - table_name = other344.table_name; - file_name = other344.file_name; - import_option = other344.import_option; - session_id = other344.session_id; - __isset = other344.__isset; +ImportRequest::ImportRequest(const ImportRequest& other349) { + db_name = other349.db_name; + table_name = other349.table_name; + file_name = other349.file_name; + import_option = other349.import_option; + session_id = other349.session_id; + __isset = other349.__isset; +} +ImportRequest& ImportRequest::operator=(const ImportRequest& other350) { + db_name = other350.db_name; + table_name = other350.table_name; + file_name = other350.file_name; + import_option = other350.import_option; + session_id = other350.session_id; + __isset = other350.__isset; return *this; } void ImportRequest::printTo(std::ostream& out) const { @@ -10060,14 +10110,14 @@ uint32_t ExportRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->columns.clear(); - uint32_t _size345; - ::apache::thrift::protocol::TType _etype348; - xfer += iprot->readListBegin(_etype348, _size345); - this->columns.resize(_size345); - uint32_t _i349; - for (_i349 = 0; _i349 < _size345; ++_i349) + uint32_t _size351; + ::apache::thrift::protocol::TType _etype354; + xfer += iprot->readListBegin(_etype354, _size351); + this->columns.resize(_size351); + uint32_t _i355; + for (_i355 = 0; _i355 < _size351; ++_i355) { - xfer += iprot->readString(this->columns[_i349]); + xfer += iprot->readString(this->columns[_i355]); } xfer += iprot->readListEnd(); } @@ -10128,10 +10178,10 @@ uint32_t ExportRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); - std::vector ::const_iterator _iter350; - for (_iter350 = this->columns.begin(); _iter350 != this->columns.end(); ++_iter350) + std::vector ::const_iterator _iter356; + for (_iter356 = this->columns.begin(); _iter356 != this->columns.end(); ++_iter356) { - xfer += oprot->writeString((*_iter350)); + xfer += oprot->writeString((*_iter356)); } xfer += oprot->writeListEnd(); } @@ -10165,23 +10215,23 @@ void swap(ExportRequest &a, ExportRequest &b) { swap(a.__isset, b.__isset); } -ExportRequest::ExportRequest(const ExportRequest& other351) { - db_name = other351.db_name; - table_name = other351.table_name; - columns = other351.columns; - file_name = other351.file_name; - export_option = other351.export_option; - session_id = other351.session_id; - __isset = other351.__isset; -} -ExportRequest& ExportRequest::operator=(const ExportRequest& other352) { - db_name = other352.db_name; - table_name = other352.table_name; - columns = other352.columns; - file_name = other352.file_name; - export_option = other352.export_option; - session_id = other352.session_id; - __isset = other352.__isset; +ExportRequest::ExportRequest(const ExportRequest& other357) { + db_name = other357.db_name; + table_name = other357.table_name; + columns = other357.columns; + file_name = other357.file_name; + export_option = other357.export_option; + session_id = other357.session_id; + __isset = other357.__isset; +} +ExportRequest& ExportRequest::operator=(const ExportRequest& other358) { + db_name = other358.db_name; + table_name = other358.table_name; + columns = other358.columns; + file_name = other358.file_name; + export_option = other358.export_option; + session_id = other358.session_id; + __isset = other358.__isset; return *this; } void ExportRequest::printTo(std::ostream& out) const { @@ -10311,14 +10361,14 @@ uint32_t ExplainRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->select_list.clear(); - uint32_t _size353; - ::apache::thrift::protocol::TType _etype356; - xfer += iprot->readListBegin(_etype356, _size353); - this->select_list.resize(_size353); - uint32_t _i357; - for (_i357 = 0; _i357 < _size353; ++_i357) + uint32_t _size359; + ::apache::thrift::protocol::TType _etype362; + xfer += iprot->readListBegin(_etype362, _size359); + this->select_list.resize(_size359); + uint32_t _i363; + for (_i363 = 0; _i363 < _size359; ++_i363) { - xfer += this->select_list[_i357].read(iprot); + xfer += this->select_list[_i363].read(iprot); } xfer += iprot->readListEnd(); } @@ -10347,14 +10397,14 @@ uint32_t ExplainRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_by_list.clear(); - uint32_t _size358; - ::apache::thrift::protocol::TType _etype361; - xfer += iprot->readListBegin(_etype361, _size358); - this->group_by_list.resize(_size358); - uint32_t _i362; - for (_i362 = 0; _i362 < _size358; ++_i362) + uint32_t _size364; + ::apache::thrift::protocol::TType _etype367; + xfer += iprot->readListBegin(_etype367, _size364); + this->group_by_list.resize(_size364); + uint32_t _i368; + for (_i368 = 0; _i368 < _size364; ++_i368) { - xfer += this->group_by_list[_i362].read(iprot); + xfer += this->group_by_list[_i368].read(iprot); } xfer += iprot->readListEnd(); } @@ -10391,14 +10441,14 @@ uint32_t ExplainRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->order_by_list.clear(); - uint32_t _size363; - ::apache::thrift::protocol::TType _etype366; - xfer += iprot->readListBegin(_etype366, _size363); - this->order_by_list.resize(_size363); - uint32_t _i367; - for (_i367 = 0; _i367 < _size363; ++_i367) + uint32_t _size369; + ::apache::thrift::protocol::TType _etype372; + xfer += iprot->readListBegin(_etype372, _size369); + this->order_by_list.resize(_size369); + uint32_t _i373; + for (_i373 = 0; _i373 < _size369; ++_i373) { - xfer += this->order_by_list[_i367].read(iprot); + xfer += this->order_by_list[_i373].read(iprot); } xfer += iprot->readListEnd(); } @@ -10409,9 +10459,9 @@ uint32_t ExplainRequest::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 12: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast368; - xfer += iprot->readI32(ecast368); - this->explain_type = static_cast(ecast368); + int32_t ecast374; + xfer += iprot->readI32(ecast374); + this->explain_type = static_cast(ecast374); this->__isset.explain_type = true; } else { xfer += iprot->skip(ftype); @@ -10449,10 +10499,10 @@ uint32_t ExplainRequest::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeFieldBegin("select_list", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->select_list.size())); - std::vector ::const_iterator _iter369; - for (_iter369 = this->select_list.begin(); _iter369 != this->select_list.end(); ++_iter369) + std::vector ::const_iterator _iter375; + for (_iter375 = this->select_list.begin(); _iter375 != this->select_list.end(); ++_iter375) { - xfer += (*_iter369).write(oprot); + xfer += (*_iter375).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10472,10 +10522,10 @@ uint32_t ExplainRequest::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeFieldBegin("group_by_list", ::apache::thrift::protocol::T_LIST, 7); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->group_by_list.size())); - std::vector ::const_iterator _iter370; - for (_iter370 = this->group_by_list.begin(); _iter370 != this->group_by_list.end(); ++_iter370) + std::vector ::const_iterator _iter376; + for (_iter376 = this->group_by_list.begin(); _iter376 != this->group_by_list.end(); ++_iter376) { - xfer += (*_iter370).write(oprot); + xfer += (*_iter376).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10500,10 +10550,10 @@ uint32_t ExplainRequest::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeFieldBegin("order_by_list", ::apache::thrift::protocol::T_LIST, 11); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->order_by_list.size())); - std::vector ::const_iterator _iter371; - for (_iter371 = this->order_by_list.begin(); _iter371 != this->order_by_list.end(); ++_iter371) + std::vector ::const_iterator _iter377; + for (_iter377 = this->order_by_list.begin(); _iter377 != this->order_by_list.end(); ++_iter377) { - xfer += (*_iter371).write(oprot); + xfer += (*_iter377).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10535,35 +10585,35 @@ void swap(ExplainRequest &a, ExplainRequest &b) { swap(a.__isset, b.__isset); } -ExplainRequest::ExplainRequest(const ExplainRequest& other372) { - session_id = other372.session_id; - db_name = other372.db_name; - table_name = other372.table_name; - select_list = other372.select_list; - search_expr = other372.search_expr; - where_expr = other372.where_expr; - group_by_list = other372.group_by_list; - having_expr = other372.having_expr; - limit_expr = other372.limit_expr; - offset_expr = other372.offset_expr; - order_by_list = other372.order_by_list; - explain_type = other372.explain_type; - __isset = other372.__isset; -} -ExplainRequest& ExplainRequest::operator=(const ExplainRequest& other373) { - session_id = other373.session_id; - db_name = other373.db_name; - table_name = other373.table_name; - select_list = other373.select_list; - search_expr = other373.search_expr; - where_expr = other373.where_expr; - group_by_list = other373.group_by_list; - having_expr = other373.having_expr; - limit_expr = other373.limit_expr; - offset_expr = other373.offset_expr; - order_by_list = other373.order_by_list; - explain_type = other373.explain_type; - __isset = other373.__isset; +ExplainRequest::ExplainRequest(const ExplainRequest& other378) { + session_id = other378.session_id; + db_name = other378.db_name; + table_name = other378.table_name; + select_list = other378.select_list; + search_expr = other378.search_expr; + where_expr = other378.where_expr; + group_by_list = other378.group_by_list; + having_expr = other378.having_expr; + limit_expr = other378.limit_expr; + offset_expr = other378.offset_expr; + order_by_list = other378.order_by_list; + explain_type = other378.explain_type; + __isset = other378.__isset; +} +ExplainRequest& ExplainRequest::operator=(const ExplainRequest& other379) { + session_id = other379.session_id; + db_name = other379.db_name; + table_name = other379.table_name; + select_list = other379.select_list; + search_expr = other379.search_expr; + where_expr = other379.where_expr; + group_by_list = other379.group_by_list; + having_expr = other379.having_expr; + limit_expr = other379.limit_expr; + offset_expr = other379.offset_expr; + order_by_list = other379.order_by_list; + explain_type = other379.explain_type; + __isset = other379.__isset; return *this; } void ExplainRequest::printTo(std::ostream& out) const { @@ -10652,14 +10702,14 @@ uint32_t ExplainResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_defs.clear(); - uint32_t _size374; - ::apache::thrift::protocol::TType _etype377; - xfer += iprot->readListBegin(_etype377, _size374); - this->column_defs.resize(_size374); - uint32_t _i378; - for (_i378 = 0; _i378 < _size374; ++_i378) + uint32_t _size380; + ::apache::thrift::protocol::TType _etype383; + xfer += iprot->readListBegin(_etype383, _size380); + this->column_defs.resize(_size380); + uint32_t _i384; + for (_i384 = 0; _i384 < _size380; ++_i384) { - xfer += this->column_defs[_i378].read(iprot); + xfer += this->column_defs[_i384].read(iprot); } xfer += iprot->readListEnd(); } @@ -10672,14 +10722,14 @@ uint32_t ExplainResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_fields.clear(); - uint32_t _size379; - ::apache::thrift::protocol::TType _etype382; - xfer += iprot->readListBegin(_etype382, _size379); - this->column_fields.resize(_size379); - uint32_t _i383; - for (_i383 = 0; _i383 < _size379; ++_i383) + uint32_t _size385; + ::apache::thrift::protocol::TType _etype388; + xfer += iprot->readListBegin(_etype388, _size385); + this->column_fields.resize(_size385); + uint32_t _i389; + for (_i389 = 0; _i389 < _size385; ++_i389) { - xfer += this->column_fields[_i383].read(iprot); + xfer += this->column_fields[_i389].read(iprot); } xfer += iprot->readListEnd(); } @@ -10716,10 +10766,10 @@ uint32_t ExplainResponse::write(::apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeFieldBegin("column_defs", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->column_defs.size())); - std::vector ::const_iterator _iter384; - for (_iter384 = this->column_defs.begin(); _iter384 != this->column_defs.end(); ++_iter384) + std::vector ::const_iterator _iter390; + for (_iter390 = this->column_defs.begin(); _iter390 != this->column_defs.end(); ++_iter390) { - xfer += (*_iter384).write(oprot); + xfer += (*_iter390).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10728,10 +10778,10 @@ uint32_t ExplainResponse::write(::apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeFieldBegin("column_fields", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->column_fields.size())); - std::vector ::const_iterator _iter385; - for (_iter385 = this->column_fields.begin(); _iter385 != this->column_fields.end(); ++_iter385) + std::vector ::const_iterator _iter391; + for (_iter391 = this->column_fields.begin(); _iter391 != this->column_fields.end(); ++_iter391) { - xfer += (*_iter385).write(oprot); + xfer += (*_iter391).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10751,19 +10801,19 @@ void swap(ExplainResponse &a, ExplainResponse &b) { swap(a.__isset, b.__isset); } -ExplainResponse::ExplainResponse(const ExplainResponse& other386) { - error_code = other386.error_code; - error_msg = other386.error_msg; - column_defs = other386.column_defs; - column_fields = other386.column_fields; - __isset = other386.__isset; +ExplainResponse::ExplainResponse(const ExplainResponse& other392) { + error_code = other392.error_code; + error_msg = other392.error_msg; + column_defs = other392.column_defs; + column_fields = other392.column_fields; + __isset = other392.__isset; } -ExplainResponse& ExplainResponse::operator=(const ExplainResponse& other387) { - error_code = other387.error_code; - error_msg = other387.error_msg; - column_defs = other387.column_defs; - column_fields = other387.column_fields; - __isset = other387.__isset; +ExplainResponse& ExplainResponse::operator=(const ExplainResponse& other393) { + error_code = other393.error_code; + error_msg = other393.error_msg; + column_defs = other393.column_defs; + column_fields = other393.column_fields; + __isset = other393.__isset; return *this; } void ExplainResponse::printTo(std::ostream& out) const { @@ -10887,14 +10937,14 @@ uint32_t SelectRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->select_list.clear(); - uint32_t _size388; - ::apache::thrift::protocol::TType _etype391; - xfer += iprot->readListBegin(_etype391, _size388); - this->select_list.resize(_size388); - uint32_t _i392; - for (_i392 = 0; _i392 < _size388; ++_i392) + uint32_t _size394; + ::apache::thrift::protocol::TType _etype397; + xfer += iprot->readListBegin(_etype397, _size394); + this->select_list.resize(_size394); + uint32_t _i398; + for (_i398 = 0; _i398 < _size394; ++_i398) { - xfer += this->select_list[_i392].read(iprot); + xfer += this->select_list[_i398].read(iprot); } xfer += iprot->readListEnd(); } @@ -10923,14 +10973,14 @@ uint32_t SelectRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_by_list.clear(); - uint32_t _size393; - ::apache::thrift::protocol::TType _etype396; - xfer += iprot->readListBegin(_etype396, _size393); - this->group_by_list.resize(_size393); - uint32_t _i397; - for (_i397 = 0; _i397 < _size393; ++_i397) + uint32_t _size399; + ::apache::thrift::protocol::TType _etype402; + xfer += iprot->readListBegin(_etype402, _size399); + this->group_by_list.resize(_size399); + uint32_t _i403; + for (_i403 = 0; _i403 < _size399; ++_i403) { - xfer += this->group_by_list[_i397].read(iprot); + xfer += this->group_by_list[_i403].read(iprot); } xfer += iprot->readListEnd(); } @@ -10967,14 +11017,14 @@ uint32_t SelectRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->order_by_list.clear(); - uint32_t _size398; - ::apache::thrift::protocol::TType _etype401; - xfer += iprot->readListBegin(_etype401, _size398); - this->order_by_list.resize(_size398); - uint32_t _i402; - for (_i402 = 0; _i402 < _size398; ++_i402) + uint32_t _size404; + ::apache::thrift::protocol::TType _etype407; + xfer += iprot->readListBegin(_etype407, _size404); + this->order_by_list.resize(_size404); + uint32_t _i408; + for (_i408 = 0; _i408 < _size404; ++_i408) { - xfer += this->order_by_list[_i402].read(iprot); + xfer += this->order_by_list[_i408].read(iprot); } xfer += iprot->readListEnd(); } @@ -11015,10 +11065,10 @@ uint32_t SelectRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("select_list", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->select_list.size())); - std::vector ::const_iterator _iter403; - for (_iter403 = this->select_list.begin(); _iter403 != this->select_list.end(); ++_iter403) + std::vector ::const_iterator _iter409; + for (_iter409 = this->select_list.begin(); _iter409 != this->select_list.end(); ++_iter409) { - xfer += (*_iter403).write(oprot); + xfer += (*_iter409).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11038,10 +11088,10 @@ uint32_t SelectRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("group_by_list", ::apache::thrift::protocol::T_LIST, 7); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->group_by_list.size())); - std::vector ::const_iterator _iter404; - for (_iter404 = this->group_by_list.begin(); _iter404 != this->group_by_list.end(); ++_iter404) + std::vector ::const_iterator _iter410; + for (_iter410 = this->group_by_list.begin(); _iter410 != this->group_by_list.end(); ++_iter410) { - xfer += (*_iter404).write(oprot); + xfer += (*_iter410).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11066,10 +11116,10 @@ uint32_t SelectRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("order_by_list", ::apache::thrift::protocol::T_LIST, 11); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->order_by_list.size())); - std::vector ::const_iterator _iter405; - for (_iter405 = this->order_by_list.begin(); _iter405 != this->order_by_list.end(); ++_iter405) + std::vector ::const_iterator _iter411; + for (_iter411 = this->order_by_list.begin(); _iter411 != this->order_by_list.end(); ++_iter411) { - xfer += (*_iter405).write(oprot); + xfer += (*_iter411).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11096,33 +11146,33 @@ void swap(SelectRequest &a, SelectRequest &b) { swap(a.__isset, b.__isset); } -SelectRequest::SelectRequest(const SelectRequest& other406) { - session_id = other406.session_id; - db_name = other406.db_name; - table_name = other406.table_name; - select_list = other406.select_list; - search_expr = other406.search_expr; - where_expr = other406.where_expr; - group_by_list = other406.group_by_list; - having_expr = other406.having_expr; - limit_expr = other406.limit_expr; - offset_expr = other406.offset_expr; - order_by_list = other406.order_by_list; - __isset = other406.__isset; -} -SelectRequest& SelectRequest::operator=(const SelectRequest& other407) { - session_id = other407.session_id; - db_name = other407.db_name; - table_name = other407.table_name; - select_list = other407.select_list; - search_expr = other407.search_expr; - where_expr = other407.where_expr; - group_by_list = other407.group_by_list; - having_expr = other407.having_expr; - limit_expr = other407.limit_expr; - offset_expr = other407.offset_expr; - order_by_list = other407.order_by_list; - __isset = other407.__isset; +SelectRequest::SelectRequest(const SelectRequest& other412) { + session_id = other412.session_id; + db_name = other412.db_name; + table_name = other412.table_name; + select_list = other412.select_list; + search_expr = other412.search_expr; + where_expr = other412.where_expr; + group_by_list = other412.group_by_list; + having_expr = other412.having_expr; + limit_expr = other412.limit_expr; + offset_expr = other412.offset_expr; + order_by_list = other412.order_by_list; + __isset = other412.__isset; +} +SelectRequest& SelectRequest::operator=(const SelectRequest& other413) { + session_id = other413.session_id; + db_name = other413.db_name; + table_name = other413.table_name; + select_list = other413.select_list; + search_expr = other413.search_expr; + where_expr = other413.where_expr; + group_by_list = other413.group_by_list; + having_expr = other413.having_expr; + limit_expr = other413.limit_expr; + offset_expr = other413.offset_expr; + order_by_list = other413.order_by_list; + __isset = other413.__isset; return *this; } void SelectRequest::printTo(std::ostream& out) const { @@ -11210,14 +11260,14 @@ uint32_t SelectResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_defs.clear(); - uint32_t _size408; - ::apache::thrift::protocol::TType _etype411; - xfer += iprot->readListBegin(_etype411, _size408); - this->column_defs.resize(_size408); - uint32_t _i412; - for (_i412 = 0; _i412 < _size408; ++_i412) + uint32_t _size414; + ::apache::thrift::protocol::TType _etype417; + xfer += iprot->readListBegin(_etype417, _size414); + this->column_defs.resize(_size414); + uint32_t _i418; + for (_i418 = 0; _i418 < _size414; ++_i418) { - xfer += this->column_defs[_i412].read(iprot); + xfer += this->column_defs[_i418].read(iprot); } xfer += iprot->readListEnd(); } @@ -11230,14 +11280,14 @@ uint32_t SelectResponse::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->column_fields.clear(); - uint32_t _size413; - ::apache::thrift::protocol::TType _etype416; - xfer += iprot->readListBegin(_etype416, _size413); - this->column_fields.resize(_size413); - uint32_t _i417; - for (_i417 = 0; _i417 < _size413; ++_i417) + uint32_t _size419; + ::apache::thrift::protocol::TType _etype422; + xfer += iprot->readListBegin(_etype422, _size419); + this->column_fields.resize(_size419); + uint32_t _i423; + for (_i423 = 0; _i423 < _size419; ++_i423) { - xfer += this->column_fields[_i417].read(iprot); + xfer += this->column_fields[_i423].read(iprot); } xfer += iprot->readListEnd(); } @@ -11274,10 +11324,10 @@ uint32_t SelectResponse::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeFieldBegin("column_defs", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->column_defs.size())); - std::vector ::const_iterator _iter418; - for (_iter418 = this->column_defs.begin(); _iter418 != this->column_defs.end(); ++_iter418) + std::vector ::const_iterator _iter424; + for (_iter424 = this->column_defs.begin(); _iter424 != this->column_defs.end(); ++_iter424) { - xfer += (*_iter418).write(oprot); + xfer += (*_iter424).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11286,10 +11336,10 @@ uint32_t SelectResponse::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeFieldBegin("column_fields", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->column_fields.size())); - std::vector ::const_iterator _iter419; - for (_iter419 = this->column_fields.begin(); _iter419 != this->column_fields.end(); ++_iter419) + std::vector ::const_iterator _iter425; + for (_iter425 = this->column_fields.begin(); _iter425 != this->column_fields.end(); ++_iter425) { - xfer += (*_iter419).write(oprot); + xfer += (*_iter425).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11309,19 +11359,19 @@ void swap(SelectResponse &a, SelectResponse &b) { swap(a.__isset, b.__isset); } -SelectResponse::SelectResponse(const SelectResponse& other420) { - error_code = other420.error_code; - error_msg = other420.error_msg; - column_defs = other420.column_defs; - column_fields = other420.column_fields; - __isset = other420.__isset; +SelectResponse::SelectResponse(const SelectResponse& other426) { + error_code = other426.error_code; + error_msg = other426.error_msg; + column_defs = other426.column_defs; + column_fields = other426.column_fields; + __isset = other426.__isset; } -SelectResponse& SelectResponse::operator=(const SelectResponse& other421) { - error_code = other421.error_code; - error_msg = other421.error_msg; - column_defs = other421.column_defs; - column_fields = other421.column_fields; - __isset = other421.__isset; +SelectResponse& SelectResponse::operator=(const SelectResponse& other427) { + error_code = other427.error_code; + error_msg = other427.error_msg; + column_defs = other427.column_defs; + column_fields = other427.column_fields; + __isset = other427.__isset; return *this; } void SelectResponse::printTo(std::ostream& out) const { @@ -11461,19 +11511,19 @@ void swap(DeleteRequest &a, DeleteRequest &b) { swap(a.__isset, b.__isset); } -DeleteRequest::DeleteRequest(const DeleteRequest& other422) { - db_name = other422.db_name; - table_name = other422.table_name; - where_expr = other422.where_expr; - session_id = other422.session_id; - __isset = other422.__isset; +DeleteRequest::DeleteRequest(const DeleteRequest& other428) { + db_name = other428.db_name; + table_name = other428.table_name; + where_expr = other428.where_expr; + session_id = other428.session_id; + __isset = other428.__isset; } -DeleteRequest& DeleteRequest::operator=(const DeleteRequest& other423) { - db_name = other423.db_name; - table_name = other423.table_name; - where_expr = other423.where_expr; - session_id = other423.session_id; - __isset = other423.__isset; +DeleteRequest& DeleteRequest::operator=(const DeleteRequest& other429) { + db_name = other429.db_name; + table_name = other429.table_name; + where_expr = other429.where_expr; + session_id = other429.session_id; + __isset = other429.__isset; return *this; } void DeleteRequest::printTo(std::ostream& out) const { @@ -11566,14 +11616,14 @@ uint32_t UpdateRequest::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->update_expr_array.clear(); - uint32_t _size424; - ::apache::thrift::protocol::TType _etype427; - xfer += iprot->readListBegin(_etype427, _size424); - this->update_expr_array.resize(_size424); - uint32_t _i428; - for (_i428 = 0; _i428 < _size424; ++_i428) + uint32_t _size430; + ::apache::thrift::protocol::TType _etype433; + xfer += iprot->readListBegin(_etype433, _size430); + this->update_expr_array.resize(_size430); + uint32_t _i434; + for (_i434 = 0; _i434 < _size430; ++_i434) { - xfer += this->update_expr_array[_i428].read(iprot); + xfer += this->update_expr_array[_i434].read(iprot); } xfer += iprot->readListEnd(); } @@ -11622,10 +11672,10 @@ uint32_t UpdateRequest::write(::apache::thrift::protocol::TProtocol* oprot) cons xfer += oprot->writeFieldBegin("update_expr_array", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->update_expr_array.size())); - std::vector ::const_iterator _iter429; - for (_iter429 = this->update_expr_array.begin(); _iter429 != this->update_expr_array.end(); ++_iter429) + std::vector ::const_iterator _iter435; + for (_iter435 = this->update_expr_array.begin(); _iter435 != this->update_expr_array.end(); ++_iter435) { - xfer += (*_iter429).write(oprot); + xfer += (*_iter435).write(oprot); } xfer += oprot->writeListEnd(); } @@ -11650,21 +11700,21 @@ void swap(UpdateRequest &a, UpdateRequest &b) { swap(a.__isset, b.__isset); } -UpdateRequest::UpdateRequest(const UpdateRequest& other430) { - db_name = other430.db_name; - table_name = other430.table_name; - where_expr = other430.where_expr; - update_expr_array = other430.update_expr_array; - session_id = other430.session_id; - __isset = other430.__isset; -} -UpdateRequest& UpdateRequest::operator=(const UpdateRequest& other431) { - db_name = other431.db_name; - table_name = other431.table_name; - where_expr = other431.where_expr; - update_expr_array = other431.update_expr_array; - session_id = other431.session_id; - __isset = other431.__isset; +UpdateRequest::UpdateRequest(const UpdateRequest& other436) { + db_name = other436.db_name; + table_name = other436.table_name; + where_expr = other436.where_expr; + update_expr_array = other436.update_expr_array; + session_id = other436.session_id; + __isset = other436.__isset; +} +UpdateRequest& UpdateRequest::operator=(const UpdateRequest& other437) { + db_name = other437.db_name; + table_name = other437.table_name; + where_expr = other437.where_expr; + update_expr_array = other437.update_expr_array; + session_id = other437.session_id; + __isset = other437.__isset; return *this; } void UpdateRequest::printTo(std::ostream& out) const { @@ -11771,15 +11821,15 @@ void swap(ShowTablesRequest &a, ShowTablesRequest &b) { swap(a.__isset, b.__isset); } -ShowTablesRequest::ShowTablesRequest(const ShowTablesRequest& other432) { - session_id = other432.session_id; - db_name = other432.db_name; - __isset = other432.__isset; +ShowTablesRequest::ShowTablesRequest(const ShowTablesRequest& other438) { + session_id = other438.session_id; + db_name = other438.db_name; + __isset = other438.__isset; } -ShowTablesRequest& ShowTablesRequest::operator=(const ShowTablesRequest& other433) { - session_id = other433.session_id; - db_name = other433.db_name; - __isset = other433.__isset; +ShowTablesRequest& ShowTablesRequest::operator=(const ShowTablesRequest& other439) { + session_id = other439.session_id; + db_name = other439.db_name; + __isset = other439.__isset; return *this; } void ShowTablesRequest::printTo(std::ostream& out) const { @@ -11900,17 +11950,17 @@ void swap(ShowSegmentsRequest &a, ShowSegmentsRequest &b) { swap(a.__isset, b.__isset); } -ShowSegmentsRequest::ShowSegmentsRequest(const ShowSegmentsRequest& other434) { - session_id = other434.session_id; - db_name = other434.db_name; - table_name = other434.table_name; - __isset = other434.__isset; +ShowSegmentsRequest::ShowSegmentsRequest(const ShowSegmentsRequest& other440) { + session_id = other440.session_id; + db_name = other440.db_name; + table_name = other440.table_name; + __isset = other440.__isset; } -ShowSegmentsRequest& ShowSegmentsRequest::operator=(const ShowSegmentsRequest& other435) { - session_id = other435.session_id; - db_name = other435.db_name; - table_name = other435.table_name; - __isset = other435.__isset; +ShowSegmentsRequest& ShowSegmentsRequest::operator=(const ShowSegmentsRequest& other441) { + session_id = other441.session_id; + db_name = other441.db_name; + table_name = other441.table_name; + __isset = other441.__isset; return *this; } void ShowSegmentsRequest::printTo(std::ostream& out) const { @@ -12049,19 +12099,19 @@ void swap(ShowSegmentRequest &a, ShowSegmentRequest &b) { swap(a.__isset, b.__isset); } -ShowSegmentRequest::ShowSegmentRequest(const ShowSegmentRequest& other436) { - session_id = other436.session_id; - db_name = other436.db_name; - table_name = other436.table_name; - segment_id = other436.segment_id; - __isset = other436.__isset; +ShowSegmentRequest::ShowSegmentRequest(const ShowSegmentRequest& other442) { + session_id = other442.session_id; + db_name = other442.db_name; + table_name = other442.table_name; + segment_id = other442.segment_id; + __isset = other442.__isset; } -ShowSegmentRequest& ShowSegmentRequest::operator=(const ShowSegmentRequest& other437) { - session_id = other437.session_id; - db_name = other437.db_name; - table_name = other437.table_name; - segment_id = other437.segment_id; - __isset = other437.__isset; +ShowSegmentRequest& ShowSegmentRequest::operator=(const ShowSegmentRequest& other443) { + session_id = other443.session_id; + db_name = other443.db_name; + table_name = other443.table_name; + segment_id = other443.segment_id; + __isset = other443.__isset; return *this; } void ShowSegmentRequest::printTo(std::ostream& out) const { @@ -12320,33 +12370,33 @@ void swap(ShowSegmentResponse &a, ShowSegmentResponse &b) { swap(a.__isset, b.__isset); } -ShowSegmentResponse::ShowSegmentResponse(const ShowSegmentResponse& other438) { - error_code = other438.error_code; - error_msg = other438.error_msg; - segment_id = other438.segment_id; - status = other438.status; - path = other438.path; - size = other438.size; - block_count = other438.block_count; - row_capacity = other438.row_capacity; - row_count = other438.row_count; - room = other438.room; - column_count = other438.column_count; - __isset = other438.__isset; +ShowSegmentResponse::ShowSegmentResponse(const ShowSegmentResponse& other444) { + error_code = other444.error_code; + error_msg = other444.error_msg; + segment_id = other444.segment_id; + status = other444.status; + path = other444.path; + size = other444.size; + block_count = other444.block_count; + row_capacity = other444.row_capacity; + row_count = other444.row_count; + room = other444.room; + column_count = other444.column_count; + __isset = other444.__isset; } -ShowSegmentResponse& ShowSegmentResponse::operator=(const ShowSegmentResponse& other439) { - error_code = other439.error_code; - error_msg = other439.error_msg; - segment_id = other439.segment_id; - status = other439.status; - path = other439.path; - size = other439.size; - block_count = other439.block_count; - row_capacity = other439.row_capacity; - row_count = other439.row_count; - room = other439.room; - column_count = other439.column_count; - __isset = other439.__isset; +ShowSegmentResponse& ShowSegmentResponse::operator=(const ShowSegmentResponse& other445) { + error_code = other445.error_code; + error_msg = other445.error_msg; + segment_id = other445.segment_id; + status = other445.status; + path = other445.path; + size = other445.size; + block_count = other445.block_count; + row_capacity = other445.row_capacity; + row_count = other445.row_count; + room = other445.room; + column_count = other445.column_count; + __isset = other445.__isset; return *this; } void ShowSegmentResponse::printTo(std::ostream& out) const { @@ -12493,19 +12543,19 @@ void swap(ShowBlocksRequest &a, ShowBlocksRequest &b) { swap(a.__isset, b.__isset); } -ShowBlocksRequest::ShowBlocksRequest(const ShowBlocksRequest& other440) { - session_id = other440.session_id; - db_name = other440.db_name; - table_name = other440.table_name; - segment_id = other440.segment_id; - __isset = other440.__isset; +ShowBlocksRequest::ShowBlocksRequest(const ShowBlocksRequest& other446) { + session_id = other446.session_id; + db_name = other446.db_name; + table_name = other446.table_name; + segment_id = other446.segment_id; + __isset = other446.__isset; } -ShowBlocksRequest& ShowBlocksRequest::operator=(const ShowBlocksRequest& other441) { - session_id = other441.session_id; - db_name = other441.db_name; - table_name = other441.table_name; - segment_id = other441.segment_id; - __isset = other441.__isset; +ShowBlocksRequest& ShowBlocksRequest::operator=(const ShowBlocksRequest& other447) { + session_id = other447.session_id; + db_name = other447.db_name; + table_name = other447.table_name; + segment_id = other447.segment_id; + __isset = other447.__isset; return *this; } void ShowBlocksRequest::printTo(std::ostream& out) const { @@ -12662,21 +12712,21 @@ void swap(ShowBlockRequest &a, ShowBlockRequest &b) { swap(a.__isset, b.__isset); } -ShowBlockRequest::ShowBlockRequest(const ShowBlockRequest& other442) { - session_id = other442.session_id; - db_name = other442.db_name; - table_name = other442.table_name; - segment_id = other442.segment_id; - block_id = other442.block_id; - __isset = other442.__isset; +ShowBlockRequest::ShowBlockRequest(const ShowBlockRequest& other448) { + session_id = other448.session_id; + db_name = other448.db_name; + table_name = other448.table_name; + segment_id = other448.segment_id; + block_id = other448.block_id; + __isset = other448.__isset; } -ShowBlockRequest& ShowBlockRequest::operator=(const ShowBlockRequest& other443) { - session_id = other443.session_id; - db_name = other443.db_name; - table_name = other443.table_name; - segment_id = other443.segment_id; - block_id = other443.block_id; - __isset = other443.__isset; +ShowBlockRequest& ShowBlockRequest::operator=(const ShowBlockRequest& other449) { + session_id = other449.session_id; + db_name = other449.db_name; + table_name = other449.table_name; + segment_id = other449.segment_id; + block_id = other449.block_id; + __isset = other449.__isset; return *this; } void ShowBlockRequest::printTo(std::ostream& out) const { @@ -12885,27 +12935,27 @@ void swap(ShowBlockResponse &a, ShowBlockResponse &b) { swap(a.__isset, b.__isset); } -ShowBlockResponse::ShowBlockResponse(const ShowBlockResponse& other444) { - error_code = other444.error_code; - error_msg = other444.error_msg; - block_id = other444.block_id; - path = other444.path; - size = other444.size; - row_capacity = other444.row_capacity; - row_count = other444.row_count; - column_count = other444.column_count; - __isset = other444.__isset; -} -ShowBlockResponse& ShowBlockResponse::operator=(const ShowBlockResponse& other445) { - error_code = other445.error_code; - error_msg = other445.error_msg; - block_id = other445.block_id; - path = other445.path; - size = other445.size; - row_capacity = other445.row_capacity; - row_count = other445.row_count; - column_count = other445.column_count; - __isset = other445.__isset; +ShowBlockResponse::ShowBlockResponse(const ShowBlockResponse& other450) { + error_code = other450.error_code; + error_msg = other450.error_msg; + block_id = other450.block_id; + path = other450.path; + size = other450.size; + row_capacity = other450.row_capacity; + row_count = other450.row_count; + column_count = other450.column_count; + __isset = other450.__isset; +} +ShowBlockResponse& ShowBlockResponse::operator=(const ShowBlockResponse& other451) { + error_code = other451.error_code; + error_msg = other451.error_msg; + block_id = other451.block_id; + path = other451.path; + size = other451.size; + row_capacity = other451.row_capacity; + row_count = other451.row_count; + column_count = other451.column_count; + __isset = other451.__isset; return *this; } void ShowBlockResponse::printTo(std::ostream& out) const { @@ -13083,23 +13133,23 @@ void swap(ShowBlockColumnRequest &a, ShowBlockColumnRequest &b) { swap(a.__isset, b.__isset); } -ShowBlockColumnRequest::ShowBlockColumnRequest(const ShowBlockColumnRequest& other446) { - session_id = other446.session_id; - db_name = other446.db_name; - table_name = other446.table_name; - segment_id = other446.segment_id; - block_id = other446.block_id; - column_id = other446.column_id; - __isset = other446.__isset; -} -ShowBlockColumnRequest& ShowBlockColumnRequest::operator=(const ShowBlockColumnRequest& other447) { - session_id = other447.session_id; - db_name = other447.db_name; - table_name = other447.table_name; - segment_id = other447.segment_id; - block_id = other447.block_id; - column_id = other447.column_id; - __isset = other447.__isset; +ShowBlockColumnRequest::ShowBlockColumnRequest(const ShowBlockColumnRequest& other452) { + session_id = other452.session_id; + db_name = other452.db_name; + table_name = other452.table_name; + segment_id = other452.segment_id; + block_id = other452.block_id; + column_id = other452.column_id; + __isset = other452.__isset; +} +ShowBlockColumnRequest& ShowBlockColumnRequest::operator=(const ShowBlockColumnRequest& other453) { + session_id = other453.session_id; + db_name = other453.db_name; + table_name = other453.table_name; + segment_id = other453.segment_id; + block_id = other453.block_id; + column_id = other453.column_id; + __isset = other453.__isset; return *this; } void ShowBlockColumnRequest::printTo(std::ostream& out) const { @@ -13309,27 +13359,27 @@ void swap(ShowBlockColumnResponse &a, ShowBlockColumnResponse &b) { swap(a.__isset, b.__isset); } -ShowBlockColumnResponse::ShowBlockColumnResponse(const ShowBlockColumnResponse& other448) { - error_code = other448.error_code; - error_msg = other448.error_msg; - column_name = other448.column_name; - column_id = other448.column_id; - data_type = other448.data_type; - path = other448.path; - extra_file_count = other448.extra_file_count; - extra_file_names = other448.extra_file_names; - __isset = other448.__isset; -} -ShowBlockColumnResponse& ShowBlockColumnResponse::operator=(const ShowBlockColumnResponse& other449) { - error_code = other449.error_code; - error_msg = other449.error_msg; - column_name = other449.column_name; - column_id = other449.column_id; - data_type = other449.data_type; - path = other449.path; - extra_file_count = other449.extra_file_count; - extra_file_names = other449.extra_file_names; - __isset = other449.__isset; +ShowBlockColumnResponse::ShowBlockColumnResponse(const ShowBlockColumnResponse& other454) { + error_code = other454.error_code; + error_msg = other454.error_msg; + column_name = other454.column_name; + column_id = other454.column_id; + data_type = other454.data_type; + path = other454.path; + extra_file_count = other454.extra_file_count; + extra_file_names = other454.extra_file_names; + __isset = other454.__isset; +} +ShowBlockColumnResponse& ShowBlockColumnResponse::operator=(const ShowBlockColumnResponse& other455) { + error_code = other455.error_code; + error_msg = other455.error_msg; + column_name = other455.column_name; + column_id = other455.column_id; + data_type = other455.data_type; + path = other455.path; + extra_file_count = other455.extra_file_count; + extra_file_names = other455.extra_file_names; + __isset = other455.__isset; return *this; } void ShowBlockColumnResponse::printTo(std::ostream& out) const { diff --git a/src/network/infinity_thrift/infinity_types.h b/src/network/infinity_thrift/infinity_types.h index 7fe28d75e7..9ad57b366a 100644 --- a/src/network/infinity_thrift/infinity_types.h +++ b/src/network/infinity_thrift/infinity_types.h @@ -32,12 +32,14 @@ struct LogicType { Decimal = 6, Float = 7, Double = 8, - Varchar = 9, - Embedding = 10, - Tensor = 11, - TensorArray = 12, - Sparse = 13, - Invalid = 14 + Float16 = 9, + BFloat16 = 10, + Varchar = 11, + Embedding = 12, + Tensor = 13, + TensorArray = 14, + Sparse = 15, + Invalid = 16 }; }; @@ -77,12 +79,13 @@ std::string to_string(const DropConflict::type& val); struct ElementType { enum type { ElementBit = 0, - ElementInt8 = 1, - ElementInt16 = 2, - ElementInt32 = 3, - ElementInt64 = 4, - ElementFloat32 = 5, - ElementFloat64 = 6 + ElementUInt8 = 1, + ElementInt8 = 2, + ElementInt16 = 3, + ElementInt32 = 4, + ElementInt64 = 5, + ElementFloat32 = 6, + ElementFloat64 = 7 }; }; @@ -170,13 +173,15 @@ struct ColumnType { ColumnInt64 = 4, ColumnFloat32 = 5, ColumnFloat64 = 6, - ColumnVarchar = 7, - ColumnEmbedding = 8, - ColumnTensor = 9, - ColumnTensorArray = 10, - ColumnSparse = 11, - ColumnRowID = 12, - ColumnInvalid = 13 + ColumnFloat16 = 7, + ColumnBFloat16 = 8, + ColumnVarchar = 9, + ColumnEmbedding = 10, + ColumnTensor = 11, + ColumnTensorArray = 12, + ColumnSparse = 13, + ColumnRowID = 14, + ColumnInvalid = 15 }; }; @@ -189,12 +194,11 @@ std::string to_string(const ColumnType::type& val); struct IndexType { enum type { IVFFlat = 0, - HnswLVQ = 1, - Hnsw = 2, - FullText = 3, - BMP = 4, - Secondary = 5, - EMVB = 6 + Hnsw = 1, + FullText = 2, + BMP = 3, + Secondary = 4, + EMVB = 5 }; }; @@ -1053,8 +1057,9 @@ void swap(ColumnExpr &a, ColumnExpr &b); std::ostream& operator<<(std::ostream& out, const ColumnExpr& obj); typedef struct _EmbeddingData__isset { - _EmbeddingData__isset() : bool_array_value(false), i8_array_value(false), i16_array_value(false), i32_array_value(false), i64_array_value(false), f32_array_value(false), f64_array_value(false) {} + _EmbeddingData__isset() : bool_array_value(false), u8_array_value(false), i8_array_value(false), i16_array_value(false), i32_array_value(false), i64_array_value(false), f32_array_value(false), f64_array_value(false) {} bool bool_array_value :1; + bool u8_array_value :1; bool i8_array_value :1; bool i16_array_value :1; bool i32_array_value :1; @@ -1073,7 +1078,8 @@ class EmbeddingData : public virtual ::apache::thrift::TBase { virtual ~EmbeddingData() noexcept; std::vector bool_array_value; - std::vector i8_array_value; + std::vector u8_array_value; + std::vector i8_array_value; std::vector i16_array_value; std::vector i32_array_value; std::vector i64_array_value; @@ -1084,7 +1090,9 @@ class EmbeddingData : public virtual ::apache::thrift::TBase { void __set_bool_array_value(const std::vector & val); - void __set_i8_array_value(const std::vector & val); + void __set_u8_array_value(const std::vector & val); + + void __set_i8_array_value(const std::vector & val); void __set_i16_array_value(const std::vector & val); @@ -1102,6 +1110,10 @@ class EmbeddingData : public virtual ::apache::thrift::TBase { return false; else if (__isset.bool_array_value && !(bool_array_value == rhs.bool_array_value)) return false; + if (__isset.u8_array_value != rhs.__isset.u8_array_value) + return false; + else if (__isset.u8_array_value && !(u8_array_value == rhs.u8_array_value)) + return false; if (__isset.i8_array_value != rhs.__isset.i8_array_value) return false; else if (__isset.i8_array_value && !(i8_array_value == rhs.i8_array_value)) diff --git a/src/network/infinity_thrift_service.cpp b/src/network/infinity_thrift_service.cpp index 88a96cac7b..ca2870e67f 100644 --- a/src/network/infinity_thrift_service.cpp +++ b/src/network/infinity_thrift_service.cpp @@ -1488,6 +1488,10 @@ SharedPtr InfinityThriftService::GetColumnTypeFromProto(const infinity return MakeShared(infinity::LogicalType::kFloat); case infinity_thrift_rpc::LogicType::Double: return MakeShared(infinity::LogicalType::kDouble); + case infinity_thrift_rpc::LogicType::Float16: + return MakeShared(infinity::LogicalType::kFloat16); + case infinity_thrift_rpc::LogicType::BFloat16: + return MakeShared(infinity::LogicalType::kBFloat16); case infinity_thrift_rpc::LogicType::Tensor: case infinity_thrift_rpc::LogicType::TensorArray: case infinity_thrift_rpc::LogicType::Embedding: { @@ -1555,6 +1559,8 @@ EmbeddingDataType InfinityThriftService::GetEmbeddingDataTypeFromProto(const inf switch (type) { case infinity_thrift_rpc::ElementType::ElementBit: return EmbeddingDataType::kElemBit; + case infinity_thrift_rpc::ElementType::ElementUInt8: + return EmbeddingDataType::kElemUInt8; case infinity_thrift_rpc::ElementType::ElementInt8: return EmbeddingDataType::kElemInt8; case infinity_thrift_rpc::ElementType::ElementInt16: @@ -1946,7 +1952,19 @@ ExplainType InfinityThriftService::GetExplainTypeFromProto(const infinity_thrift } Tuple InfinityThriftService::GetEmbeddingDataTypeDataPtrFromProto(const infinity_thrift_rpc::EmbeddingData &embedding_data) { - if (embedding_data.__isset.i8_array_value) { + if (embedding_data.__isset.u8_array_value) { + auto ptr_i16 = (int16_t *)(embedding_data.u8_array_value.data()); + auto ptr_u8 = (uint8_t *)(embedding_data.u8_array_value.data()); + for (size_t i = 0; i < embedding_data.u8_array_value.size(); ++i) { + ptr_u8[i] = static_cast(ptr_i16[i]); + } + return {(void *)embedding_data.u8_array_value.data(), embedding_data.u8_array_value.size(), Status::OK()}; + } else if (embedding_data.__isset.i8_array_value) { + auto ptr_i16 = (int16_t *)(embedding_data.i8_array_value.data()); + auto ptr_i8 = (int8_t *)(embedding_data.i8_array_value.data()); + for (size_t i = 0; i < embedding_data.i8_array_value.size(); ++i) { + ptr_i8[i] = static_cast(ptr_i16[i]); + } return {(void *)embedding_data.i8_array_value.data(), embedding_data.i8_array_value.size(), Status::OK()}; } else if (embedding_data.__isset.i16_array_value) { return {(void *)embedding_data.i16_array_value.data(), embedding_data.i16_array_value.size(), Status::OK()}; @@ -2005,6 +2023,10 @@ infinity_thrift_rpc::ColumnType::type InfinityThriftService::DataTypeToProtoColu return infinity_thrift_rpc::ColumnType::ColumnFloat32; case LogicalType::kDouble: return infinity_thrift_rpc::ColumnType::ColumnFloat64; + case LogicalType::kFloat16: + return infinity_thrift_rpc::ColumnType::ColumnFloat16; + case LogicalType::kBFloat16: + return infinity_thrift_rpc::ColumnType::ColumnBFloat16; case LogicalType::kVarchar: return infinity_thrift_rpc::ColumnType::ColumnVarchar; case LogicalType::kEmbedding: @@ -2062,6 +2084,16 @@ UniquePtr InfinityThriftService::DataTypeToProtoD data_type_proto->__set_logic_type(infinity_thrift_rpc::LogicType::Double); return data_type_proto; } + case LogicalType::kFloat16: { + auto data_type_proto = MakeUnique(); + data_type_proto->__set_logic_type(infinity_thrift_rpc::LogicType::Float16); + return data_type_proto; + } + case LogicalType::kBFloat16: { + auto data_type_proto = MakeUnique(); + data_type_proto->__set_logic_type(infinity_thrift_rpc::LogicType::BFloat16); + return data_type_proto; + } case LogicalType::kVarchar: { auto data_type_proto = MakeUnique(); infinity_thrift_rpc::VarcharType varchar_type; @@ -2128,6 +2160,8 @@ infinity_thrift_rpc::ElementType::type InfinityThriftService::EmbeddingDataTypeT switch (embedding_data_type) { case EmbeddingDataType::kElemBit: return infinity_thrift_rpc::ElementType::ElementBit; + case EmbeddingDataType::kElemUInt8: + return infinity_thrift_rpc::ElementType::ElementUInt8; case EmbeddingDataType::kElemInt8: return infinity_thrift_rpc::ElementType::ElementInt8; case EmbeddingDataType::kElemInt16: @@ -2213,6 +2247,8 @@ Status InfinityThriftService::ProcessColumnFieldType(infinity_thrift_rpc::Column case LogicalType::kInteger: case LogicalType::kBigInt: case LogicalType::kHugeInt: + case LogicalType::kFloat16: + case LogicalType::kBFloat16: case LogicalType::kFloat: case LogicalType::kDouble: { HandlePodType(output_column_field, row_count, column_vector); diff --git a/src/parser/expr/knn_expr.cpp b/src/parser/expr/knn_expr.cpp index 87835a1ae4..edc6a56bf1 100644 --- a/src/parser/expr/knn_expr.cpp +++ b/src/parser/expr/knn_expr.cpp @@ -53,6 +53,11 @@ KnnExpr::~KnnExpr() { delete[] data_ptr; break; } + case EmbeddingDataType::kElemUInt8: { + uint8_t *data_ptr = reinterpret_cast(embedding_data_ptr_); + delete[] data_ptr; + break; + } case EmbeddingDataType::kElemInt16: { int16_t *data_ptr = reinterpret_cast(embedding_data_ptr_); delete[] data_ptr; @@ -84,9 +89,14 @@ std::string KnnExpr::ToString() const { if (!alias_.empty()) { return alias_; } - - std::string expr_str = - fmt::format("MATCH VECTOR ({}, {}, {}, Float32, {})", column_expr_->ToString(), "xxxxxx", dimension_, KnnDistanceType2Str(distance_type_)); + auto embedding_data_ptr = static_cast(embedding_data_ptr_); + EmbeddingType tmp_embedding_type(std::move(embedding_data_ptr), false); + std::string expr_str = fmt::format("MATCH VECTOR ({}, {}, {}, {}, {})", + column_expr_->ToString(), + EmbeddingType::Embedding2String(tmp_embedding_type, embedding_data_type_, dimension_), + EmbeddingType::EmbeddingDataType2String(embedding_data_type_), + KnnDistanceType2Str(distance_type_), + topn_); if (!opt_params_->empty()) { expr_str += '('; for (size_t i = 0; i < opt_params_->size(); ++i) { @@ -140,6 +150,13 @@ bool KnnExpr::InitEmbedding(const char *data_type, const ConstantExpr *query_vec for (long i = 0; i < dimension_; ++i) { ((char *)embedding_data_ptr_)[i] = query_vec->long_array_[i]; } + } else if (strcmp(data_type, "unsigned tinyint") == 0 and distance_type_ != infinity::KnnDistanceType::kHamming) { + dimension_ = query_vec->long_array_.size(); + embedding_data_type_ = infinity::EmbeddingDataType::kElemUInt8; + embedding_data_ptr_ = new uint8_t[dimension_]; + for (long i = 0; i < dimension_; ++i) { + ((uint8_t *)embedding_data_ptr_)[i] = query_vec->long_array_[i]; + } } else if (strcmp(data_type, "smallint") == 0 and distance_type_ != infinity::KnnDistanceType::kHamming) { dimension_ = query_vec->long_array_.size(); embedding_data_type_ = infinity::EmbeddingDataType::kElemInt16; diff --git a/src/parser/lexer.cpp b/src/parser/lexer.cpp index e64ddb0c0a..2cde98889a 100644 --- a/src/parser/lexer.cpp +++ b/src/parser/lexer.cpp @@ -653,8 +653,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ yyg->yy_c_buf_p = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 188 -#define YY_END_OF_BUFFER 189 +#define YY_NUM_RULES 189 +#define YY_END_OF_BUFFER 190 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -662,80 +662,80 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[655] = +static const flex_int16_t yy_accept[661] = { 0, - 0, 0, 185, 185, 189, 187, 1, 1, 187, 187, - 177, 183, 177, 177, 180, 177, 177, 177, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 185, 186, 1, 173, 0, 180, 179, - 178, 175, 174, 172, 176, 182, 182, 182, 6, 182, - 182, 182, 182, 182, 182, 20, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 76, 77, 87, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 109, 182, 111, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 150, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 185, 184, 181, 178, 0, 2, 182, 182, 5, - 8, 7, 182, 182, 182, 12, 182, 182, 15, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 40, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 53, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 83, 182, 89, 182, 182, 182, - 182, 94, 182, 182, 182, 182, 182, 182, 106, 182, - 107, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 126, 182, 182, 182, 182, 182, 182, - 182, 182, 135, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 159, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 0, 178, 182, 182, - 182, 182, 182, 182, 16, 182, 182, 182, 21, 22, - 182, 182, 182, 182, 182, 182, 182, 32, 182, 182, - 35, 38, 41, 182, 182, 182, 182, 182, 49, 182, - - 182, 50, 51, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 66, 67, 182, 182, 182, - 182, 182, 73, 182, 182, 182, 182, 182, 86, 88, - 90, 91, 182, 93, 182, 95, 97, 182, 182, 182, - 182, 182, 105, 182, 182, 182, 182, 114, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 127, 182, 182, - 182, 182, 182, 182, 182, 138, 182, 182, 182, 182, - 145, 146, 147, 182, 182, 153, 182, 182, 182, 182, - 158, 182, 182, 182, 182, 165, 167, 182, 169, 170, - 3, 182, 182, 182, 182, 182, 17, 182, 182, 182, - - 24, 182, 182, 182, 182, 182, 182, 34, 182, 182, - 182, 182, 182, 182, 48, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 60, 61, 63, 182, 182, 182, - 182, 70, 182, 182, 74, 182, 78, 80, 182, 182, - 182, 92, 182, 98, 182, 182, 102, 182, 182, 182, - 112, 113, 182, 182, 117, 182, 182, 182, 182, 182, - 182, 125, 128, 182, 182, 182, 182, 182, 182, 182, - 182, 141, 182, 182, 182, 182, 154, 182, 182, 156, - 182, 182, 182, 182, 166, 168, 171, 182, 182, 182, - 11, 13, 18, 182, 19, 182, 25, 182, 27, 182, - - 31, 33, 182, 182, 182, 182, 46, 182, 182, 43, - 182, 54, 182, 57, 182, 59, 182, 182, 64, 182, - 68, 69, 71, 72, 182, 182, 81, 182, 182, 182, - 182, 99, 100, 103, 182, 108, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 130, 131, 182, 133, - 182, 182, 140, 142, 143, 182, 182, 182, 155, 157, - 160, 182, 182, 164, 4, 9, 182, 14, 182, 182, - 28, 29, 30, 182, 182, 44, 45, 182, 182, 182, - 56, 58, 55, 62, 182, 75, 79, 82, 182, 182, - 96, 101, 104, 182, 182, 182, 118, 119, 120, 121, - - 182, 124, 182, 132, 136, 134, 182, 182, 182, 149, - 182, 163, 182, 10, 23, 182, 36, 39, 182, 42, - 182, 65, 182, 85, 110, 115, 116, 122, 182, 129, - 137, 139, 182, 182, 182, 161, 182, 37, 47, 52, - 84, 182, 182, 148, 182, 162, 26, 123, 182, 182, - 144, 151, 152, 0 + 0, 0, 186, 186, 190, 188, 1, 1, 188, 188, + 178, 184, 178, 178, 181, 178, 178, 178, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 186, 187, 1, 174, 0, 181, 180, + 179, 176, 175, 173, 177, 183, 183, 183, 6, 183, + 183, 183, 183, 183, 183, 20, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 76, 77, 87, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 183, 183, 183, 109, 183, 111, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 150, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 186, 185, 182, 179, 0, 2, 183, 183, 5, + 8, 7, 183, 183, 183, 12, 183, 183, 15, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 40, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 53, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 83, 183, 89, 183, 183, 183, + 183, 94, 183, 183, 183, 183, 183, 183, 106, 183, + 107, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 126, 183, 183, 183, 183, 183, 183, + 183, 183, 135, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 160, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 0, 179, 183, + 183, 183, 183, 183, 183, 16, 183, 183, 183, 21, + 22, 183, 183, 183, 183, 183, 183, 183, 32, 183, + 183, 35, 38, 41, 183, 183, 183, 183, 183, 49, + + 183, 183, 50, 51, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 66, 67, 183, 183, + 183, 183, 183, 73, 183, 183, 183, 183, 183, 86, + 88, 90, 91, 183, 93, 183, 95, 97, 183, 183, + 183, 183, 183, 105, 183, 183, 183, 183, 114, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 127, 183, + 183, 183, 183, 183, 183, 183, 138, 183, 183, 183, + 183, 145, 146, 147, 183, 183, 153, 183, 183, 183, + 183, 183, 159, 183, 183, 183, 183, 166, 168, 183, + 170, 171, 3, 183, 183, 183, 183, 183, 17, 183, + + 183, 183, 24, 183, 183, 183, 183, 183, 183, 34, + 183, 183, 183, 183, 183, 183, 48, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 60, 61, 63, 183, + 183, 183, 183, 70, 183, 183, 74, 183, 78, 80, + 183, 183, 183, 92, 183, 98, 183, 183, 102, 183, + 183, 183, 112, 113, 183, 183, 117, 183, 183, 183, + 183, 183, 183, 125, 128, 183, 183, 183, 183, 183, + 183, 183, 183, 141, 183, 183, 183, 183, 154, 183, + 183, 183, 157, 183, 183, 183, 183, 167, 169, 172, + 183, 183, 183, 11, 13, 18, 183, 19, 183, 25, + + 183, 27, 183, 31, 33, 183, 183, 183, 183, 46, + 183, 183, 43, 183, 54, 183, 57, 183, 59, 183, + 183, 64, 183, 68, 69, 71, 72, 183, 183, 81, + 183, 183, 183, 183, 99, 100, 103, 183, 108, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 130, + 131, 183, 133, 183, 183, 140, 142, 143, 183, 183, + 183, 155, 183, 158, 161, 183, 183, 165, 4, 9, + 183, 14, 183, 183, 28, 29, 30, 183, 183, 44, + 45, 183, 183, 183, 56, 58, 55, 62, 183, 75, + 79, 82, 183, 183, 96, 101, 104, 183, 183, 183, + + 118, 119, 120, 121, 183, 124, 183, 132, 136, 134, + 183, 183, 183, 149, 183, 183, 164, 183, 10, 23, + 183, 36, 39, 183, 42, 183, 65, 183, 85, 110, + 115, 116, 122, 183, 129, 137, 139, 183, 183, 183, + 156, 162, 183, 37, 47, 52, 84, 183, 183, 148, + 183, 163, 26, 123, 183, 183, 144, 151, 152, 0 } ; static const YY_CHAR yy_ec[256] = @@ -781,14 +781,14 @@ static const YY_CHAR yy_meta[69] = 4, 4, 4, 4, 4, 4, 4, 4 } ; -static const flex_int16_t yy_base[659] = +static const flex_int16_t yy_base[665] = { 0, - 0, 0, 171, 168, 174, 1346, 67, 69, 151, 0, - 1346, 1346, 63, 66, 70, 69, 146, 142, 58, 100, + 0, 0, 171, 168, 174, 1357, 67, 69, 151, 0, + 1357, 1357, 63, 66, 70, 69, 146, 142, 58, 100, 72, 119, 62, 128, 71, 153, 163, 56, 79, 174, 129, 171, 184, 179, 70, 221, 226, 269, 219, 236, - 87, 0, 87, 0, 139, 91, 1346, 137, 285, 251, - 293, 1346, 1346, 1346, 1346, 0, 263, 272, 288, 106, + 87, 0, 87, 0, 139, 91, 1357, 137, 285, 251, + 293, 1357, 1357, 1357, 1357, 0, 263, 272, 288, 106, 123, 279, 169, 270, 185, 0, 273, 202, 210, 315, 291, 297, 331, 225, 288, 300, 305, 328, 328, 360, 327, 325, 323, 347, 333, 332, 345, 349, 377, 360, @@ -797,143 +797,145 @@ static const flex_int16_t yy_base[659] = 373, 381, 387, 382, 384, 394, 413, 0, 403, 421, 410, 412, 409, 419, 427, 433, 432, 417, 444, 440, 426, 476, 436, 452, 453, 453, 446, 453, 476, 0, - 470, 464, 480, 494, 477, 489, 489, 488, 489, 482, - 504, 0, 1346, 1346, 540, 545, 0, 507, 512, 0, - 0, 0, 502, 512, 522, 520, 541, 534, 0, 541, - 543, 548, 536, 550, 543, 540, 551, 534, 560, 543, - 564, 547, 558, 567, 592, 575, 559, 579, 571, 593, - 594, 0, 595, 599, 584, 592, 591, 591, 610, 594, - 602, 609, 604, 606, 610, 618, 600, 613, 619, 614, - - 628, 630, 636, 646, 648, 638, 0, 634, 650, 647, - 652, 652, 651, 661, 646, 645, 647, 648, 0, 658, - 653, 664, 669, 670, 668, 658, 681, 673, 664, 679, - 692, 701, 688, 0, 696, 701, 698, 693, 697, 702, - 713, 700, 0, 697, 709, 705, 712, 706, 706, 713, - 723, 704, 716, 726, 726, 739, 0, 735, 755, 739, - 760, 741, 739, 757, 756, 747, 777, 782, 748, 755, - 776, 781, 769, 783, 0, 774, 789, 790, 0, 0, - 785, 788, 788, 796, 790, 803, 796, 0, 786, 794, - 812, 795, 0, 803, 796, 798, 806, 819, 0, 814, - - 813, 0, 0, 825, 818, 814, 816, 836, 820, 838, - 843, 829, 843, 852, 841, 0, 0, 840, 856, 842, - 845, 855, 848, 859, 845, 852, 853, 865, 0, 0, - 0, 0, 853, 0, 871, 0, 0, 869, 870, 868, - 881, 872, 0, 886, 879, 875, 884, 0, 894, 893, - 887, 901, 908, 910, 903, 908, 912, 0, 894, 913, - 920, 910, 920, 923, 918, 0, 916, 912, 928, 927, - 0, 0, 924, 935, 926, 0, 932, 926, 936, 950, - 0, 954, 953, 961, 948, 946, 0, 961, 0, 948, - 0, 942, 970, 956, 957, 962, 960, 979, 963, 967, - - 0, 980, 984, 977, 993, 990, 993, 0, 998, 991, - 1000, 998, 1006, 1004, 0, 1001, 1011, 1013, 999, 1000, - 1002, 1013, 1009, 1027, 0, 98, 0, 1011, 1027, 1019, - 1022, 0, 1028, 1018, 0, 1025, 1036, 0, 1025, 1045, - 1032, 0, 1051, 0, 1040, 1050, 1045, 1064, 1047, 1060, - 0, 0, 1067, 1062, 0, 1058, 1056, 1057, 1064, 1065, - 1079, 0, 0, 1072, 1078, 1083, 1074, 1069, 1075, 1084, - 1090, 1080, 1086, 1085, 1092, 1106, 0, 1103, 1104, 0, - 1099, 1118, 1119, 1105, 0, 0, 0, 1119, 1111, 97, - 0, 0, 0, 1113, 0, 1121, 0, 1109, 1111, 1117, - - 1119, 0, 1120, 1127, 1129, 1122, 0, 1123, 1141, 0, - 1138, 0, 1144, 0, 1139, 0, 1138, 91, 0, 1145, - 0, 0, 0, 0, 1140, 1142, 0, 1144, 1158, 1171, - 1161, 0, 1156, 0, 1165, 0, 1152, 1178, 1167, 1168, - 1178, 1159, 1186, 1172, 1174, 1185, 0, 1176, 1176, 0, - 1183, 1184, 0, 0, 1200, 1202, 1187, 1209, 0, 0, - 0, 1195, 1202, 0, 0, 0, 88, 0, 1196, 1207, - 0, 0, 0, 1212, 1221, 0, 0, 1222, 1209, 1217, - 0, 0, 0, 0, 1212, 0, 0, 0, 1230, 1223, - 0, 0, 0, 1231, 1225, 1233, 0, 0, 0, 1226, - - 1237, 0, 1227, 0, 1229, 0, 1229, 1232, 1238, 0, - 1232, 0, 1250, 0, 0, 1242, 1242, 0, 1248, 0, - 1260, 0, 1248, 0, 0, 0, 0, 0, 1264, 0, - 0, 0, 1252, 1255, 1271, 1262, 1269, 0, 0, 0, - 0, 1266, 1285, 0, 1272, 0, 0, 0, 1264, 1276, - 0, 1272, 0, 1346, 1333, 1337, 93, 1341 + 470, 475, 469, 494, 477, 489, 489, 488, 497, 485, + 507, 0, 1357, 1357, 541, 546, 0, 519, 513, 0, + 0, 0, 504, 516, 524, 527, 542, 535, 0, 542, + 544, 549, 539, 552, 544, 541, 553, 536, 561, 544, + 565, 549, 560, 577, 589, 576, 561, 583, 571, 594, + 595, 0, 596, 599, 584, 592, 592, 592, 612, 596, + 603, 610, 605, 607, 611, 620, 602, 615, 628, 615, + + 630, 634, 636, 643, 648, 638, 0, 634, 650, 647, + 652, 652, 651, 661, 646, 646, 649, 649, 0, 660, + 654, 665, 671, 672, 670, 667, 682, 675, 668, 679, + 689, 701, 688, 0, 696, 701, 698, 693, 697, 702, + 713, 700, 0, 698, 711, 706, 713, 707, 707, 714, + 725, 706, 718, 735, 726, 738, 748, 0, 742, 756, + 740, 760, 742, 741, 757, 757, 748, 782, 785, 754, + 748, 779, 784, 772, 793, 0, 784, 792, 796, 0, + 0, 791, 793, 793, 801, 794, 807, 800, 0, 790, + 795, 813, 796, 0, 804, 797, 799, 807, 822, 0, + + 816, 814, 0, 0, 823, 813, 817, 819, 839, 830, + 848, 846, 835, 849, 857, 846, 0, 0, 845, 860, + 846, 849, 859, 849, 860, 846, 853, 854, 874, 0, + 0, 0, 0, 853, 0, 871, 0, 0, 869, 870, + 860, 875, 875, 0, 889, 889, 885, 887, 0, 900, + 899, 892, 906, 913, 914, 907, 912, 909, 0, 902, + 914, 921, 911, 921, 924, 919, 0, 919, 914, 930, + 922, 0, 0, 927, 938, 929, 0, 942, 936, 952, + 943, 958, 0, 961, 959, 967, 954, 951, 0, 966, + 0, 953, 0, 950, 972, 958, 959, 964, 962, 981, + + 967, 972, 0, 983, 986, 977, 997, 994, 997, 0, + 1009, 1002, 1012, 1005, 1014, 1011, 0, 1007, 1017, 1019, + 1004, 1005, 1007, 1021, 1011, 1029, 0, 98, 0, 1013, + 1029, 1021, 1024, 0, 1032, 1023, 0, 1028, 1038, 0, + 1025, 1049, 1045, 0, 1054, 0, 1043, 1060, 1052, 1072, + 1054, 1066, 0, 0, 1073, 1068, 0, 1063, 1061, 1062, + 1072, 1067, 1081, 0, 0, 1074, 1080, 1085, 1076, 1073, + 1080, 1087, 1092, 1080, 1090, 1089, 1096, 1117, 0, 1114, + 1107, 1120, 0, 1108, 1127, 1127, 1112, 0, 0, 0, + 1126, 1118, 97, 0, 0, 0, 1119, 0, 1127, 0, + + 1118, 1120, 1120, 1122, 0, 1123, 1130, 1132, 1127, 0, + 1129, 1147, 0, 1142, 0, 1148, 0, 1148, 0, 1143, + 91, 0, 1150, 0, 0, 0, 0, 1152, 1154, 0, + 1157, 1174, 1180, 1170, 0, 1164, 0, 1172, 0, 1159, + 1185, 1173, 1174, 1187, 1168, 1189, 1175, 1177, 1188, 0, + 1179, 1181, 0, 1189, 1190, 0, 0, 1204, 1206, 1196, + 1214, 0, 1213, 0, 0, 1208, 1215, 0, 0, 0, + 88, 0, 1210, 1224, 0, 0, 0, 1230, 1231, 0, + 0, 1232, 1218, 1225, 0, 0, 0, 0, 1220, 0, + 0, 0, 1238, 1230, 0, 0, 0, 1241, 1235, 1243, + + 0, 0, 0, 1230, 1241, 0, 1231, 0, 1233, 0, + 1235, 1239, 1245, 0, 1239, 1257, 0, 1265, 0, 0, + 1256, 1253, 0, 1262, 0, 1274, 0, 1263, 0, 0, + 0, 0, 0, 1282, 0, 0, 0, 1271, 1274, 1282, + 0, 1273, 1279, 0, 0, 0, 0, 1275, 1294, 0, + 1281, 0, 0, 0, 1275, 1287, 0, 1283, 0, 1357, + 1344, 1348, 93, 1352 } ; -static const flex_int16_t yy_def[659] = +static const flex_int16_t yy_def[665] = { 0, - 654, 1, 655, 655, 654, 654, 654, 654, 654, 656, - 654, 654, 654, 654, 654, 654, 654, 654, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 658, 654, 654, 654, 656, 654, 654, - 654, 654, 654, 654, 654, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 658, 654, 654, 654, 654, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 654, 654, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, - 657, 657, 657, 0, 654, 654, 654, 654 + 660, 1, 661, 661, 660, 660, 660, 660, 660, 662, + 660, 660, 660, 660, 660, 660, 660, 660, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 664, 660, 660, 660, 662, 660, 660, + 660, 660, 660, 660, 660, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 664, 660, 660, 660, 660, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 660, 660, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 0, + 660, 660, 660, 660 } ; -static const flex_int16_t yy_nxt[1415] = +static const flex_int16_t yy_nxt[1426] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -944,37 +946,37 @@ static const flex_int16_t yy_nxt[1415] = 37, 38, 39, 40, 41, 42, 43, 42, 46, 46, 46, 46, 49, 49, 49, 50, 50, 50, 51, 49, 49, 49, 52, 53, 57, 95, 58, 67, 77, 78, - 79, 59, 46, 46, 68, 69, 56, 86, 96, 614, + 79, 59, 46, 46, 68, 69, 56, 86, 96, 619, - 80, 70, 584, 87, 71, 117, 141, 567, 518, 139, + 80, 70, 588, 87, 71, 117, 141, 571, 521, 139, 140, 57, 95, 58, 67, 77, 78, 79, 59, 60, 61, 68, 69, 62, 86, 96, 63, 80, 70, 64, 87, 71, 117, 141, 72, 65, 139, 140, 73, 66, 153, 144, 74, 81, 101, 143, 60, 61, 75, 154, 62, 76, 102, 63, 82, 55, 64, 83, 103, 54, 84, 72, 65, 85, 47, 73, 66, 153, 88, 74, - 81, 101, 89, 654, 45, 75, 154, 45, 76, 102, - 654, 82, 90, 92, 83, 103, 104, 84, 91, 654, - 85, 93, 654, 97, 112, 88, 94, 98, 157, 89, + 81, 101, 89, 660, 45, 75, 154, 45, 76, 102, + 660, 82, 90, 92, 83, 103, 104, 84, 91, 660, + 85, 93, 660, 97, 112, 88, 94, 98, 157, 89, 105, 113, 114, 99, 107, 160, 106, 100, 115, 90, - 92, 116, 108, 104, 109, 91, 110, 654, 93, 111, - 97, 112, 654, 94, 98, 157, 654, 105, 113, 114, + 92, 116, 108, 104, 109, 91, 110, 660, 93, 111, + 97, 112, 660, 94, 98, 157, 660, 105, 113, 114, 99, 107, 160, 106, 100, 115, 118, 163, 116, 108, 119, 109, 164, 110, 120, 122, 111, 132, 123, 133, - 121, 136, 134, 124, 135, 137, 125, 654, 177, 138, - 50, 50, 50, 118, 163, 654, 654, 119, 654, 164, - 654, 120, 122, 654, 132, 123, 133, 121, 136, 134, + 121, 136, 134, 124, 135, 137, 125, 660, 177, 138, + 50, 50, 50, 118, 163, 660, 660, 119, 660, 164, + 660, 120, 122, 660, 132, 123, 133, 121, 136, 134, 124, 135, 137, 125, 126, 177, 138, 149, 127, 147, 150, 128, 129, 51, 49, 49, 49, 148, 130, 158, - 155, 131, 145, 145, 145, 151, 161, 162, 159, 654, + 155, 131, 145, 145, 145, 151, 161, 162, 159, 660, 169, 126, 146, 156, 149, 127, 147, 150, 128, 129, - 170, 654, 152, 178, 148, 130, 158, 155, 131, 179, - 654, 171, 151, 161, 162, 159, 172, 169, 180, 146, + 170, 660, 152, 178, 148, 130, 158, 155, 131, 179, + 660, 171, 151, 161, 162, 159, 172, 169, 180, 146, 156, 165, 166, 167, 181, 168, 182, 170, 173, 152, - 178, 174, 654, 188, 189, 191, 179, 175, 171, 194, - 190, 196, 192, 172, 176, 180, 195, 654, 165, 166, + 178, 174, 660, 188, 189, 191, 179, 175, 171, 194, + 190, 196, 192, 172, 176, 180, 195, 660, 165, 166, 167, 181, 168, 182, 197, 173, 193, 183, 174, 184, 188, 189, 191, 185, 175, 198, 194, 190, 196, 192, 186, 176, 199, 195, 187, 200, 201, 206, 202, 207, @@ -986,114 +988,115 @@ static const flex_int16_t yy_nxt[1415] = 204, 205, 217, 218, 224, 219, 225, 220, 226, 227, 228, 233, 230, 229, 234, 209, 231, 210, 211, 235, 221, 236, 232, 237, 222, 244, 223, 245, 246, 247, - 654, 224, 250, 225, 248, 226, 227, 228, 233, 230, - 229, 234, 654, 231, 249, 253, 235, 255, 236, 232, - 237, 238, 244, 239, 245, 246, 247, 240, 256, 250, - - 259, 248, 241, 251, 252, 254, 262, 263, 264, 242, - 243, 249, 253, 257, 255, 260, 265, 258, 238, 266, - 239, 261, 654, 654, 240, 256, 269, 259, 654, 241, - 251, 252, 254, 262, 263, 264, 242, 243, 270, 271, - 257, 272, 260, 265, 258, 273, 266, 274, 261, 145, - 145, 145, 267, 269, 268, 268, 268, 275, 276, 146, - 277, 278, 279, 281, 282, 270, 271, 283, 272, 284, - 286, 287, 273, 288, 274, 289, 290, 280, 285, 291, - 293, 294, 295, 292, 275, 276, 146, 277, 278, 279, - 281, 282, 299, 300, 283, 301, 284, 286, 287, 654, - - 288, 302, 289, 290, 280, 285, 291, 293, 294, 295, - 292, 296, 303, 304, 305, 297, 306, 307, 308, 299, - 300, 309, 301, 310, 311, 312, 298, 313, 302, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 296, 303, - 304, 305, 297, 306, 307, 308, 323, 324, 309, 325, - 310, 311, 312, 298, 313, 326, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 327, 330, 328, 331, 332, - 333, 334, 337, 323, 324, 335, 325, 329, 338, 339, - 340, 341, 326, 342, 343, 336, 344, 345, 346, 347, - 348, 349, 327, 330, 328, 331, 332, 333, 334, 337, - - 350, 351, 335, 352, 329, 338, 339, 340, 341, 353, - 342, 343, 336, 344, 345, 346, 347, 348, 349, 354, - 357, 355, 358, 359, 360, 361, 362, 350, 351, 363, - 352, 356, 364, 365, 366, 367, 353, 368, 369, 370, - 371, 372, 373, 374, 375, 376, 354, 357, 355, 358, - 359, 360, 361, 362, 379, 377, 363, 378, 356, 364, - 365, 366, 367, 380, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 381, 382, 385, 386, 383, 389, 390, - 391, 379, 377, 384, 378, 387, 268, 268, 268, 388, - 380, 268, 268, 268, 392, 393, 394, 395, 396, 397, - - 381, 382, 385, 386, 383, 389, 390, 391, 398, 399, - 384, 400, 387, 401, 402, 403, 388, 404, 405, 406, - 407, 392, 393, 394, 395, 396, 397, 408, 409, 410, - 411, 412, 413, 414, 415, 398, 399, 416, 400, 417, - 401, 402, 403, 418, 404, 405, 406, 407, 419, 420, - 421, 422, 423, 424, 408, 409, 410, 411, 412, 413, - 414, 415, 425, 426, 416, 427, 417, 428, 429, 430, - 418, 431, 432, 433, 434, 419, 420, 421, 422, 423, - 424, 435, 436, 437, 438, 439, 440, 442, 443, 425, - 426, 444, 427, 445, 428, 429, 430, 441, 431, 432, - - 433, 434, 446, 447, 448, 449, 450, 451, 435, 436, - 437, 438, 439, 440, 442, 443, 452, 453, 444, 454, - 445, 455, 456, 457, 441, 458, 459, 460, 463, 446, - 447, 448, 449, 450, 451, 461, 464, 465, 466, 467, - 468, 469, 470, 452, 453, 471, 454, 472, 455, 456, - 457, 462, 458, 459, 460, 463, 473, 474, 475, 476, - 477, 478, 461, 464, 465, 466, 467, 468, 469, 470, - 479, 480, 471, 481, 472, 482, 483, 484, 462, 485, - 486, 487, 488, 473, 474, 475, 476, 477, 478, 489, - 490, 491, 492, 493, 494, 495, 496, 479, 480, 497, - - 481, 498, 482, 483, 484, 499, 485, 486, 487, 488, - 500, 501, 502, 503, 504, 505, 489, 490, 491, 492, - 493, 494, 495, 496, 506, 507, 497, 508, 498, 509, - 510, 511, 499, 512, 513, 514, 515, 500, 501, 502, - 503, 504, 505, 516, 517, 519, 520, 521, 522, 523, - 524, 506, 507, 525, 508, 526, 509, 510, 511, 527, - 512, 513, 514, 515, 528, 529, 531, 532, 530, 533, - 516, 517, 519, 520, 521, 522, 523, 524, 534, 535, - 525, 536, 526, 537, 538, 539, 527, 540, 541, 542, - 543, 528, 529, 531, 532, 530, 533, 544, 545, 546, - - 547, 548, 549, 550, 551, 534, 535, 552, 536, 553, - 537, 538, 539, 554, 540, 541, 542, 543, 555, 556, - 557, 558, 559, 560, 544, 545, 546, 547, 548, 549, - 550, 551, 561, 562, 552, 563, 553, 564, 565, 566, - 554, 568, 569, 570, 571, 555, 556, 557, 558, 559, - 560, 572, 573, 574, 575, 576, 577, 578, 579, 561, - 562, 580, 563, 581, 564, 565, 566, 582, 568, 569, - 570, 571, 583, 585, 586, 587, 588, 589, 572, 573, - 574, 575, 576, 577, 578, 579, 590, 591, 580, 592, - 581, 593, 594, 595, 582, 596, 597, 598, 599, 583, - - 585, 586, 587, 588, 589, 600, 601, 602, 603, 604, - 605, 606, 607, 590, 591, 608, 592, 609, 593, 594, - 595, 610, 596, 597, 598, 599, 611, 612, 613, 615, - 616, 617, 600, 601, 602, 603, 604, 605, 606, 607, - 618, 619, 608, 620, 609, 621, 622, 623, 610, 624, - 625, 626, 627, 611, 612, 613, 615, 616, 617, 628, - 629, 630, 631, 632, 633, 634, 635, 618, 619, 636, - 620, 637, 621, 622, 623, 638, 624, 625, 626, 627, - 639, 640, 641, 642, 643, 644, 628, 629, 630, 631, - 632, 633, 634, 635, 645, 646, 636, 647, 637, 648, - - 649, 650, 638, 651, 652, 653, 654, 639, 640, 641, - 642, 643, 644, 654, 654, 654, 654, 654, 654, 654, - 654, 645, 646, 654, 647, 654, 648, 649, 650, 654, - 651, 652, 653, 44, 44, 44, 44, 48, 654, 48, - 48, 142, 142, 654, 142, 5, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654 + 660, 224, 250, 225, 248, 226, 227, 228, 233, 230, + 229, 234, 660, 231, 249, 253, 235, 257, 236, 232, + 237, 238, 244, 239, 245, 246, 247, 240, 255, 250, + + 260, 248, 241, 251, 252, 254, 263, 264, 256, 242, + 243, 249, 253, 258, 257, 261, 265, 259, 238, 266, + 239, 262, 267, 660, 240, 255, 660, 260, 660, 241, + 251, 252, 254, 263, 264, 256, 242, 243, 270, 271, + 258, 272, 261, 265, 259, 273, 266, 274, 262, 267, + 145, 145, 145, 268, 275, 269, 269, 269, 276, 277, + 146, 278, 279, 280, 282, 270, 271, 283, 272, 284, + 285, 287, 273, 288, 274, 289, 290, 291, 281, 286, + 292, 275, 294, 295, 293, 276, 277, 146, 278, 279, + 280, 282, 296, 300, 283, 301, 284, 285, 287, 302, + + 288, 303, 289, 290, 291, 281, 286, 292, 297, 294, + 295, 293, 298, 304, 305, 306, 307, 308, 309, 296, + 300, 310, 301, 299, 311, 312, 302, 313, 303, 314, + 315, 316, 317, 318, 319, 297, 320, 321, 322, 298, + 304, 305, 306, 307, 308, 309, 323, 324, 310, 325, + 299, 311, 312, 326, 313, 327, 314, 315, 316, 317, + 318, 319, 328, 320, 321, 322, 331, 329, 332, 333, + 334, 335, 338, 323, 324, 336, 325, 330, 339, 340, + 326, 341, 327, 342, 343, 337, 344, 345, 346, 328, + 347, 348, 349, 331, 329, 332, 333, 334, 335, 338, + + 350, 351, 336, 352, 330, 339, 340, 353, 341, 354, + 342, 343, 337, 344, 345, 346, 355, 347, 348, 349, + 358, 356, 359, 360, 361, 362, 363, 350, 351, 364, + 352, 357, 365, 366, 353, 367, 354, 368, 369, 370, + 371, 372, 373, 355, 374, 375, 376, 358, 356, 359, + 360, 361, 362, 363, 377, 378, 364, 379, 357, 365, + 366, 380, 367, 381, 368, 369, 370, 371, 372, 373, + 382, 374, 375, 376, 383, 384, 387, 385, 388, 391, + 392, 377, 378, 386, 379, 389, 393, 394, 380, 390, + 381, 269, 269, 269, 269, 269, 269, 382, 395, 396, + + 397, 383, 384, 387, 385, 388, 391, 392, 398, 399, + 386, 400, 389, 393, 394, 401, 390, 402, 403, 404, + 405, 406, 407, 408, 409, 395, 396, 397, 410, 411, + 412, 413, 414, 415, 416, 398, 399, 417, 400, 418, + 419, 420, 401, 421, 402, 403, 404, 405, 406, 407, + 408, 409, 422, 423, 424, 410, 411, 412, 413, 414, + 415, 416, 425, 426, 417, 427, 418, 419, 420, 428, + 421, 429, 430, 431, 432, 433, 434, 435, 436, 422, + 423, 424, 437, 438, 439, 440, 441, 444, 445, 425, + 426, 446, 427, 447, 448, 442, 428, 449, 429, 430, + + 431, 432, 433, 434, 435, 436, 443, 450, 451, 437, + 438, 439, 440, 441, 444, 445, 452, 453, 446, 454, + 447, 448, 442, 455, 449, 456, 457, 458, 459, 460, + 461, 462, 463, 443, 450, 451, 465, 466, 467, 468, + 469, 470, 471, 452, 453, 472, 454, 473, 464, 474, + 455, 475, 456, 457, 458, 459, 460, 461, 462, 463, + 476, 477, 478, 465, 466, 467, 468, 469, 470, 471, + 479, 480, 472, 481, 473, 464, 474, 482, 475, 483, + 484, 485, 486, 487, 488, 489, 490, 476, 477, 478, + 491, 492, 493, 494, 495, 496, 497, 479, 480, 498, + + 481, 499, 500, 501, 482, 502, 483, 484, 485, 486, + 487, 488, 489, 490, 503, 504, 505, 491, 492, 493, + 494, 495, 496, 497, 506, 507, 498, 508, 499, 500, + 501, 509, 502, 510, 511, 512, 513, 514, 515, 516, + 517, 503, 504, 505, 518, 519, 520, 522, 523, 524, + 525, 506, 507, 526, 508, 527, 528, 529, 509, 530, + 510, 511, 512, 513, 514, 515, 516, 517, 531, 534, + 535, 518, 519, 520, 522, 523, 524, 525, 532, 536, + 526, 533, 527, 528, 529, 537, 530, 538, 539, 540, + 541, 542, 543, 544, 545, 531, 534, 535, 546, 547, + + 548, 549, 550, 551, 552, 532, 536, 553, 533, 554, + 555, 556, 537, 557, 538, 539, 540, 541, 542, 543, + 544, 545, 558, 559, 560, 546, 547, 548, 549, 550, + 551, 552, 561, 562, 553, 563, 554, 555, 556, 564, + 557, 565, 566, 567, 568, 569, 570, 572, 573, 558, + 559, 560, 574, 575, 576, 577, 578, 579, 580, 561, + 562, 581, 563, 582, 583, 584, 564, 585, 565, 566, + 567, 568, 569, 570, 572, 573, 586, 587, 589, 574, + 575, 576, 577, 578, 579, 580, 590, 591, 581, 592, + 582, 583, 584, 593, 585, 594, 595, 596, 597, 598, + + 599, 600, 601, 586, 587, 589, 602, 603, 604, 605, + 606, 607, 608, 590, 591, 609, 592, 610, 611, 612, + 593, 613, 594, 595, 596, 597, 598, 599, 600, 601, + 614, 615, 616, 602, 603, 604, 605, 606, 607, 608, + 617, 618, 609, 620, 610, 611, 612, 621, 613, 622, + 623, 624, 625, 626, 627, 628, 629, 614, 615, 616, + 630, 631, 632, 633, 634, 635, 636, 617, 618, 637, + 620, 638, 639, 640, 621, 641, 622, 623, 624, 625, + 626, 627, 628, 629, 642, 643, 644, 630, 631, 632, + 633, 634, 635, 636, 645, 646, 637, 647, 638, 639, + + 640, 648, 641, 649, 650, 651, 652, 653, 654, 655, + 656, 642, 643, 644, 657, 658, 659, 660, 660, 660, + 660, 645, 646, 660, 647, 660, 660, 660, 648, 660, + 649, 650, 651, 652, 653, 654, 655, 656, 660, 660, + 660, 657, 658, 659, 44, 44, 44, 44, 48, 660, + 48, 48, 142, 142, 660, 142, 5, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660 } ; -static const flex_int16_t yy_chk[1415] = +static const flex_int16_t yy_chk[1426] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1104,9 +1107,9 @@ static const flex_int16_t yy_chk[1415] = 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 8, 8, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 19, 28, 19, 21, 23, 23, - 23, 19, 46, 46, 21, 21, 657, 25, 29, 567, + 23, 19, 46, 46, 21, 21, 663, 25, 29, 571, - 23, 21, 518, 25, 21, 35, 43, 490, 426, 41, + 23, 21, 521, 25, 21, 35, 43, 493, 428, 41, 41, 19, 28, 19, 21, 23, 23, 23, 19, 20, 20, 21, 21, 20, 25, 29, 20, 23, 21, 20, 25, 21, 35, 43, 22, 20, 41, 41, 22, 20, @@ -1147,113 +1150,114 @@ static const flex_int16_t yy_chk[1415] = 115, 117, 116, 115, 118, 98, 116, 98, 98, 119, 107, 120, 116, 121, 109, 123, 110, 124, 125, 126, 0, 111, 128, 112, 127, 113, 114, 115, 117, 116, - 115, 118, 0, 116, 127, 131, 119, 132, 120, 116, - 121, 122, 123, 122, 124, 125, 126, 122, 133, 128, - - 135, 127, 122, 129, 129, 131, 137, 138, 139, 122, - 122, 127, 131, 134, 132, 136, 140, 134, 122, 141, - 122, 136, 0, 0, 122, 133, 148, 135, 0, 122, - 129, 129, 131, 137, 138, 139, 122, 122, 149, 153, - 134, 154, 136, 140, 134, 155, 141, 156, 136, 145, - 145, 145, 146, 148, 146, 146, 146, 157, 157, 145, - 158, 160, 161, 162, 163, 149, 153, 164, 154, 165, - 166, 167, 155, 168, 156, 169, 170, 161, 165, 171, - 172, 173, 174, 171, 157, 157, 145, 158, 160, 161, - 162, 163, 176, 177, 164, 178, 165, 166, 167, 0, - - 168, 179, 169, 170, 161, 165, 171, 172, 173, 174, - 171, 175, 180, 181, 183, 175, 184, 185, 186, 176, - 177, 186, 178, 187, 188, 189, 175, 190, 179, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 175, 180, - 181, 183, 175, 184, 185, 186, 200, 201, 186, 202, - 187, 188, 189, 175, 190, 203, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 204, 206, 205, 208, 209, - 210, 211, 213, 200, 201, 212, 202, 205, 214, 215, - 216, 217, 203, 218, 220, 212, 221, 222, 223, 224, - 225, 226, 204, 206, 205, 208, 209, 210, 211, 213, - - 227, 228, 212, 229, 205, 214, 215, 216, 217, 230, - 218, 220, 212, 221, 222, 223, 224, 225, 226, 231, - 233, 232, 235, 236, 237, 238, 239, 227, 228, 240, - 229, 232, 241, 242, 244, 245, 230, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 231, 233, 232, 235, - 236, 237, 238, 239, 256, 255, 240, 255, 232, 241, - 242, 244, 245, 258, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 259, 260, 262, 263, 261, 265, 266, - 269, 256, 255, 261, 255, 264, 267, 267, 267, 264, - 258, 268, 268, 268, 270, 271, 272, 273, 274, 276, - - 259, 260, 262, 263, 261, 265, 266, 269, 277, 278, - 261, 281, 264, 282, 283, 284, 264, 285, 286, 287, - 289, 270, 271, 272, 273, 274, 276, 290, 291, 292, - 294, 295, 296, 297, 298, 277, 278, 300, 281, 301, - 282, 283, 284, 304, 285, 286, 287, 289, 305, 306, - 307, 308, 309, 310, 290, 291, 292, 294, 295, 296, - 297, 298, 311, 312, 300, 313, 301, 314, 315, 318, - 304, 319, 320, 321, 322, 305, 306, 307, 308, 309, - 310, 323, 324, 325, 326, 327, 328, 333, 335, 311, - 312, 338, 313, 339, 314, 315, 318, 328, 319, 320, - - 321, 322, 340, 341, 342, 344, 345, 346, 323, 324, - 325, 326, 327, 328, 333, 335, 347, 349, 338, 350, - 339, 351, 352, 353, 328, 354, 355, 356, 359, 340, - 341, 342, 344, 345, 346, 357, 360, 361, 362, 363, - 364, 365, 367, 347, 349, 368, 350, 369, 351, 352, - 353, 357, 354, 355, 356, 359, 370, 373, 374, 375, - 377, 378, 357, 360, 361, 362, 363, 364, 365, 367, - 379, 380, 368, 382, 369, 383, 384, 385, 357, 386, - 388, 390, 392, 370, 373, 374, 375, 377, 378, 393, - 394, 395, 396, 397, 398, 399, 400, 379, 380, 402, - - 382, 403, 383, 384, 385, 404, 386, 388, 390, 392, - 405, 406, 407, 409, 410, 411, 393, 394, 395, 396, - 397, 398, 399, 400, 412, 413, 402, 414, 403, 416, - 417, 418, 404, 419, 420, 421, 422, 405, 406, 407, - 409, 410, 411, 423, 424, 428, 429, 430, 431, 433, - 434, 412, 413, 436, 414, 437, 416, 417, 418, 439, - 419, 420, 421, 422, 440, 441, 443, 445, 441, 446, - 423, 424, 428, 429, 430, 431, 433, 434, 447, 448, - 436, 449, 437, 450, 453, 454, 439, 456, 457, 458, - 459, 440, 441, 443, 445, 441, 446, 460, 461, 464, - - 465, 466, 467, 468, 469, 447, 448, 470, 449, 471, - 450, 453, 454, 472, 456, 457, 458, 459, 473, 474, - 475, 476, 478, 479, 460, 461, 464, 465, 466, 467, - 468, 469, 481, 482, 470, 483, 471, 484, 488, 489, - 472, 494, 496, 498, 499, 473, 474, 475, 476, 478, - 479, 500, 501, 503, 504, 505, 506, 508, 509, 481, - 482, 511, 483, 513, 484, 488, 489, 515, 494, 496, - 498, 499, 517, 520, 525, 526, 528, 529, 500, 501, - 503, 504, 505, 506, 508, 509, 530, 531, 511, 533, - 513, 535, 537, 538, 515, 539, 540, 541, 542, 517, - - 520, 525, 526, 528, 529, 543, 544, 545, 546, 548, - 549, 551, 552, 530, 531, 555, 533, 556, 535, 537, - 538, 557, 539, 540, 541, 542, 558, 562, 563, 569, - 570, 574, 543, 544, 545, 546, 548, 549, 551, 552, - 575, 578, 555, 579, 556, 580, 585, 589, 557, 590, - 594, 595, 596, 558, 562, 563, 569, 570, 574, 600, - 601, 603, 605, 607, 608, 609, 611, 575, 578, 613, - 579, 616, 580, 585, 589, 617, 590, 594, 595, 596, - 619, 621, 623, 629, 633, 634, 600, 601, 603, 605, - 607, 608, 609, 611, 635, 636, 613, 637, 616, 642, - - 643, 645, 617, 649, 650, 652, 0, 619, 621, 623, - 629, 633, 634, 0, 0, 0, 0, 0, 0, 0, - 0, 635, 636, 0, 637, 0, 642, 643, 645, 0, - 649, 650, 652, 655, 655, 655, 655, 656, 0, 656, - 656, 658, 658, 0, 658, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - - 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, - 654, 654, 654, 654 + 115, 118, 0, 116, 127, 131, 119, 133, 120, 116, + 121, 122, 123, 122, 124, 125, 126, 122, 132, 128, + + 135, 127, 122, 129, 129, 131, 137, 138, 132, 122, + 122, 127, 131, 134, 133, 136, 139, 134, 122, 140, + 122, 136, 141, 0, 122, 132, 0, 135, 0, 122, + 129, 129, 131, 137, 138, 132, 122, 122, 148, 149, + 134, 153, 136, 139, 134, 154, 140, 155, 136, 141, + 145, 145, 145, 146, 156, 146, 146, 146, 157, 157, + 145, 158, 160, 161, 162, 148, 149, 163, 153, 164, + 165, 166, 154, 167, 155, 168, 169, 170, 161, 165, + 171, 156, 172, 173, 171, 157, 157, 145, 158, 160, + 161, 162, 174, 176, 163, 177, 164, 165, 166, 178, + + 167, 179, 168, 169, 170, 161, 165, 171, 175, 172, + 173, 171, 175, 180, 181, 183, 184, 185, 186, 174, + 176, 186, 177, 175, 187, 188, 178, 189, 179, 190, + 191, 192, 193, 194, 195, 175, 196, 197, 198, 175, + 180, 181, 183, 184, 185, 186, 199, 200, 186, 201, + 175, 187, 188, 202, 189, 203, 190, 191, 192, 193, + 194, 195, 204, 196, 197, 198, 206, 205, 208, 209, + 210, 211, 213, 199, 200, 212, 201, 205, 214, 215, + 202, 216, 203, 217, 218, 212, 220, 221, 222, 204, + 223, 224, 225, 206, 205, 208, 209, 210, 211, 213, + + 226, 227, 212, 228, 205, 214, 215, 229, 216, 230, + 217, 218, 212, 220, 221, 222, 231, 223, 224, 225, + 233, 232, 235, 236, 237, 238, 239, 226, 227, 240, + 228, 232, 241, 242, 229, 244, 230, 245, 246, 247, + 248, 249, 250, 231, 251, 252, 253, 233, 232, 235, + 236, 237, 238, 239, 254, 255, 240, 255, 232, 241, + 242, 256, 244, 257, 245, 246, 247, 248, 249, 250, + 259, 251, 252, 253, 260, 261, 263, 262, 264, 266, + 267, 254, 255, 262, 255, 265, 270, 271, 256, 265, + 257, 268, 268, 268, 269, 269, 269, 259, 272, 273, + + 274, 260, 261, 263, 262, 264, 266, 267, 275, 277, + 262, 278, 265, 270, 271, 279, 265, 282, 283, 284, + 285, 286, 287, 288, 290, 272, 273, 274, 291, 292, + 293, 295, 296, 297, 298, 275, 277, 299, 278, 301, + 302, 305, 279, 306, 282, 283, 284, 285, 286, 287, + 288, 290, 307, 308, 309, 291, 292, 293, 295, 296, + 297, 298, 310, 311, 299, 312, 301, 302, 305, 313, + 306, 314, 315, 316, 319, 320, 321, 322, 323, 307, + 308, 309, 324, 325, 326, 327, 328, 334, 336, 310, + 311, 339, 312, 340, 341, 329, 313, 342, 314, 315, + + 316, 319, 320, 321, 322, 323, 329, 343, 345, 324, + 325, 326, 327, 328, 334, 336, 346, 347, 339, 348, + 340, 341, 329, 350, 342, 351, 352, 353, 354, 355, + 356, 357, 358, 329, 343, 345, 360, 361, 362, 363, + 364, 365, 366, 346, 347, 368, 348, 369, 358, 370, + 350, 371, 351, 352, 353, 354, 355, 356, 357, 358, + 374, 375, 376, 360, 361, 362, 363, 364, 365, 366, + 378, 379, 368, 380, 369, 358, 370, 381, 371, 382, + 384, 385, 386, 387, 388, 390, 392, 374, 375, 376, + 394, 395, 396, 397, 398, 399, 400, 378, 379, 401, + + 380, 402, 404, 405, 381, 406, 382, 384, 385, 386, + 387, 388, 390, 392, 407, 408, 409, 394, 395, 396, + 397, 398, 399, 400, 411, 412, 401, 413, 402, 404, + 405, 414, 406, 415, 416, 418, 419, 420, 421, 422, + 423, 407, 408, 409, 424, 425, 426, 430, 431, 432, + 433, 411, 412, 435, 413, 436, 438, 439, 414, 441, + 415, 416, 418, 419, 420, 421, 422, 423, 442, 445, + 447, 424, 425, 426, 430, 431, 432, 433, 443, 448, + 435, 443, 436, 438, 439, 449, 441, 450, 451, 452, + 455, 456, 458, 459, 460, 442, 445, 447, 461, 462, + + 463, 466, 467, 468, 469, 443, 448, 470, 443, 471, + 472, 473, 449, 474, 450, 451, 452, 455, 456, 458, + 459, 460, 475, 476, 477, 461, 462, 463, 466, 467, + 468, 469, 478, 480, 470, 481, 471, 472, 473, 482, + 474, 484, 485, 486, 487, 491, 492, 497, 499, 475, + 476, 477, 501, 502, 503, 504, 506, 507, 508, 478, + 480, 509, 481, 511, 512, 514, 482, 516, 484, 485, + 486, 487, 491, 492, 497, 499, 518, 520, 523, 501, + 502, 503, 504, 506, 507, 508, 528, 529, 509, 531, + 511, 512, 514, 532, 516, 533, 534, 536, 538, 540, + + 541, 542, 543, 518, 520, 523, 544, 545, 546, 547, + 548, 549, 551, 528, 529, 552, 531, 554, 555, 558, + 532, 559, 533, 534, 536, 538, 540, 541, 542, 543, + 560, 561, 563, 544, 545, 546, 547, 548, 549, 551, + 566, 567, 552, 573, 554, 555, 558, 574, 559, 578, + 579, 582, 583, 584, 589, 593, 594, 560, 561, 563, + 598, 599, 600, 604, 605, 607, 609, 566, 567, 611, + 573, 612, 613, 615, 574, 616, 578, 579, 582, 583, + 584, 589, 593, 594, 618, 621, 622, 598, 599, 600, + 604, 605, 607, 609, 624, 626, 611, 628, 612, 613, + + 615, 634, 616, 638, 639, 640, 642, 643, 648, 649, + 651, 618, 621, 622, 655, 656, 658, 0, 0, 0, + 0, 624, 626, 0, 628, 0, 0, 0, 634, 0, + 638, 639, 640, 642, 643, 648, 649, 651, 0, 0, + 0, 655, 656, 658, 661, 661, 661, 661, 662, 0, + 662, 662, 664, 664, 0, 664, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660 } ; -static const flex_int16_t yy_rule_linenum[188] = +static const flex_int16_t yy_rule_linenum[189] = { 0, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, @@ -1273,8 +1277,8 @@ static const flex_int16_t yy_rule_linenum[188] = 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 202, 203, 204, 205, 206, 208, 210, 211, 216, - 226, 235, 240, 241, 242, 243, 246 + 200, 201, 203, 204, 205, 206, 207, 209, 211, 212, + 217, 227, 236, 241, 242, 243, 244, 247 } ; /* The intent behind this definition is that it'll catch @@ -1293,10 +1297,10 @@ static const flex_int16_t yy_rule_linenum[188] = static thread_local std::stringstream string_buffer; -#line 1297 "lexer.cpp" +#line 1301 "lexer.cpp" #define YY_NO_INPUT 1 -#line 1300 "lexer.cpp" +#line 1304 "lexer.cpp" #define INITIAL 0 #define SINGLE_QUOTED_STRING 1 @@ -1650,7 +1654,7 @@ YY_DECL #line 27 "lexer.l" -#line 1654 "lexer.cpp" +#line 1658 "lexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1679,13 +1683,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 655 ) + if ( yy_current_state >= 661 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 654 ); + while ( yy_current_state != 660 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -1704,13 +1708,13 @@ YY_DECL { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 188 ) + else if ( yy_act < 189 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 188 ) + else if ( yy_act == 189 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 189 ) + else if ( yy_act == 190 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -2505,92 +2509,92 @@ YY_RULE_SETUP case 156: YY_RULE_SETUP #line 185 "lexer.l" -{ return USING; } +{ return UNSIGNED; } YY_BREAK case 157: YY_RULE_SETUP #line 186 "lexer.l" -{ return UPDATE; } +{ return USING; } YY_BREAK case 158: YY_RULE_SETUP #line 187 "lexer.l" -{ return UUID; } +{ return UPDATE; } YY_BREAK case 159: YY_RULE_SETUP #line 188 "lexer.l" -{ return USE; } +{ return UUID; } YY_BREAK case 160: YY_RULE_SETUP #line 189 "lexer.l" -{ return VALUES; } +{ return USE; } YY_BREAK case 161: YY_RULE_SETUP #line 190 "lexer.l" -{ return VARIABLE; } +{ return VALUES; } YY_BREAK case 162: YY_RULE_SETUP #line 191 "lexer.l" -{ return VARIABLES; } +{ return VARIABLE; } YY_BREAK case 163: YY_RULE_SETUP #line 192 "lexer.l" -{ return VARCHAR; } +{ return VARIABLES; } YY_BREAK case 164: YY_RULE_SETUP #line 193 "lexer.l" -{ return VECTOR; } +{ return VARCHAR; } YY_BREAK case 165: YY_RULE_SETUP #line 194 "lexer.l" -{ return VIEW; } +{ return VECTOR; } YY_BREAK case 166: YY_RULE_SETUP #line 195 "lexer.l" -{ return VIEWS; } +{ return VIEW; } YY_BREAK case 167: YY_RULE_SETUP #line 196 "lexer.l" -{ return WHEN; } +{ return VIEWS; } YY_BREAK case 168: YY_RULE_SETUP #line 197 "lexer.l" -{ return WHERE; } +{ return WHEN; } YY_BREAK case 169: YY_RULE_SETUP #line 198 "lexer.l" -{ return WITH; } +{ return WHERE; } YY_BREAK case 170: YY_RULE_SETUP #line 199 "lexer.l" -{ return YEAR; } +{ return WITH; } YY_BREAK case 171: YY_RULE_SETUP #line 200 "lexer.l" -{ return YEARS; } +{ return YEAR; } YY_BREAK case 172: YY_RULE_SETUP -#line 202 "lexer.l" -{ return EQUAL; } +#line 201 "lexer.l" +{ return YEARS; } YY_BREAK case 173: YY_RULE_SETUP #line 203 "lexer.l" -{ return NOT_EQ; } +{ return EQUAL; } YY_BREAK case 174: YY_RULE_SETUP @@ -2600,31 +2604,36 @@ YY_RULE_SETUP case 175: YY_RULE_SETUP #line 205 "lexer.l" -{ return LESS_EQ; } +{ return NOT_EQ; } YY_BREAK case 176: YY_RULE_SETUP #line 206 "lexer.l" -{ return GREATER_EQ; } +{ return LESS_EQ; } YY_BREAK case 177: YY_RULE_SETUP -#line 208 "lexer.l" -{ return yytext[0]; } +#line 207 "lexer.l" +{ return GREATER_EQ; } YY_BREAK case 178: -#line 211 "lexer.l" +YY_RULE_SETUP +#line 209 "lexer.l" +{ return yytext[0]; } + YY_BREAK case 179: +#line 212 "lexer.l" +case 180: YY_RULE_SETUP -#line 211 "lexer.l" +#line 212 "lexer.l" { yylval->double_value = atof(yytext); return DOUBLE_VALUE; } YY_BREAK -case 180: +case 181: YY_RULE_SETUP -#line 216 "lexer.l" +#line 217 "lexer.l" { errno = 0; yylval->long_value = strtoll(yytext, nullptr, 0); @@ -2635,9 +2644,9 @@ YY_RULE_SETUP return LONG_VALUE; } YY_BREAK -case 181: +case 182: YY_RULE_SETUP -#line 226 "lexer.l" +#line 227 "lexer.l" { // total length - 2 of quota + 1 null char long str_len = strlen(yytext) - 1; @@ -2647,50 +2656,50 @@ YY_RULE_SETUP return IDENTIFIER; } YY_BREAK -case 182: +case 183: YY_RULE_SETUP -#line 235 "lexer.l" +#line 236 "lexer.l" { yylval->str_value = strdup(yytext); return IDENTIFIER; } YY_BREAK -case 183: -YY_RULE_SETUP -#line 240 "lexer.l" -{ BEGIN SINGLE_QUOTED_STRING; string_buffer.clear(); string_buffer.str(""); } // Clear strbuf manually, see #170 - YY_BREAK case 184: YY_RULE_SETUP #line 241 "lexer.l" -{ string_buffer << '\''; } +{ BEGIN SINGLE_QUOTED_STRING; string_buffer.clear(); string_buffer.str(""); } // Clear strbuf manually, see #170 YY_BREAK case 185: -/* rule 185 can match eol */ YY_RULE_SETUP #line 242 "lexer.l" -{ string_buffer << yytext; } +{ string_buffer << '\''; } YY_BREAK case 186: +/* rule 186 can match eol */ YY_RULE_SETUP #line 243 "lexer.l" +{ string_buffer << yytext; } + YY_BREAK +case 187: +YY_RULE_SETUP +#line 244 "lexer.l" { BEGIN INITIAL; yylval->str_value = strdup(string_buffer.str().c_str()); return STRING; } YY_BREAK case YY_STATE_EOF(SINGLE_QUOTED_STRING): -#line 244 "lexer.l" +#line 245 "lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } YY_BREAK -case 187: +case 188: YY_RULE_SETUP -#line 246 "lexer.l" +#line 247 "lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } YY_BREAK -case 188: +case 189: YY_RULE_SETUP -#line 248 "lexer.l" +#line 249 "lexer.l" ECHO; YY_BREAK -#line 2694 "lexer.cpp" +#line 2703 "lexer.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3013,7 +3022,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 655 ) + if ( yy_current_state >= 661 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3047,11 +3056,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 655 ) + if ( yy_current_state >= 661 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 654); + yy_is_jam = (yy_current_state == 660); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -3988,7 +3997,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) /* %ok-for-header */ -#line 248 "lexer.l" +#line 249 "lexer.l" int yyerror(const char *msg) { diff --git a/src/parser/lexer.h b/src/parser/lexer.h index 88d12d4603..c8b4018e40 100644 --- a/src/parser/lexer.h +++ b/src/parser/lexer.h @@ -846,7 +846,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 248 "lexer.l" +#line 249 "lexer.l" #line 853 "lexer.h" diff --git a/src/parser/lexer.l b/src/parser/lexer.l index ce40516109..6a7c01ef52 100644 --- a/src/parser/lexer.l +++ b/src/parser/lexer.l @@ -182,6 +182,7 @@ TRANSACTIONS { return TRANSACTIONS; } TRUE { return TRUE; } UNION { return UNION; } UNIQUE { return UNIQUE; } +UNSIGNED { return UNSIGNED; } USING { return USING; } UPDATE { return UPDATE; } UUID { return UUID; } diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 34f64b3462..e0bf39156e 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -218,211 +218,212 @@ enum yysymbol_kind_t YYSYMBOL_DATETIME = 104, /* DATETIME */ YYSYMBOL_FLOAT16 = 105, /* FLOAT16 */ YYSYMBOL_BFLOAT16 = 106, /* BFLOAT16 */ - YYSYMBOL_TIMESTAMP = 107, /* TIMESTAMP */ - YYSYMBOL_UUID = 108, /* UUID */ - YYSYMBOL_POINT = 109, /* POINT */ - YYSYMBOL_LINE = 110, /* LINE */ - YYSYMBOL_LSEG = 111, /* LSEG */ - YYSYMBOL_BOX = 112, /* BOX */ - YYSYMBOL_PATH = 113, /* PATH */ - YYSYMBOL_POLYGON = 114, /* POLYGON */ - YYSYMBOL_CIRCLE = 115, /* CIRCLE */ - YYSYMBOL_BLOB = 116, /* BLOB */ - YYSYMBOL_BITMAP = 117, /* BITMAP */ - YYSYMBOL_EMBEDDING = 118, /* EMBEDDING */ - YYSYMBOL_VECTOR = 119, /* VECTOR */ - YYSYMBOL_BIT = 120, /* BIT */ - YYSYMBOL_TEXT = 121, /* TEXT */ - YYSYMBOL_TENSOR = 122, /* TENSOR */ - YYSYMBOL_SPARSE = 123, /* SPARSE */ - YYSYMBOL_TENSORARRAY = 124, /* TENSORARRAY */ - YYSYMBOL_PRIMARY = 125, /* PRIMARY */ - YYSYMBOL_KEY = 126, /* KEY */ - YYSYMBOL_UNIQUE = 127, /* UNIQUE */ - YYSYMBOL_NULLABLE = 128, /* NULLABLE */ - YYSYMBOL_IS = 129, /* IS */ - YYSYMBOL_DEFAULT = 130, /* DEFAULT */ - YYSYMBOL_TRUE = 131, /* TRUE */ - YYSYMBOL_FALSE = 132, /* FALSE */ - YYSYMBOL_INTERVAL = 133, /* INTERVAL */ - YYSYMBOL_SECOND = 134, /* SECOND */ - YYSYMBOL_SECONDS = 135, /* SECONDS */ - YYSYMBOL_MINUTE = 136, /* MINUTE */ - YYSYMBOL_MINUTES = 137, /* MINUTES */ - YYSYMBOL_HOUR = 138, /* HOUR */ - YYSYMBOL_HOURS = 139, /* HOURS */ - YYSYMBOL_DAY = 140, /* DAY */ - YYSYMBOL_DAYS = 141, /* DAYS */ - YYSYMBOL_MONTH = 142, /* MONTH */ - YYSYMBOL_MONTHS = 143, /* MONTHS */ - YYSYMBOL_YEAR = 144, /* YEAR */ - YYSYMBOL_YEARS = 145, /* YEARS */ - YYSYMBOL_EQUAL = 146, /* EQUAL */ - YYSYMBOL_NOT_EQ = 147, /* NOT_EQ */ - YYSYMBOL_LESS_EQ = 148, /* LESS_EQ */ - YYSYMBOL_GREATER_EQ = 149, /* GREATER_EQ */ - YYSYMBOL_BETWEEN = 150, /* BETWEEN */ - YYSYMBOL_AND = 151, /* AND */ - YYSYMBOL_OR = 152, /* OR */ - YYSYMBOL_EXTRACT = 153, /* EXTRACT */ - YYSYMBOL_LIKE = 154, /* LIKE */ - YYSYMBOL_DATA = 155, /* DATA */ - YYSYMBOL_LOG = 156, /* LOG */ - YYSYMBOL_BUFFER = 157, /* BUFFER */ - YYSYMBOL_TRANSACTIONS = 158, /* TRANSACTIONS */ - YYSYMBOL_TRANSACTION = 159, /* TRANSACTION */ - YYSYMBOL_USING = 160, /* USING */ - YYSYMBOL_SESSION = 161, /* SESSION */ - YYSYMBOL_GLOBAL = 162, /* GLOBAL */ - YYSYMBOL_OFF = 163, /* OFF */ - YYSYMBOL_EXPORT = 164, /* EXPORT */ - YYSYMBOL_PROFILE = 165, /* PROFILE */ - YYSYMBOL_CONFIGS = 166, /* CONFIGS */ - YYSYMBOL_CONFIG = 167, /* CONFIG */ - YYSYMBOL_PROFILES = 168, /* PROFILES */ - YYSYMBOL_VARIABLES = 169, /* VARIABLES */ - YYSYMBOL_VARIABLE = 170, /* VARIABLE */ - YYSYMBOL_DELTA = 171, /* DELTA */ - YYSYMBOL_LOGS = 172, /* LOGS */ - YYSYMBOL_CATALOGS = 173, /* CATALOGS */ - YYSYMBOL_SEARCH = 174, /* SEARCH */ - YYSYMBOL_MATCH = 175, /* MATCH */ - YYSYMBOL_MAXSIM = 176, /* MAXSIM */ - YYSYMBOL_QUERY = 177, /* QUERY */ - YYSYMBOL_QUERIES = 178, /* QUERIES */ - YYSYMBOL_FUSION = 179, /* FUSION */ - YYSYMBOL_ROWLIMIT = 180, /* ROWLIMIT */ - YYSYMBOL_NUMBER = 181, /* NUMBER */ - YYSYMBOL_182_ = 182, /* '=' */ - YYSYMBOL_183_ = 183, /* '<' */ - YYSYMBOL_184_ = 184, /* '>' */ - YYSYMBOL_185_ = 185, /* '+' */ - YYSYMBOL_186_ = 186, /* '-' */ - YYSYMBOL_187_ = 187, /* '*' */ - YYSYMBOL_188_ = 188, /* '/' */ - YYSYMBOL_189_ = 189, /* '%' */ - YYSYMBOL_190_ = 190, /* '[' */ - YYSYMBOL_191_ = 191, /* ']' */ - YYSYMBOL_192_ = 192, /* '(' */ - YYSYMBOL_193_ = 193, /* ')' */ - YYSYMBOL_194_ = 194, /* '.' */ - YYSYMBOL_195_ = 195, /* ';' */ - YYSYMBOL_196_ = 196, /* ',' */ - YYSYMBOL_197_ = 197, /* ':' */ - YYSYMBOL_YYACCEPT = 198, /* $accept */ - YYSYMBOL_input_pattern = 199, /* input_pattern */ - YYSYMBOL_statement_list = 200, /* statement_list */ - YYSYMBOL_statement = 201, /* statement */ - YYSYMBOL_explainable_statement = 202, /* explainable_statement */ - YYSYMBOL_create_statement = 203, /* create_statement */ - YYSYMBOL_table_element_array = 204, /* table_element_array */ - YYSYMBOL_table_element = 205, /* table_element */ - YYSYMBOL_table_column = 206, /* table_column */ - YYSYMBOL_column_type = 207, /* column_type */ - YYSYMBOL_column_constraints = 208, /* column_constraints */ - YYSYMBOL_column_constraint = 209, /* column_constraint */ - YYSYMBOL_default_expr = 210, /* default_expr */ - YYSYMBOL_table_constraint = 211, /* table_constraint */ - YYSYMBOL_identifier_array = 212, /* identifier_array */ - YYSYMBOL_delete_statement = 213, /* delete_statement */ - YYSYMBOL_insert_statement = 214, /* insert_statement */ - YYSYMBOL_optional_identifier_array = 215, /* optional_identifier_array */ - YYSYMBOL_explain_statement = 216, /* explain_statement */ - YYSYMBOL_explain_type = 217, /* explain_type */ - YYSYMBOL_update_statement = 218, /* update_statement */ - YYSYMBOL_update_expr_array = 219, /* update_expr_array */ - YYSYMBOL_update_expr = 220, /* update_expr */ - YYSYMBOL_drop_statement = 221, /* drop_statement */ - YYSYMBOL_copy_statement = 222, /* copy_statement */ - YYSYMBOL_select_statement = 223, /* select_statement */ - YYSYMBOL_select_with_paren = 224, /* select_with_paren */ - YYSYMBOL_select_without_paren = 225, /* select_without_paren */ - YYSYMBOL_select_clause_with_modifier = 226, /* select_clause_with_modifier */ - YYSYMBOL_select_clause_without_modifier_paren = 227, /* select_clause_without_modifier_paren */ - YYSYMBOL_select_clause_without_modifier = 228, /* select_clause_without_modifier */ - YYSYMBOL_order_by_clause = 229, /* order_by_clause */ - YYSYMBOL_order_by_expr_list = 230, /* order_by_expr_list */ - YYSYMBOL_order_by_expr = 231, /* order_by_expr */ - YYSYMBOL_order_by_type = 232, /* order_by_type */ - YYSYMBOL_limit_expr = 233, /* limit_expr */ - YYSYMBOL_offset_expr = 234, /* offset_expr */ - YYSYMBOL_distinct = 235, /* distinct */ - YYSYMBOL_from_clause = 236, /* from_clause */ - YYSYMBOL_search_clause = 237, /* search_clause */ - YYSYMBOL_where_clause = 238, /* where_clause */ - YYSYMBOL_having_clause = 239, /* having_clause */ - YYSYMBOL_group_by_clause = 240, /* group_by_clause */ - YYSYMBOL_set_operator = 241, /* set_operator */ - YYSYMBOL_table_reference = 242, /* table_reference */ - YYSYMBOL_table_reference_unit = 243, /* table_reference_unit */ - YYSYMBOL_table_reference_name = 244, /* table_reference_name */ - YYSYMBOL_table_name = 245, /* table_name */ - YYSYMBOL_table_alias = 246, /* table_alias */ - YYSYMBOL_with_clause = 247, /* with_clause */ - YYSYMBOL_with_expr_list = 248, /* with_expr_list */ - YYSYMBOL_with_expr = 249, /* with_expr */ - YYSYMBOL_join_clause = 250, /* join_clause */ - YYSYMBOL_join_type = 251, /* join_type */ - YYSYMBOL_show_statement = 252, /* show_statement */ - YYSYMBOL_flush_statement = 253, /* flush_statement */ - YYSYMBOL_optimize_statement = 254, /* optimize_statement */ - YYSYMBOL_command_statement = 255, /* command_statement */ - YYSYMBOL_compact_statement = 256, /* compact_statement */ - YYSYMBOL_expr_array = 257, /* expr_array */ - YYSYMBOL_expr_array_list = 258, /* expr_array_list */ - YYSYMBOL_expr_alias = 259, /* expr_alias */ - YYSYMBOL_expr = 260, /* expr */ - YYSYMBOL_operand = 261, /* operand */ - YYSYMBOL_extra_match_tensor_option = 262, /* extra_match_tensor_option */ - YYSYMBOL_match_tensor_expr = 263, /* match_tensor_expr */ - YYSYMBOL_match_vector_expr = 264, /* match_vector_expr */ - YYSYMBOL_match_sparse_expr = 265, /* match_sparse_expr */ - YYSYMBOL_match_text_expr = 266, /* match_text_expr */ - YYSYMBOL_query_expr = 267, /* query_expr */ - YYSYMBOL_fusion_expr = 268, /* fusion_expr */ - YYSYMBOL_sub_search = 269, /* sub_search */ - YYSYMBOL_sub_search_array = 270, /* sub_search_array */ - YYSYMBOL_function_expr = 271, /* function_expr */ - YYSYMBOL_conjunction_expr = 272, /* conjunction_expr */ - YYSYMBOL_between_expr = 273, /* between_expr */ - YYSYMBOL_in_expr = 274, /* in_expr */ - YYSYMBOL_case_expr = 275, /* case_expr */ - YYSYMBOL_case_check_array = 276, /* case_check_array */ - YYSYMBOL_cast_expr = 277, /* cast_expr */ - YYSYMBOL_subquery_expr = 278, /* subquery_expr */ - YYSYMBOL_column_expr = 279, /* column_expr */ - YYSYMBOL_constant_expr = 280, /* constant_expr */ - YYSYMBOL_common_array_expr = 281, /* common_array_expr */ - YYSYMBOL_common_sparse_array_expr = 282, /* common_sparse_array_expr */ - YYSYMBOL_subarray_array_expr = 283, /* subarray_array_expr */ - YYSYMBOL_unclosed_subarray_array_expr = 284, /* unclosed_subarray_array_expr */ - YYSYMBOL_sparse_array_expr = 285, /* sparse_array_expr */ - YYSYMBOL_long_sparse_array_expr = 286, /* long_sparse_array_expr */ - YYSYMBOL_unclosed_long_sparse_array_expr = 287, /* unclosed_long_sparse_array_expr */ - YYSYMBOL_double_sparse_array_expr = 288, /* double_sparse_array_expr */ - YYSYMBOL_unclosed_double_sparse_array_expr = 289, /* unclosed_double_sparse_array_expr */ - YYSYMBOL_empty_array_expr = 290, /* empty_array_expr */ - YYSYMBOL_int_sparse_ele = 291, /* int_sparse_ele */ - YYSYMBOL_float_sparse_ele = 292, /* float_sparse_ele */ - YYSYMBOL_array_expr = 293, /* array_expr */ - YYSYMBOL_long_array_expr = 294, /* long_array_expr */ - YYSYMBOL_unclosed_long_array_expr = 295, /* unclosed_long_array_expr */ - YYSYMBOL_double_array_expr = 296, /* double_array_expr */ - YYSYMBOL_unclosed_double_array_expr = 297, /* unclosed_double_array_expr */ - YYSYMBOL_interval_expr = 298, /* interval_expr */ - YYSYMBOL_copy_option_list = 299, /* copy_option_list */ - YYSYMBOL_copy_option = 300, /* copy_option */ - YYSYMBOL_file_path = 301, /* file_path */ - YYSYMBOL_if_exists = 302, /* if_exists */ - YYSYMBOL_if_not_exists = 303, /* if_not_exists */ - YYSYMBOL_semicolon = 304, /* semicolon */ - YYSYMBOL_if_not_exists_info = 305, /* if_not_exists_info */ - YYSYMBOL_with_index_param_list = 306, /* with_index_param_list */ - YYSYMBOL_optional_table_properties_list = 307, /* optional_table_properties_list */ - YYSYMBOL_index_param_list = 308, /* index_param_list */ - YYSYMBOL_index_param = 309, /* index_param */ - YYSYMBOL_index_info_list = 310, /* index_info_list */ - YYSYMBOL_index_info_list_one_pack = 311 /* index_info_list_one_pack */ + YYSYMBOL_UNSIGNED = 107, /* UNSIGNED */ + YYSYMBOL_TIMESTAMP = 108, /* TIMESTAMP */ + YYSYMBOL_UUID = 109, /* UUID */ + YYSYMBOL_POINT = 110, /* POINT */ + YYSYMBOL_LINE = 111, /* LINE */ + YYSYMBOL_LSEG = 112, /* LSEG */ + YYSYMBOL_BOX = 113, /* BOX */ + YYSYMBOL_PATH = 114, /* PATH */ + YYSYMBOL_POLYGON = 115, /* POLYGON */ + YYSYMBOL_CIRCLE = 116, /* CIRCLE */ + YYSYMBOL_BLOB = 117, /* BLOB */ + YYSYMBOL_BITMAP = 118, /* BITMAP */ + YYSYMBOL_EMBEDDING = 119, /* EMBEDDING */ + YYSYMBOL_VECTOR = 120, /* VECTOR */ + YYSYMBOL_BIT = 121, /* BIT */ + YYSYMBOL_TEXT = 122, /* TEXT */ + YYSYMBOL_TENSOR = 123, /* TENSOR */ + YYSYMBOL_SPARSE = 124, /* SPARSE */ + YYSYMBOL_TENSORARRAY = 125, /* TENSORARRAY */ + YYSYMBOL_PRIMARY = 126, /* PRIMARY */ + YYSYMBOL_KEY = 127, /* KEY */ + YYSYMBOL_UNIQUE = 128, /* UNIQUE */ + YYSYMBOL_NULLABLE = 129, /* NULLABLE */ + YYSYMBOL_IS = 130, /* IS */ + YYSYMBOL_DEFAULT = 131, /* DEFAULT */ + YYSYMBOL_TRUE = 132, /* TRUE */ + YYSYMBOL_FALSE = 133, /* FALSE */ + YYSYMBOL_INTERVAL = 134, /* INTERVAL */ + YYSYMBOL_SECOND = 135, /* SECOND */ + YYSYMBOL_SECONDS = 136, /* SECONDS */ + YYSYMBOL_MINUTE = 137, /* MINUTE */ + YYSYMBOL_MINUTES = 138, /* MINUTES */ + YYSYMBOL_HOUR = 139, /* HOUR */ + YYSYMBOL_HOURS = 140, /* HOURS */ + YYSYMBOL_DAY = 141, /* DAY */ + YYSYMBOL_DAYS = 142, /* DAYS */ + YYSYMBOL_MONTH = 143, /* MONTH */ + YYSYMBOL_MONTHS = 144, /* MONTHS */ + YYSYMBOL_YEAR = 145, /* YEAR */ + YYSYMBOL_YEARS = 146, /* YEARS */ + YYSYMBOL_EQUAL = 147, /* EQUAL */ + YYSYMBOL_NOT_EQ = 148, /* NOT_EQ */ + YYSYMBOL_LESS_EQ = 149, /* LESS_EQ */ + YYSYMBOL_GREATER_EQ = 150, /* GREATER_EQ */ + YYSYMBOL_BETWEEN = 151, /* BETWEEN */ + YYSYMBOL_AND = 152, /* AND */ + YYSYMBOL_OR = 153, /* OR */ + YYSYMBOL_EXTRACT = 154, /* EXTRACT */ + YYSYMBOL_LIKE = 155, /* LIKE */ + YYSYMBOL_DATA = 156, /* DATA */ + YYSYMBOL_LOG = 157, /* LOG */ + YYSYMBOL_BUFFER = 158, /* BUFFER */ + YYSYMBOL_TRANSACTIONS = 159, /* TRANSACTIONS */ + YYSYMBOL_TRANSACTION = 160, /* TRANSACTION */ + YYSYMBOL_USING = 161, /* USING */ + YYSYMBOL_SESSION = 162, /* SESSION */ + YYSYMBOL_GLOBAL = 163, /* GLOBAL */ + YYSYMBOL_OFF = 164, /* OFF */ + YYSYMBOL_EXPORT = 165, /* EXPORT */ + YYSYMBOL_PROFILE = 166, /* PROFILE */ + YYSYMBOL_CONFIGS = 167, /* CONFIGS */ + YYSYMBOL_CONFIG = 168, /* CONFIG */ + YYSYMBOL_PROFILES = 169, /* PROFILES */ + YYSYMBOL_VARIABLES = 170, /* VARIABLES */ + YYSYMBOL_VARIABLE = 171, /* VARIABLE */ + YYSYMBOL_DELTA = 172, /* DELTA */ + YYSYMBOL_LOGS = 173, /* LOGS */ + YYSYMBOL_CATALOGS = 174, /* CATALOGS */ + YYSYMBOL_SEARCH = 175, /* SEARCH */ + YYSYMBOL_MATCH = 176, /* MATCH */ + YYSYMBOL_MAXSIM = 177, /* MAXSIM */ + YYSYMBOL_QUERY = 178, /* QUERY */ + YYSYMBOL_QUERIES = 179, /* QUERIES */ + YYSYMBOL_FUSION = 180, /* FUSION */ + YYSYMBOL_ROWLIMIT = 181, /* ROWLIMIT */ + YYSYMBOL_NUMBER = 182, /* NUMBER */ + YYSYMBOL_183_ = 183, /* '=' */ + YYSYMBOL_184_ = 184, /* '<' */ + YYSYMBOL_185_ = 185, /* '>' */ + YYSYMBOL_186_ = 186, /* '+' */ + YYSYMBOL_187_ = 187, /* '-' */ + YYSYMBOL_188_ = 188, /* '*' */ + YYSYMBOL_189_ = 189, /* '/' */ + YYSYMBOL_190_ = 190, /* '%' */ + YYSYMBOL_191_ = 191, /* '[' */ + YYSYMBOL_192_ = 192, /* ']' */ + YYSYMBOL_193_ = 193, /* '(' */ + YYSYMBOL_194_ = 194, /* ')' */ + YYSYMBOL_195_ = 195, /* '.' */ + YYSYMBOL_196_ = 196, /* ';' */ + YYSYMBOL_197_ = 197, /* ',' */ + YYSYMBOL_198_ = 198, /* ':' */ + YYSYMBOL_YYACCEPT = 199, /* $accept */ + YYSYMBOL_input_pattern = 200, /* input_pattern */ + YYSYMBOL_statement_list = 201, /* statement_list */ + YYSYMBOL_statement = 202, /* statement */ + YYSYMBOL_explainable_statement = 203, /* explainable_statement */ + YYSYMBOL_create_statement = 204, /* create_statement */ + YYSYMBOL_table_element_array = 205, /* table_element_array */ + YYSYMBOL_table_element = 206, /* table_element */ + YYSYMBOL_table_column = 207, /* table_column */ + YYSYMBOL_column_type = 208, /* column_type */ + YYSYMBOL_column_constraints = 209, /* column_constraints */ + YYSYMBOL_column_constraint = 210, /* column_constraint */ + YYSYMBOL_default_expr = 211, /* default_expr */ + YYSYMBOL_table_constraint = 212, /* table_constraint */ + YYSYMBOL_identifier_array = 213, /* identifier_array */ + YYSYMBOL_delete_statement = 214, /* delete_statement */ + YYSYMBOL_insert_statement = 215, /* insert_statement */ + YYSYMBOL_optional_identifier_array = 216, /* optional_identifier_array */ + YYSYMBOL_explain_statement = 217, /* explain_statement */ + YYSYMBOL_explain_type = 218, /* explain_type */ + YYSYMBOL_update_statement = 219, /* update_statement */ + YYSYMBOL_update_expr_array = 220, /* update_expr_array */ + YYSYMBOL_update_expr = 221, /* update_expr */ + YYSYMBOL_drop_statement = 222, /* drop_statement */ + YYSYMBOL_copy_statement = 223, /* copy_statement */ + YYSYMBOL_select_statement = 224, /* select_statement */ + YYSYMBOL_select_with_paren = 225, /* select_with_paren */ + YYSYMBOL_select_without_paren = 226, /* select_without_paren */ + YYSYMBOL_select_clause_with_modifier = 227, /* select_clause_with_modifier */ + YYSYMBOL_select_clause_without_modifier_paren = 228, /* select_clause_without_modifier_paren */ + YYSYMBOL_select_clause_without_modifier = 229, /* select_clause_without_modifier */ + YYSYMBOL_order_by_clause = 230, /* order_by_clause */ + YYSYMBOL_order_by_expr_list = 231, /* order_by_expr_list */ + YYSYMBOL_order_by_expr = 232, /* order_by_expr */ + YYSYMBOL_order_by_type = 233, /* order_by_type */ + YYSYMBOL_limit_expr = 234, /* limit_expr */ + YYSYMBOL_offset_expr = 235, /* offset_expr */ + YYSYMBOL_distinct = 236, /* distinct */ + YYSYMBOL_from_clause = 237, /* from_clause */ + YYSYMBOL_search_clause = 238, /* search_clause */ + YYSYMBOL_where_clause = 239, /* where_clause */ + YYSYMBOL_having_clause = 240, /* having_clause */ + YYSYMBOL_group_by_clause = 241, /* group_by_clause */ + YYSYMBOL_set_operator = 242, /* set_operator */ + YYSYMBOL_table_reference = 243, /* table_reference */ + YYSYMBOL_table_reference_unit = 244, /* table_reference_unit */ + YYSYMBOL_table_reference_name = 245, /* table_reference_name */ + YYSYMBOL_table_name = 246, /* table_name */ + YYSYMBOL_table_alias = 247, /* table_alias */ + YYSYMBOL_with_clause = 248, /* with_clause */ + YYSYMBOL_with_expr_list = 249, /* with_expr_list */ + YYSYMBOL_with_expr = 250, /* with_expr */ + YYSYMBOL_join_clause = 251, /* join_clause */ + YYSYMBOL_join_type = 252, /* join_type */ + YYSYMBOL_show_statement = 253, /* show_statement */ + YYSYMBOL_flush_statement = 254, /* flush_statement */ + YYSYMBOL_optimize_statement = 255, /* optimize_statement */ + YYSYMBOL_command_statement = 256, /* command_statement */ + YYSYMBOL_compact_statement = 257, /* compact_statement */ + YYSYMBOL_expr_array = 258, /* expr_array */ + YYSYMBOL_expr_array_list = 259, /* expr_array_list */ + YYSYMBOL_expr_alias = 260, /* expr_alias */ + YYSYMBOL_expr = 261, /* expr */ + YYSYMBOL_operand = 262, /* operand */ + YYSYMBOL_extra_match_tensor_option = 263, /* extra_match_tensor_option */ + YYSYMBOL_match_tensor_expr = 264, /* match_tensor_expr */ + YYSYMBOL_match_vector_expr = 265, /* match_vector_expr */ + YYSYMBOL_match_sparse_expr = 266, /* match_sparse_expr */ + YYSYMBOL_match_text_expr = 267, /* match_text_expr */ + YYSYMBOL_query_expr = 268, /* query_expr */ + YYSYMBOL_fusion_expr = 269, /* fusion_expr */ + YYSYMBOL_sub_search = 270, /* sub_search */ + YYSYMBOL_sub_search_array = 271, /* sub_search_array */ + YYSYMBOL_function_expr = 272, /* function_expr */ + YYSYMBOL_conjunction_expr = 273, /* conjunction_expr */ + YYSYMBOL_between_expr = 274, /* between_expr */ + YYSYMBOL_in_expr = 275, /* in_expr */ + YYSYMBOL_case_expr = 276, /* case_expr */ + YYSYMBOL_case_check_array = 277, /* case_check_array */ + YYSYMBOL_cast_expr = 278, /* cast_expr */ + YYSYMBOL_subquery_expr = 279, /* subquery_expr */ + YYSYMBOL_column_expr = 280, /* column_expr */ + YYSYMBOL_constant_expr = 281, /* constant_expr */ + YYSYMBOL_common_array_expr = 282, /* common_array_expr */ + YYSYMBOL_common_sparse_array_expr = 283, /* common_sparse_array_expr */ + YYSYMBOL_subarray_array_expr = 284, /* subarray_array_expr */ + YYSYMBOL_unclosed_subarray_array_expr = 285, /* unclosed_subarray_array_expr */ + YYSYMBOL_sparse_array_expr = 286, /* sparse_array_expr */ + YYSYMBOL_long_sparse_array_expr = 287, /* long_sparse_array_expr */ + YYSYMBOL_unclosed_long_sparse_array_expr = 288, /* unclosed_long_sparse_array_expr */ + YYSYMBOL_double_sparse_array_expr = 289, /* double_sparse_array_expr */ + YYSYMBOL_unclosed_double_sparse_array_expr = 290, /* unclosed_double_sparse_array_expr */ + YYSYMBOL_empty_array_expr = 291, /* empty_array_expr */ + YYSYMBOL_int_sparse_ele = 292, /* int_sparse_ele */ + YYSYMBOL_float_sparse_ele = 293, /* float_sparse_ele */ + YYSYMBOL_array_expr = 294, /* array_expr */ + YYSYMBOL_long_array_expr = 295, /* long_array_expr */ + YYSYMBOL_unclosed_long_array_expr = 296, /* unclosed_long_array_expr */ + YYSYMBOL_double_array_expr = 297, /* double_array_expr */ + YYSYMBOL_unclosed_double_array_expr = 298, /* unclosed_double_array_expr */ + YYSYMBOL_interval_expr = 299, /* interval_expr */ + YYSYMBOL_copy_option_list = 300, /* copy_option_list */ + YYSYMBOL_copy_option = 301, /* copy_option */ + YYSYMBOL_file_path = 302, /* file_path */ + YYSYMBOL_if_exists = 303, /* if_exists */ + YYSYMBOL_if_not_exists = 304, /* if_not_exists */ + YYSYMBOL_semicolon = 305, /* semicolon */ + YYSYMBOL_if_not_exists_info = 306, /* if_not_exists_info */ + YYSYMBOL_with_index_param_list = 307, /* with_index_param_list */ + YYSYMBOL_optional_table_properties_list = 308, /* optional_table_properties_list */ + YYSYMBOL_index_param_list = 309, /* index_param_list */ + YYSYMBOL_index_param = 310, /* index_param */ + YYSYMBOL_index_info_list = 311, /* index_info_list */ + YYSYMBOL_index_info_list_one_pack = 312 /* index_info_list_one_pack */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -436,7 +437,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -#line 440 "parser.cpp" +#line 441 "parser.cpp" #ifdef short # undef short @@ -762,19 +763,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 93 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1162 +#define YYLAST 1133 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 198 +#define YYNTOKENS 199 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 114 /* YYNRULES -- Number of rules. */ -#define YYNRULES 435 +#define YYNRULES 437 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 907 +#define YYNSTATES 917 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 436 +#define YYMAXUTOK 437 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -791,13 +792,13 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 189, 2, 2, - 192, 193, 187, 185, 196, 186, 194, 188, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 197, 195, - 183, 182, 184, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 190, 2, 2, + 193, 194, 188, 186, 197, 187, 195, 189, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 198, 196, + 184, 183, 185, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 190, 2, 191, 2, 2, 2, 2, 2, 2, + 2, 191, 2, 192, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -831,7 +832,7 @@ static const yytype_uint8 yytranslate[] = 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181 + 175, 176, 177, 178, 179, 180, 181, 182 }; #if SQLDEBUG @@ -848,40 +849,40 @@ static const yytype_int16 yyrline[] = 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, - 835, 836, 837, 838, 839, 840, 841, 842, 861, 865, - 875, 878, 881, 884, 888, 891, 896, 901, 908, 914, - 924, 940, 974, 987, 990, 997, 1003, 1006, 1009, 1012, - 1015, 1018, 1021, 1024, 1031, 1044, 1048, 1053, 1066, 1079, - 1094, 1109, 1124, 1147, 1200, 1255, 1306, 1309, 1312, 1321, - 1331, 1334, 1338, 1343, 1365, 1368, 1373, 1389, 1392, 1396, - 1400, 1405, 1411, 1414, 1417, 1421, 1425, 1427, 1431, 1433, - 1436, 1440, 1443, 1447, 1452, 1456, 1459, 1463, 1466, 1470, - 1473, 1477, 1480, 1483, 1486, 1494, 1497, 1512, 1512, 1514, - 1528, 1537, 1542, 1551, 1556, 1561, 1567, 1574, 1577, 1581, - 1584, 1589, 1601, 1608, 1622, 1625, 1628, 1631, 1634, 1637, - 1640, 1646, 1650, 1654, 1658, 1662, 1669, 1673, 1677, 1681, - 1686, 1690, 1695, 1699, 1703, 1709, 1715, 1721, 1732, 1743, - 1754, 1766, 1778, 1791, 1805, 1816, 1830, 1846, 1863, 1867, - 1871, 1879, 1883, 1887, 1895, 1906, 1929, 1935, 1940, 1946, - 1952, 1960, 1966, 1972, 1978, 1984, 1992, 1998, 2004, 2010, - 2016, 2024, 2030, 2037, 2054, 2058, 2063, 2067, 2094, 2100, - 2104, 2105, 2106, 2107, 2108, 2110, 2113, 2119, 2122, 2123, - 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2131, 2133, 2136, - 2142, 2161, 2203, 2249, 2267, 2285, 2293, 2304, 2310, 2319, - 2325, 2337, 2340, 2343, 2346, 2349, 2352, 2356, 2360, 2365, - 2373, 2381, 2390, 2397, 2404, 2411, 2418, 2425, 2433, 2441, - 2449, 2457, 2465, 2473, 2481, 2489, 2497, 2505, 2513, 2521, - 2551, 2559, 2568, 2576, 2585, 2593, 2599, 2606, 2612, 2619, - 2624, 2631, 2638, 2646, 2670, 2676, 2682, 2689, 2697, 2704, - 2711, 2716, 2726, 2731, 2736, 2741, 2746, 2751, 2756, 2761, - 2766, 2771, 2774, 2777, 2781, 2784, 2787, 2790, 2794, 2797, - 2800, 2804, 2808, 2813, 2818, 2821, 2825, 2829, 2836, 2843, - 2847, 2854, 2861, 2865, 2869, 2873, 2876, 2880, 2884, 2889, - 2894, 2898, 2903, 2908, 2914, 2920, 2926, 2932, 2938, 2944, - 2950, 2956, 2962, 2968, 2974, 2985, 2989, 2994, 3024, 3034, - 3039, 3044, 3049, 3055, 3059, 3060, 3062, 3063, 3065, 3066, - 3078, 3086, 3090, 3093, 3097, 3100, 3104, 3108, 3113, 3119, - 3129, 3136, 3147, 3151, 3159, 3211 + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, + 863, 867, 877, 880, 883, 886, 890, 893, 898, 903, + 910, 916, 926, 942, 976, 989, 992, 999, 1005, 1008, + 1011, 1014, 1017, 1020, 1023, 1026, 1033, 1046, 1050, 1055, + 1068, 1081, 1096, 1111, 1126, 1149, 1202, 1257, 1308, 1311, + 1314, 1323, 1333, 1336, 1340, 1345, 1367, 1370, 1375, 1391, + 1394, 1398, 1402, 1407, 1413, 1416, 1419, 1423, 1427, 1429, + 1433, 1435, 1438, 1442, 1445, 1449, 1454, 1458, 1461, 1465, + 1468, 1472, 1475, 1479, 1482, 1485, 1488, 1496, 1499, 1514, + 1514, 1516, 1530, 1539, 1544, 1553, 1558, 1563, 1569, 1576, + 1579, 1583, 1586, 1591, 1603, 1610, 1624, 1627, 1630, 1633, + 1636, 1639, 1642, 1648, 1652, 1656, 1660, 1664, 1671, 1675, + 1679, 1683, 1688, 1692, 1697, 1701, 1705, 1711, 1717, 1723, + 1734, 1745, 1756, 1768, 1780, 1793, 1807, 1818, 1832, 1848, + 1865, 1869, 1873, 1881, 1885, 1889, 1897, 1908, 1931, 1937, + 1942, 1948, 1954, 1962, 1968, 1974, 1980, 1986, 1994, 2000, + 2006, 2012, 2018, 2026, 2032, 2039, 2056, 2060, 2065, 2069, + 2096, 2102, 2106, 2107, 2108, 2109, 2110, 2112, 2115, 2121, + 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, + 2135, 2138, 2144, 2163, 2205, 2251, 2269, 2287, 2295, 2306, + 2312, 2321, 2327, 2339, 2342, 2345, 2348, 2351, 2354, 2358, + 2362, 2367, 2375, 2383, 2392, 2399, 2406, 2413, 2420, 2427, + 2435, 2443, 2451, 2459, 2467, 2475, 2483, 2491, 2499, 2507, + 2515, 2523, 2553, 2561, 2570, 2578, 2587, 2595, 2601, 2608, + 2614, 2621, 2626, 2633, 2640, 2648, 2672, 2678, 2684, 2691, + 2699, 2706, 2713, 2718, 2728, 2733, 2738, 2743, 2748, 2753, + 2758, 2763, 2768, 2773, 2776, 2779, 2783, 2786, 2789, 2792, + 2796, 2799, 2802, 2806, 2810, 2815, 2820, 2823, 2827, 2831, + 2838, 2845, 2849, 2856, 2863, 2867, 2871, 2875, 2878, 2882, + 2886, 2891, 2896, 2900, 2905, 2910, 2916, 2922, 2928, 2934, + 2940, 2946, 2952, 2958, 2964, 2970, 2976, 2987, 2991, 2996, + 3026, 3036, 3041, 3046, 3051, 3057, 3061, 3062, 3064, 3065, + 3067, 3068, 3080, 3088, 3092, 3095, 3099, 3102, 3106, 3110, + 3115, 3121, 3131, 3138, 3149, 3153, 3161, 3213 }; #endif @@ -911,7 +912,7 @@ static const char *const yytname[] = "FROM", "TO", "WITH", "DELIMITER", "FORMAT", "HEADER", "CAST", "END", "CASE", "ELSE", "THEN", "WHEN", "BOOLEAN", "INTEGER", "INT", "TINYINT", "SMALLINT", "BIGINT", "HUGEINT", "VARCHAR", "FLOAT", "DOUBLE", "REAL", - "DECIMAL", "DATE", "TIME", "DATETIME", "FLOAT16", "BFLOAT16", + "DECIMAL", "DATE", "TIME", "DATETIME", "FLOAT16", "BFLOAT16", "UNSIGNED", "TIMESTAMP", "UUID", "POINT", "LINE", "LSEG", "BOX", "PATH", "POLYGON", "CIRCLE", "BLOB", "BITMAP", "EMBEDDING", "VECTOR", "BIT", "TEXT", "TENSOR", "SPARSE", "TENSORARRAY", "PRIMARY", "KEY", "UNIQUE", @@ -974,7 +975,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-422) +#define YYTABLE_NINF (-424) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -983,97 +984,98 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 22, 327, 7, 373, 59, 41, 59, 67, 227, 557, - 62, 150, 81, 125, 190, -55, 2, 144, 0, -507, - -507, -507, -507, -507, -507, -507, -507, 329, -507, -507, - 173, -507, -507, -507, -507, -507, 127, 127, 127, 127, - 14, 59, 131, 131, 131, 131, 131, 21, 195, 59, - -7, 216, 220, 222, -507, -507, -507, -507, -507, -507, - -507, 607, 228, 59, -507, -507, -507, -507, -507, 231, - 113, 145, -507, 256, -507, 61, -507, -507, 114, -507, - 59, -507, -507, -507, -507, -14, -507, 211, 98, -507, - 293, 133, 140, -507, 54, -507, 353, -507, -507, 6, - 313, -507, 316, 312, 388, 59, 59, 59, 393, 343, - 219, 348, 417, 59, 59, 59, 431, 439, 444, 390, - 458, 458, 460, 84, 93, 132, -507, -507, -507, -507, - -507, -507, -507, 329, -507, -507, -507, -507, -507, -507, - 239, -507, -507, 475, -507, 477, -507, -507, 478, -507, - 59, 298, 190, 458, -507, -507, -507, -507, 6, -507, - -507, -507, 460, 459, 443, 448, -507, -41, -507, 219, - -507, 59, 517, 63, -507, -507, -507, -507, -507, 467, - -507, 361, -17, -507, 460, -507, -507, 468, 469, 374, - -507, -507, 777, 496, 385, 391, 306, 553, 565, 580, - 581, -507, -507, 589, 404, 221, 412, 413, 605, 605, - -507, 13, 342, 57, -507, 26, 513, -507, -507, -507, + 545, 72, 59, 272, 79, 30, 79, 77, 345, 296, + 98, 154, 148, 191, 200, 53, -17, 230, 48, -507, + -507, -507, -507, -507, -507, -507, -507, 252, -507, -507, + 244, -507, -507, -507, -507, -507, 210, 210, 210, 210, + 35, 79, 215, 215, 215, 215, 215, 82, 284, 79, + -1, 302, 333, 335, -507, -507, -507, -507, -507, -507, + -507, 692, 348, 79, -507, -507, -507, -507, -507, 347, + 263, 290, -507, 354, -507, 194, -507, -507, 224, -507, + 79, -507, -507, -507, -507, -14, -507, 343, 199, -507, + 396, 214, 231, -507, 20, -507, 397, -507, -507, 5, + 362, -507, 382, 374, 450, 79, 79, 79, 459, 409, + 287, 408, 485, 79, 79, 79, 513, 514, 524, 461, + 530, 530, 411, 51, 56, 63, -507, -507, -507, -507, + -507, -507, -507, 252, -507, -507, -507, -507, -507, -507, + 380, -507, -507, 537, -507, 539, -507, -507, 540, -507, + 79, 358, 200, 530, -507, -507, -507, -507, 5, -507, + -507, -507, 411, 507, 503, 493, -507, -43, -507, 287, + -507, 79, 571, 41, -507, -507, -507, -507, -507, 519, + -507, 394, -13, -507, 411, -507, -507, 506, 512, 400, + -507, -507, 797, 504, 401, 402, 303, 592, 596, 597, + 599, -507, -507, 603, 412, 222, 417, 425, 544, 544, + -507, 13, 344, -121, -507, -9, 593, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, - 432, -507, -507, -507, 105, -507, -507, 107, -507, 117, - -507, -507, -507, 136, -507, 139, -507, -507, -507, -507, + 427, -507, -507, -507, -102, -507, -507, -85, -507, 34, + -507, -507, -507, 37, -507, 40, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, - -507, -507, 603, 625, -507, -507, -507, -507, -507, -507, - 544, 173, -507, -507, 451, 455, -20, 460, 460, 582, - -507, 2, 27, 579, 463, -507, 183, 464, -507, 59, - 460, 444, -507, 249, 465, 466, 185, -507, -507, -507, - -507, -507, -507, -507, -507, -507, -507, -507, -507, 605, - 472, 664, 571, 460, 460, 103, 274, -507, -507, -507, - -507, 777, -507, 662, 473, 476, 480, 482, 665, 666, - 178, 178, -507, 457, -507, -507, -507, -507, 483, -66, - 598, 460, 675, 460, 460, -4, 487, 25, 605, 605, - 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, - 605, 605, 23, -507, 494, -507, 684, -507, 688, -507, - 697, -507, 680, 646, 357, 512, -507, 518, -507, -507, - 8, 531, 510, -507, 32, 249, 460, -507, 329, 786, - 584, 521, 223, -507, -507, -507, 2, 517, 463, -507, - -507, 714, 460, 524, -507, 249, -507, 50, 50, 460, - -507, 247, 571, 567, 529, 56, -44, 299, -507, 460, - 460, 648, 460, 723, 24, 460, 255, 283, 430, -507, - -507, 458, -507, -507, -507, 595, 539, 605, 342, 604, - -507, 679, 679, 686, 686, 618, 679, 679, 686, 686, - 178, 178, -507, -507, -507, -507, -507, -507, 536, -507, - 543, -507, -507, -507, 744, 745, -507, 754, -507, 2, - 566, 778, -507, 92, -507, 250, 390, 460, -507, -507, - -507, 249, -507, -507, -507, -507, -507, -507, -507, -507, - -507, -507, -507, 569, -507, -507, -507, -507, -507, -507, - -507, -507, -507, -507, -507, -507, 576, 583, 585, 586, - 587, 152, 591, 517, 735, 27, 329, 301, -507, -507, - 322, 593, 767, 768, 772, 783, -507, 781, 330, -507, - 337, 344, -507, 596, -507, 786, 460, -507, 460, -10, - -12, 605, 88, 592, -507, -93, 106, -507, 790, -507, - 792, -507, -507, 718, 342, 679, 616, 345, -507, 605, - 808, 811, 764, 769, 638, 349, -507, 33, 8, 762, - -507, -507, -507, -507, -507, -507, 763, -507, 820, -507, - -507, -507, -507, -507, -507, -507, -507, 628, 775, -507, - 824, 230, 362, 461, 650, 661, 703, 706, -507, -507, - -16, -507, 712, 517, 354, 653, -507, -507, 694, -507, - 460, -507, -507, -507, -507, -507, -507, 50, -507, -507, - -507, 663, 249, 70, -507, 460, 323, 667, 851, 494, - 668, 707, 709, 711, 713, 365, -507, -507, 664, 853, - 854, 331, -507, 754, 92, 778, 8, 8, 715, 250, - 844, 867, 372, 728, 729, 730, 731, 732, 733, 734, - 736, 737, 738, 739, 740, 741, 742, 743, 746, 747, - 748, 749, 750, 751, 752, 753, 755, 756, 757, 758, - 759, 760, 761, 765, 766, 770, 771, 773, 774, 776, - 779, 780, 782, -507, -507, 141, -507, -507, -507, 377, - -507, 754, 928, 382, -507, -507, -507, 249, -507, 462, - 784, 383, 785, 15, 787, -507, -507, -507, -507, -507, - 50, -507, -507, -507, -507, -507, -507, -507, -507, -507, - -507, 876, 517, -507, 460, 460, -507, -507, 935, 944, - 952, 953, 954, 957, 958, 959, 962, 965, 967, 968, - 971, 973, 976, 978, 979, 980, 981, 982, 983, 984, - 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, - 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, -507, - -507, 401, 544, -507, -507, 1006, -507, 1007, 1008, 1009, - 419, 460, 429, 818, 249, 822, 823, 825, 826, 827, - 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, - 838, 839, 840, 841, 842, 843, 845, 846, 847, 848, - 849, 850, 852, 855, 856, 857, 858, 859, 860, 861, - 862, 863, 864, 865, 866, 868, -507, -507, 821, 869, - 870, 445, -507, 249, -507, -507, -507, -507, -507, -507, + -507, -507, 620, 618, -507, -507, -507, -507, -507, -507, + 546, 244, -507, -507, 433, 437, -6, 411, 411, 561, + -507, -17, 67, 576, 441, -507, 49, 442, -507, 79, + 411, 524, -507, 314, 446, 447, 183, -507, -507, -507, + -507, -507, -507, -507, -507, -507, -507, -507, -507, 544, + 448, 658, 562, 411, 411, -18, 203, -507, -507, -507, + -507, 797, -507, 640, 452, 456, 457, 458, 649, 651, + 250, 250, -507, 466, -507, -507, -507, -507, 463, -42, + 577, 411, 662, 411, 411, -10, 476, 9, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 18, -507, 480, -507, 666, -507, 667, -507, + 668, -507, 674, 637, 423, 492, -507, 494, -507, -507, + 8, 511, 490, -507, 69, 314, 411, -507, 252, 796, + 566, 501, 68, -507, -507, -507, -17, 571, 441, -507, + -507, 693, 411, 510, -507, 314, -507, 15, 15, 411, + -507, 102, 562, 556, 518, 1, -5, 271, -507, 411, + 411, 622, 411, 709, 22, 411, 124, 126, 487, -507, + -507, 530, -507, -507, -507, 564, 521, 544, 344, 610, + -507, 679, 679, 145, 145, 606, 679, 679, 145, 145, + 250, 250, -507, -507, -507, -507, -507, -507, 523, -507, + 527, -507, -507, -507, 739, 740, -507, 744, -507, -17, + 552, 756, -507, 62, -507, 186, 461, 411, -507, -507, + -507, 314, -507, -507, -507, -507, -507, -507, -507, -507, + -507, -507, -507, 557, -507, -507, -507, -507, -507, -507, + -507, -507, -507, -507, -507, -507, 558, 559, 567, 578, + 581, 153, 582, 571, 729, 67, 252, 130, -507, -507, + 171, 591, 753, 764, 781, 783, -507, 791, 178, -507, + 196, 201, -507, 604, -507, 796, 411, -507, 411, -21, + 111, 544, -64, 590, -507, -40, -48, -507, 795, -507, + 798, -507, -507, 720, 344, 679, 607, 207, -507, 544, + 804, 799, 750, 761, 629, 216, -507, 29, 8, 765, + -507, -507, -507, -507, -507, -507, 766, -507, 817, -507, + -507, -507, -507, -507, -507, -507, -507, 626, 776, -507, + 825, 522, 568, 162, 760, 831, 703, 706, -507, -507, + 142, -507, 704, 571, 288, 643, -507, -507, 676, -507, + 411, -507, -507, -507, -507, -507, -507, 15, -507, -507, + -507, 644, 314, 95, -507, 411, 579, 648, 836, 480, + 659, 655, 677, 663, 678, 309, -507, -507, 658, 854, + 855, 134, -507, 744, 62, 756, 8, 8, 680, 186, + 815, 818, 324, 681, 682, 683, 685, 686, 687, 713, + 782, 714, 716, 717, 721, 730, 731, 734, 747, 784, + 748, 749, 751, 752, 754, 757, 758, 759, 762, 763, + 767, 768, 769, 770, 771, 772, 773, 774, 775, 777, + 778, 779, 780, 785, 786, -507, -507, 75, -507, -507, + -507, 329, -507, 744, 873, 331, -507, -507, -507, 314, + -507, 499, 787, 339, 788, 33, 789, -507, -507, -507, + -507, -507, 15, -507, -507, -507, -507, -507, -507, -507, + -507, -507, -507, 839, 571, -507, 411, 411, -507, -507, + 911, 941, 944, 947, 951, 952, 955, 956, 790, 957, + 967, 972, 973, 974, 975, 982, 983, 793, 985, 986, + 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, + 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, + 1007, 1008, 1009, -507, -507, 369, 546, -507, -507, 1012, + -507, 1013, 1014, 1015, 370, 411, 381, 823, 314, 827, + 828, 829, 830, 832, 833, 834, 835, 1019, 837, 838, + 840, 841, 842, 843, 844, 845, 1024, 846, 847, 848, + 849, 850, 851, 852, 853, 856, 857, 858, 859, 860, + 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, -507, -507, 874, 875, 876, 387, -507, 314, + -507, -507, -507, -507, -507, -507, -507, -507, -507, 878, + -507, -507, -507, -507, -507, -507, -507, -507, 880, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, - -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, - -507, -507, -507, -507, -507, -507, 1033, -507, 1040, 544, - 1041, 447, 871, -507, 872, 544, 1054, 1042, 875, 544, - -507, 877, -507, -507, -507, 544, -507 + -507, -507, -507, -507, 1029, -507, 1044, 546, 1043, -507, + -507, 388, 879, -507, 881, 546, 1061, 1064, 883, 546, + -507, 884, -507, -507, -507, 546, -507 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1081,128 +1083,129 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 198, 0, 0, 0, 0, 0, 0, 0, 133, 0, - 0, 0, 0, 0, 0, 0, 198, 0, 419, 3, - 5, 10, 12, 13, 11, 6, 7, 9, 147, 146, - 0, 8, 14, 15, 16, 17, 417, 417, 417, 417, - 417, 0, 415, 415, 415, 415, 415, 191, 0, 0, - 0, 0, 0, 0, 127, 131, 128, 129, 130, 132, - 126, 198, 0, 0, 212, 213, 211, 217, 220, 0, - 0, 0, 214, 0, 216, 0, 238, 240, 0, 218, - 0, 241, 242, 243, 246, 191, 244, 0, 197, 199, - 0, 0, 0, 1, 198, 2, 181, 183, 184, 0, - 170, 152, 158, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 0, 0, 0, 0, 0, 0, 0, 176, - 0, 0, 0, 0, 0, 0, 125, 18, 23, 25, - 24, 19, 20, 22, 21, 26, 27, 28, 29, 226, - 227, 221, 222, 0, 223, 0, 215, 239, 0, 263, - 0, 0, 0, 0, 151, 150, 4, 182, 0, 148, - 149, 169, 0, 0, 166, 0, 30, 0, 31, 124, - 420, 0, 0, 198, 414, 138, 140, 139, 141, 0, - 192, 0, 176, 135, 0, 120, 413, 0, 0, 348, - 352, 355, 356, 0, 0, 0, 0, 0, 0, 0, - 0, 353, 354, 0, 0, 0, 0, 0, 0, 0, - 350, 0, 198, 0, 264, 269, 270, 284, 282, 285, - 283, 286, 287, 279, 274, 273, 272, 280, 281, 271, - 278, 277, 363, 365, 0, 366, 374, 0, 375, 0, - 367, 364, 385, 0, 386, 0, 362, 250, 252, 251, - 248, 249, 255, 257, 256, 253, 254, 260, 262, 261, - 258, 259, 0, 0, 229, 228, 234, 224, 225, 219, - 423, 0, 200, 247, 0, 0, 172, 0, 0, 168, - 416, 198, 0, 0, 0, 118, 0, 0, 122, 0, - 0, 0, 134, 175, 0, 0, 0, 394, 393, 396, - 395, 398, 397, 400, 399, 402, 401, 404, 403, 0, - 0, 314, 198, 0, 0, 0, 0, 357, 358, 359, - 360, 0, 361, 0, 0, 0, 0, 0, 0, 0, - 316, 315, 391, 388, 382, 372, 377, 380, 0, 0, + 200, 0, 0, 0, 0, 0, 0, 0, 135, 0, + 0, 0, 0, 0, 0, 0, 200, 0, 421, 3, + 5, 10, 12, 13, 11, 6, 7, 9, 149, 148, + 0, 8, 14, 15, 16, 17, 419, 419, 419, 419, + 419, 0, 417, 417, 417, 417, 417, 193, 0, 0, + 0, 0, 0, 0, 129, 133, 130, 131, 132, 134, + 128, 200, 0, 0, 214, 215, 213, 219, 222, 0, + 0, 0, 216, 0, 218, 0, 240, 242, 0, 220, + 0, 243, 244, 245, 248, 193, 246, 0, 199, 201, + 0, 0, 0, 1, 200, 2, 183, 185, 186, 0, + 172, 154, 160, 0, 0, 0, 0, 0, 0, 0, + 126, 0, 0, 0, 0, 0, 0, 0, 0, 178, + 0, 0, 0, 0, 0, 0, 127, 18, 23, 25, + 24, 19, 20, 22, 21, 26, 27, 28, 29, 228, + 229, 223, 224, 0, 225, 0, 217, 241, 0, 265, + 0, 0, 0, 0, 153, 152, 4, 184, 0, 150, + 151, 171, 0, 0, 168, 0, 30, 0, 31, 126, + 422, 0, 0, 200, 416, 140, 142, 141, 143, 0, + 194, 0, 178, 137, 0, 122, 415, 0, 0, 350, + 354, 357, 358, 0, 0, 0, 0, 0, 0, 0, + 0, 355, 356, 0, 0, 0, 0, 0, 0, 0, + 352, 0, 200, 0, 266, 271, 272, 286, 284, 287, + 285, 288, 289, 281, 276, 275, 274, 282, 283, 273, + 280, 279, 365, 367, 0, 368, 376, 0, 377, 0, + 369, 366, 387, 0, 388, 0, 364, 252, 254, 253, + 250, 251, 257, 259, 258, 255, 256, 262, 264, 263, + 260, 261, 0, 0, 231, 230, 236, 226, 227, 221, + 425, 0, 202, 249, 0, 0, 174, 0, 0, 170, + 418, 200, 0, 0, 0, 120, 0, 0, 124, 0, + 0, 0, 136, 177, 0, 0, 0, 396, 395, 398, + 397, 400, 399, 402, 401, 404, 403, 406, 405, 0, + 0, 316, 200, 0, 0, 0, 0, 359, 360, 361, + 362, 0, 363, 0, 0, 0, 0, 0, 0, 0, + 318, 317, 393, 390, 384, 374, 379, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 371, 0, 376, 0, 379, 0, 387, - 0, 390, 0, 235, 230, 0, 245, 0, 155, 154, - 0, 174, 157, 159, 164, 165, 0, 153, 33, 0, - 0, 0, 0, 36, 38, 39, 198, 0, 35, 432, - 123, 0, 0, 121, 142, 137, 136, 0, 0, 0, - 309, 0, 198, 0, 0, 0, 0, 0, 339, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, - 275, 0, 265, 268, 332, 333, 0, 0, 198, 0, - 313, 323, 324, 327, 328, 0, 330, 322, 325, 326, - 318, 317, 319, 320, 321, 349, 351, 373, 0, 378, - 0, 381, 389, 392, 0, 0, 231, 0, 201, 198, - 171, 185, 187, 196, 188, 0, 176, 0, 162, 163, - 161, 167, 42, 45, 46, 43, 44, 47, 48, 64, + 0, 0, 0, 373, 0, 378, 0, 381, 0, 389, + 0, 392, 0, 237, 232, 0, 247, 0, 157, 156, + 0, 176, 159, 161, 166, 167, 0, 155, 33, 0, + 0, 0, 0, 36, 38, 39, 200, 0, 35, 434, + 125, 0, 0, 123, 144, 139, 138, 0, 0, 0, + 311, 0, 200, 0, 0, 0, 0, 0, 341, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 278, + 277, 0, 267, 270, 334, 335, 0, 0, 200, 0, + 315, 325, 326, 329, 330, 0, 332, 324, 327, 328, + 320, 319, 321, 322, 323, 351, 353, 375, 0, 380, + 0, 383, 391, 394, 0, 0, 233, 0, 203, 200, + 173, 187, 189, 198, 190, 0, 178, 0, 164, 165, + 163, 169, 42, 45, 46, 43, 44, 47, 48, 64, 49, 51, 50, 67, 54, 55, 56, 52, 53, 57, 58, 59, 60, 61, 62, 63, 0, 0, 0, 0, - 0, 423, 0, 0, 425, 0, 34, 0, 433, 119, - 0, 0, 0, 0, 0, 0, 409, 0, 0, 405, - 0, 0, 310, 0, 344, 0, 0, 337, 0, 0, - 0, 0, 0, 0, 348, 0, 0, 297, 0, 299, - 0, 384, 383, 0, 198, 331, 0, 0, 312, 0, - 0, 0, 236, 232, 428, 0, 426, 0, 0, 0, - 205, 206, 207, 208, 204, 209, 0, 194, 0, 189, - 303, 301, 304, 302, 305, 306, 307, 173, 180, 160, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, - 115, 108, 115, 0, 0, 0, 32, 37, 435, 266, - 0, 411, 410, 408, 407, 412, 145, 0, 143, 311, - 345, 0, 341, 0, 340, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 346, 335, 334, 0, - 0, 0, 422, 0, 196, 186, 0, 0, 193, 0, - 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 425, 0, 0, 427, 0, 34, 0, 435, 121, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 407, + 0, 0, 312, 0, 346, 0, 0, 339, 0, 0, + 0, 0, 0, 0, 350, 0, 0, 299, 0, 301, + 0, 386, 385, 0, 200, 333, 0, 0, 314, 0, + 0, 0, 238, 234, 430, 0, 428, 0, 0, 0, + 207, 208, 209, 210, 206, 211, 0, 196, 0, 191, + 305, 303, 306, 304, 307, 308, 309, 175, 182, 162, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 114, + 117, 110, 117, 0, 0, 0, 32, 37, 437, 268, + 0, 413, 412, 410, 409, 414, 147, 0, 145, 313, + 347, 0, 343, 0, 342, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 348, 337, 336, 0, + 0, 0, 424, 0, 198, 188, 0, 0, 195, 0, + 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 115, 112, 0, 111, 41, + 40, 0, 119, 0, 0, 0, 408, 345, 340, 344, + 331, 0, 0, 0, 0, 0, 0, 370, 372, 371, + 300, 302, 0, 349, 338, 239, 235, 431, 433, 432, + 429, 192, 204, 0, 0, 310, 0, 0, 158, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 113, 110, 0, 109, 41, 40, 0, - 117, 0, 0, 0, 406, 343, 338, 342, 329, 0, - 0, 0, 0, 0, 0, 368, 370, 369, 298, 300, - 0, 347, 336, 237, 233, 429, 431, 430, 427, 190, - 202, 0, 0, 308, 0, 0, 156, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 116, 118, 0, 425, 269, 390, 0, + 297, 0, 0, 0, 0, 0, 0, 181, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, - 116, 0, 423, 267, 388, 0, 295, 0, 0, 0, - 0, 0, 0, 179, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 424, 434, 0, 0, - 0, 0, 144, 203, 195, 65, 71, 72, 69, 70, - 73, 74, 75, 68, 95, 96, 93, 94, 97, 98, - 99, 92, 79, 80, 77, 78, 81, 82, 83, 76, - 103, 104, 101, 102, 105, 106, 107, 100, 87, 88, - 85, 86, 89, 90, 91, 84, 0, 296, 0, 423, - 0, 0, 289, 294, 0, 423, 0, 0, 0, 423, - 292, 0, 288, 290, 293, 423, 291 + 0, 0, 426, 436, 0, 0, 0, 0, 146, 205, + 197, 65, 71, 72, 69, 70, 73, 74, 75, 0, + 68, 96, 97, 94, 95, 98, 99, 100, 0, 93, + 80, 81, 78, 79, 82, 83, 84, 77, 105, 106, + 103, 104, 107, 108, 109, 102, 88, 89, 86, 87, + 90, 91, 92, 85, 0, 298, 0, 425, 0, 76, + 101, 0, 291, 296, 0, 425, 0, 0, 0, 425, + 294, 0, 290, 292, 295, 425, 293 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -507, -507, -507, 969, -507, 1010, -507, 549, -507, 534, - -507, 474, 470, -507, -391, 1012, 1014, 907, -507, -507, - 1016, -507, 788, 1017, 1019, -57, 1065, -15, 812, 924, - -43, -507, -507, 608, -507, -507, -507, -507, -507, -507, - -172, -507, -507, -507, -507, 516, -143, 11, 442, -507, - -507, 936, -507, -507, 1026, 1028, 1029, 1030, 1031, -160, - -507, 789, -184, -186, -507, -462, -450, -436, -433, -432, - -429, 446, -507, -507, -507, -507, -507, -507, 791, -507, - -507, 669, 399, -208, -507, -507, -507, 471, -507, -507, - -507, -507, 479, 793, 794, -105, -507, -507, -507, -507, - 893, -400, 481, -112, 387, 449, -507, -507, -506, -507, - 396, 456, -507, 702 + -507, -507, -507, 976, -507, 1018, -507, 565, -507, 547, + -507, 481, 482, -507, -391, 1022, 1025, 916, -507, -507, + 1026, -507, 800, 1027, 1028, -57, 1074, -15, 821, 935, + -12, -507, -507, 617, -507, -507, -507, -507, -507, -507, + -172, -507, -507, -507, -507, 528, -135, 11, 451, -507, + -507, 945, -507, -507, 1037, 1038, 1039, 1040, 1041, -160, + -507, 792, -184, -186, -507, -459, -449, -438, -435, -433, + -431, 454, -507, -507, -507, -507, -507, -507, 794, -507, + -507, 684, 407, -208, -507, -507, -507, 475, -507, -507, + -507, -507, 477, 745, 738, -89, -507, -507, -507, -507, + 907, -400, 495, -112, 399, 462, -507, -507, -506, -507, + 410, 471, -507, 718 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 17, 18, 19, 126, 20, 392, 393, 394, 511, - 600, 601, 697, 395, 286, 21, 22, 173, 23, 61, + 600, 601, 699, 395, 286, 21, 22, 173, 23, 61, 24, 182, 183, 25, 26, 27, 28, 29, 101, 159, 102, 164, 382, 383, 480, 279, 387, 162, 381, 476, - 185, 736, 651, 99, 470, 471, 472, 473, 579, 30, + 185, 738, 651, 99, 470, 471, 472, 473, 579, 30, 88, 89, 474, 576, 31, 32, 33, 34, 35, 213, - 403, 214, 215, 216, 898, 217, 218, 219, 220, 221, + 403, 214, 215, 216, 908, 217, 218, 219, 220, 221, 222, 586, 587, 223, 224, 225, 226, 227, 316, 228, - 229, 230, 231, 232, 714, 233, 234, 235, 236, 237, + 229, 230, 231, 232, 716, 233, 234, 235, 236, 237, 238, 239, 240, 336, 337, 241, 242, 243, 244, 245, 246, 528, 529, 187, 112, 104, 95, 109, 376, 606, 565, 566, 398, 399 @@ -1214,243 +1217,237 @@ static const yytype_int16 yydefgoto[] = static const yytype_int16 yytable[] = { 293, 92, 276, 335, 133, 602, 517, 311, 530, 188, - 292, 47, 315, 580, 100, 48, 281, 50, 332, 333, - 332, 333, 330, 331, 86, 581, 455, 544, 339, 1, - 389, 2, 3, 4, 5, 6, 7, 8, 9, 582, - 41, 273, 583, 584, 536, 10, 585, 11, 12, 13, - 150, 184, 110, 96, -418, 97, 160, 98, 380, 596, - 119, 1, 47, 2, 3, 4, 5, 6, 7, 8, - 9, 120, 121, 436, 140, 624, 625, 10, -421, 11, - 12, 13, 14, 342, 84, 343, 344, 247, 103, 248, - 249, 149, 80, 384, 385, 577, 252, 287, 253, 254, - 439, 362, 14, 629, 478, 479, 405, 343, 344, 597, - 90, 598, 599, 535, 695, 275, 167, 168, 169, 49, - 522, 523, 604, 311, 176, 177, 178, 430, 85, 415, - 416, 524, 525, 526, 14, 257, 411, 258, 259, 343, - 344, 343, 344, 14, 93, 190, 191, 192, 250, 578, - 437, 282, 390, 440, 391, 706, 457, 255, 288, 434, + 292, 47, 315, 100, 281, 48, 580, 50, 332, 333, + -420, 455, 330, 331, 86, 544, 581, 1, 339, 2, + 3, 4, 5, 6, 7, 8, 9, 582, 332, 333, + 583, 273, 584, 10, 585, 11, 12, 13, 342, 96, + 150, 97, 110, 98, 247, 184, 248, 249, 535, 252, + 119, 253, 254, 14, 624, 577, 257, 436, 258, 259, + 389, 314, 380, 340, 140, 287, 341, 120, 121, 190, + 191, 192, 47, 536, 439, 522, 523, 160, 343, 344, + 363, 149, 41, 384, 385, 364, 524, 525, 526, -423, + 14, 36, 37, 38, 343, 344, 405, 365, 49, 103, + 343, 344, 366, 39, 40, 250, 167, 168, 169, 578, + 255, 14, 604, 311, 176, 177, 178, 260, 80, 415, + 416, 343, 344, 627, 343, 344, 411, 727, 440, 728, + 729, 478, 479, 343, 344, 437, 275, 343, 344, 630, + 282, 84, 430, 343, 344, 362, 457, 629, 288, 434, 435, 270, 441, 442, 443, 444, 445, 446, 447, 448, - 449, 450, 451, 452, 453, 454, 341, 343, 344, 291, - 117, 100, 284, 343, 344, 122, 15, 580, 189, 190, - 191, 192, 314, 87, 16, 94, 260, 338, 158, 581, - 469, 103, 481, 211, 334, 111, 334, 343, 344, 118, - 456, 210, 699, 582, 16, 117, 583, 584, 15, 123, - 585, 343, 344, 124, 388, 125, 644, 596, 51, 52, - 527, 139, 375, 147, 53, 539, 540, 141, 542, 343, - 344, 546, 520, 197, 198, 199, 16, 251, 200, 531, - 340, 555, 409, 341, 343, 344, 256, 343, 344, 146, - 193, 194, 54, 55, 56, 57, 58, 59, 151, 195, - 60, 196, 201, 202, 203, 148, 837, 597, 557, 598, - 599, 262, 142, 143, 627, 263, 264, 197, 198, 199, - 265, 266, 200, 384, 152, 261, 363, 414, 365, 153, - 404, 364, 630, 366, 588, 81, 82, 83, 367, 189, - 190, 191, 192, 368, 144, 145, 201, 202, 203, 553, - 790, 653, 654, 655, 656, 657, 154, 369, 658, 659, - 371, 211, 370, 155, 725, 372, 726, 727, 204, 516, - 324, 792, 325, 326, 327, 189, 190, 191, 192, 96, - 660, 97, 622, 98, 623, 626, 36, 37, 38, 418, - 205, 419, 206, 420, 207, 359, 360, 361, 39, 40, - 208, 209, 210, 638, 157, 211, 400, 212, 410, 401, - 161, 193, 194, 893, 537, 163, 538, 165, 420, 900, - 195, 166, 196, 904, 635, 314, 170, 533, 413, 906, - 343, 344, 42, 43, 44, 465, 466, 171, 197, 198, - 199, 172, 567, 200, 45, 46, 514, 193, 194, 515, - 175, 712, 14, 556, 174, 205, 195, 206, 196, 207, - 113, 114, 115, 116, 179, 551, 552, 201, 202, 203, - 532, 707, 180, 341, 197, 198, 199, 181, 547, 200, - 703, 548, 347, 661, 662, 663, 664, 665, 184, 204, - 666, 667, 186, 189, 190, 191, 192, 332, 784, 348, - 349, 350, 351, 201, 202, 203, 549, 353, 267, 550, - 268, 205, 668, 206, 269, 207, 105, 106, 107, 108, - 271, 208, 209, 210, 608, 204, 211, 401, 212, 189, - 190, 191, 192, 730, 731, 354, 355, 356, 357, 358, - 359, 360, 361, 278, 277, 609, 708, 205, 341, 206, - 285, 207, 710, 616, 280, 717, 617, 208, 209, 210, - 618, 289, 211, 617, 212, 193, 194, 619, 637, 634, - 341, 341, 642, 290, 195, 643, 196, 700, 294, 295, - 401, 794, 669, 670, 671, 672, 673, 317, 722, 674, - 675, 341, 197, 198, 199, 737, 296, 200, 738, 318, - 780, 309, 310, 401, 793, 783, 786, 312, 341, 787, - 195, 676, 196, 313, 319, 320, 62, 63, 345, 64, - 346, 201, 202, 203, 836, 321, 323, 643, 197, 198, - 199, 65, 66, 200, 328, 329, 373, 843, 189, 190, - 191, 192, 842, 204, 1, 617, 2, 3, 4, 5, - 6, 7, 844, 9, 375, 401, 362, 201, 202, 203, - 10, 374, 11, 12, 13, 205, 396, 206, 889, 207, - 895, 890, 347, 896, 378, 208, 209, 210, 379, 204, - 211, 14, 212, 386, 428, 397, 402, 407, 408, 348, - 349, 350, 351, 352, 412, 422, 421, 353, 423, 426, - 427, 205, 424, 206, 425, 207, 429, 431, 433, 438, - 309, 208, 209, 210, 211, 463, 211, 14, 212, 195, - 458, 196, 464, 413, 460, 354, 355, 356, 357, 358, - 359, 360, 361, 462, 467, 475, 477, 197, 198, 199, - 512, 468, 200, 513, 67, 68, 69, 519, 70, 71, - 521, 437, 534, 72, 73, 74, 541, 543, 75, 76, - 77, 554, 558, 560, 78, 79, 201, 202, 203, 413, - 561, 677, 678, 679, 680, 681, 343, 347, 682, 683, - 562, 563, 685, 686, 687, 688, 689, 564, 204, 690, - 691, 590, 568, 605, 348, 349, 350, 351, 591, 559, - 684, 15, 353, 611, 612, 592, 613, 593, 594, 595, - 205, 692, 206, 603, 207, 610, 614, 615, 628, 620, - 208, 209, 210, 347, 631, 211, 632, 212, 633, 16, - 354, 355, 356, 357, 358, 359, 360, 361, 347, 636, - 348, 349, 350, 351, 552, 347, 551, 639, 353, 640, - 641, 646, 647, 648, 649, -422, -422, 350, 351, 650, - 652, 693, 694, -422, -422, -422, 569, -210, 570, 571, - 572, 573, 695, 574, 575, 701, 354, 355, 356, 357, - 358, 359, 360, 361, 702, 711, 705, 709, 713, 723, - 724, -422, 355, 356, 357, 358, 359, 360, 361, -422, - -422, 357, 358, 359, 360, 361, 482, 483, 484, 485, + 449, 450, 451, 452, 453, 454, 16, 197, 198, 199, + 708, 117, 284, 200, 291, 15, 189, 190, 191, 192, + 580, 341, 122, 390, 85, 391, 527, 338, 158, 625, + 581, 469, 481, 87, 211, 334, 456, 201, 202, 203, + 210, 582, 701, 16, 583, 251, 584, 596, 585, 90, + 256, 343, 344, 644, 388, 334, 367, 261, 596, 369, + 93, 368, 371, 375, 370, 539, 540, 372, 542, 51, + 52, 546, 520, 400, 94, 53, 401, 343, 344, 531, + 409, 555, 100, 671, 672, 673, 674, 675, 193, 194, + 676, 677, 514, 343, 344, 515, 211, 195, 597, 196, + 598, 599, 96, 697, 97, 347, 98, 117, 557, 597, + 843, 598, 599, 678, 103, 197, 198, 199, 418, 111, + 419, 200, 420, 384, -424, -424, 532, 414, 118, 341, + 404, 42, 43, 44, 588, 123, 189, 190, 191, 192, + 81, 82, 83, 45, 46, 201, 202, 203, 547, 553, + 549, 548, 794, 550, 608, 62, 63, 401, 64, -424, + -424, 357, 358, 359, 360, 361, 124, 204, 125, 516, + 65, 66, 324, 796, 325, 326, 327, 189, 190, 191, + 192, 139, 622, 141, 623, 626, 537, 146, 538, 205, + 420, 206, 205, 207, 206, 609, 207, 147, 341, 208, + 209, 210, 616, 638, 211, 617, 212, 410, 193, 194, + 54, 55, 56, 57, 58, 59, 148, 195, 60, 196, + 618, 903, 314, 617, 635, 619, 152, 533, 341, 910, + 151, 637, 153, 914, 341, 197, 198, 199, 154, 916, + 642, 200, 567, 643, 189, 190, 191, 192, 157, 193, + 194, 714, 262, 556, 14, 155, 263, 264, 195, 161, + 196, 265, 266, 142, 143, 201, 202, 203, 359, 360, + 361, 709, 113, 114, 115, 116, 197, 198, 199, 165, + 705, 163, 200, 166, 67, 68, 69, 204, 70, 71, + 144, 145, 170, 72, 73, 74, 343, 344, 75, 76, + 77, 465, 466, 171, 78, 79, 201, 202, 203, 205, + 172, 206, 702, 207, 174, 401, 193, 194, 175, 208, + 209, 210, 551, 552, 211, 195, 212, 196, 204, 105, + 106, 107, 108, 724, 332, 788, 341, 189, 190, 191, + 192, 732, 733, 197, 198, 199, 179, 180, 739, 200, + 205, 740, 206, 784, 207, 787, 401, 181, 341, 184, + 208, 209, 210, 790, 186, 211, 791, 212, 712, 634, + 267, 719, 268, 201, 202, 203, 269, 189, 190, 191, + 192, 271, 1, 798, 2, 3, 4, 5, 6, 7, + 8, 9, 277, 842, 848, 204, 643, 617, 10, 280, + 11, 12, 13, 278, 285, 850, 797, 290, 401, 309, + 310, 897, 905, 289, 898, 906, 294, 205, 195, 206, + 196, 207, 295, 296, 312, 313, 317, 208, 209, 210, + 318, 319, 211, 320, 212, 323, 197, 198, 199, 321, + 328, 849, 200, 653, 654, 655, 656, 657, 329, 309, + 658, 659, 362, 373, 374, 14, 375, 378, 195, 660, + 196, 379, 386, 396, 397, 402, 201, 202, 203, 407, + 408, 412, 14, 661, 421, 422, 197, 198, 199, 423, + 424, 425, 200, 426, 413, 427, 431, 429, 204, 662, + 663, 664, 665, 666, 428, 433, 667, 668, 345, 438, + 346, 211, 458, 460, 462, 669, 201, 202, 203, 463, + 205, 413, 206, 464, 207, 467, 475, 477, 468, 670, + 208, 209, 210, 512, 513, 211, 519, 212, 204, 1, + 541, 2, 3, 4, 5, 6, 7, 521, 9, 347, + 15, 437, 534, 543, 554, 10, 343, 11, 12, 13, + 205, 560, 206, 347, 207, 561, 348, 349, 350, 351, + 208, 209, 210, 413, 353, 211, 347, 212, 16, 558, + 348, 349, 350, 351, 352, 562, 563, 564, 353, 568, + 590, 591, 592, 348, 349, 350, 351, 605, 559, 611, + 593, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 612, 594, 14, 710, 595, 603, 354, 355, 356, 357, + 358, 359, 360, 361, 610, 613, 614, 628, 347, 354, + 355, 356, 357, 358, 359, 360, 361, 615, 620, 631, + 633, 636, 632, 639, 551, 348, 349, 350, 351, 347, + 552, 640, 641, 353, 569, -212, 570, 571, 572, 573, + 648, 574, 575, 649, 646, 647, -424, -424, 350, 351, + 650, 652, 695, 696, -424, 697, 703, 704, 707, 711, + 713, 354, 355, 356, 357, 358, 359, 360, 361, 720, + 715, 679, 680, 681, 682, 683, 722, 15, 684, 685, + 725, 726, -424, 355, 356, 357, 358, 359, 360, 361, + 736, 721, 723, 734, 737, 748, 786, 757, 741, 742, + 743, 686, 744, 745, 746, 16, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 502, 503, 504, 734, - 718, 505, 719, 720, 506, 507, 721, 732, 508, 509, - 510, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 735, 739, 740, 741, 742, 743, 744, - 745, 782, 746, 747, 748, 749, 750, 751, 752, 753, - 791, 795, 754, 755, 756, 757, 758, 759, 760, 761, - 796, 762, 763, 764, 765, 766, 767, 768, 797, 798, - 799, 769, 770, 800, 801, 802, 771, 772, 803, 773, - 774, 804, 775, 805, 806, 776, 777, 807, 778, 808, - 785, 788, 809, 789, 810, 811, 812, 813, 814, 815, + 496, 497, 498, 795, 499, 500, 501, 502, 503, 504, + 747, 749, 505, 750, 751, 506, 507, 799, 752, 508, + 509, 510, 687, 688, 689, 690, 691, 753, 754, 692, + 693, 755, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 756, 758, 759, 800, 760, 761, + 801, 762, 694, 802, 763, 764, 765, 803, 804, 766, + 767, 805, 806, 808, 768, 769, 770, 771, 772, 773, + 774, 775, 776, 809, 777, 778, 779, 780, 810, 811, + 812, 813, 781, 782, 789, 792, 793, 807, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, - 838, 839, 840, 841, 341, 845, 846, 886, 847, 848, - 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, - 859, 860, 861, 862, 863, 864, 865, 891, 866, 867, - 868, 869, 870, 871, 892, 872, 902, 894, 873, 874, - 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, - 901, 885, 887, 156, 607, 899, 888, 897, 903, 621, - 905, 127, 698, 128, 696, 129, 283, 130, 131, 406, - 132, 91, 274, 377, 645, 589, 729, 134, 272, 135, - 136, 137, 138, 545, 779, 733, 322, 781, 704, 728, - 518, 715, 0, 0, 0, 0, 417, 0, 0, 716, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 432, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 836, 837, 838, 839, 840, 841, 844, 845, 846, 847, + 341, 851, 852, 853, 854, 859, 855, 856, 857, 858, + 868, 860, 861, 901, 862, 863, 864, 865, 866, 867, + 869, 870, 871, 872, 873, 874, 875, 876, 902, 904, + 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, + 887, 888, 889, 890, 891, 892, 893, 911, 912, 895, + 156, 894, 899, 896, 900, 909, 907, 913, 915, 127, + 607, 698, 621, 128, 700, 283, 129, 130, 131, 132, + 91, 406, 377, 274, 589, 731, 645, 272, 134, 135, + 136, 137, 138, 735, 783, 717, 461, 718, 545, 417, + 322, 459, 706, 785, 730, 0, 518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 459, - 0, 0, 461 + 0, 0, 0, 432 }; static const yytype_int16 yycheck[] = { 184, 16, 162, 211, 61, 511, 397, 193, 408, 121, - 182, 3, 196, 475, 8, 4, 57, 6, 5, 6, - 5, 6, 208, 209, 13, 475, 3, 3, 212, 7, - 3, 9, 10, 11, 12, 13, 14, 15, 16, 475, - 33, 153, 475, 475, 88, 23, 475, 25, 26, 27, - 64, 68, 41, 20, 0, 22, 99, 24, 78, 75, - 49, 7, 3, 9, 10, 11, 12, 13, 14, 15, - 16, 78, 79, 77, 63, 85, 88, 23, 64, 25, - 26, 27, 80, 57, 3, 151, 152, 3, 74, 5, - 6, 80, 30, 277, 278, 3, 3, 34, 5, 6, - 75, 194, 80, 196, 72, 73, 290, 151, 152, 125, - 165, 127, 128, 57, 130, 158, 105, 106, 107, 78, - 70, 71, 513, 309, 113, 114, 115, 193, 3, 313, - 314, 81, 82, 83, 80, 3, 296, 5, 6, 151, - 152, 151, 152, 80, 0, 4, 5, 6, 64, 57, - 154, 192, 125, 128, 127, 85, 364, 64, 173, 343, + 182, 3, 196, 8, 57, 4, 475, 6, 5, 6, + 0, 3, 208, 209, 13, 3, 475, 7, 212, 9, + 10, 11, 12, 13, 14, 15, 16, 475, 5, 6, + 475, 153, 475, 23, 475, 25, 26, 27, 57, 20, + 64, 22, 41, 24, 3, 68, 5, 6, 57, 3, + 49, 5, 6, 80, 85, 3, 3, 77, 5, 6, + 3, 89, 78, 194, 63, 34, 197, 78, 79, 4, + 5, 6, 3, 88, 75, 70, 71, 99, 152, 153, + 192, 80, 33, 277, 278, 197, 81, 82, 83, 64, + 80, 29, 30, 31, 152, 153, 290, 192, 78, 74, + 152, 153, 197, 41, 42, 64, 105, 106, 107, 57, + 64, 80, 513, 309, 113, 114, 115, 64, 30, 313, + 314, 152, 153, 197, 152, 153, 296, 3, 129, 5, + 6, 72, 73, 152, 153, 155, 158, 152, 153, 197, + 193, 3, 194, 152, 153, 195, 364, 197, 173, 343, 344, 150, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 196, 151, 152, 196, - 194, 8, 171, 151, 152, 192, 164, 649, 3, 4, - 5, 6, 89, 3, 192, 195, 64, 212, 192, 649, - 192, 74, 386, 190, 191, 74, 191, 151, 152, 14, - 187, 187, 603, 649, 192, 194, 649, 649, 164, 3, - 649, 151, 152, 3, 281, 3, 193, 75, 161, 162, - 180, 3, 80, 172, 167, 419, 420, 6, 422, 151, - 152, 425, 402, 102, 103, 104, 192, 163, 107, 409, - 193, 437, 67, 196, 151, 152, 163, 151, 152, 3, - 75, 76, 35, 36, 37, 38, 39, 40, 57, 84, - 43, 86, 131, 132, 133, 161, 782, 125, 438, 127, - 128, 42, 169, 170, 196, 46, 47, 102, 103, 104, - 51, 52, 107, 477, 196, 163, 191, 312, 191, 6, - 289, 196, 196, 196, 476, 155, 156, 157, 191, 3, - 4, 5, 6, 196, 169, 170, 131, 132, 133, 431, - 720, 91, 92, 93, 94, 95, 193, 191, 98, 99, - 191, 190, 196, 193, 3, 196, 5, 6, 153, 396, - 119, 732, 121, 122, 123, 3, 4, 5, 6, 20, - 120, 22, 536, 24, 538, 541, 29, 30, 31, 85, - 175, 87, 177, 89, 179, 187, 188, 189, 41, 42, - 185, 186, 187, 559, 21, 190, 193, 192, 193, 196, - 67, 75, 76, 889, 85, 69, 87, 75, 89, 895, - 84, 3, 86, 899, 554, 89, 3, 412, 75, 905, - 151, 152, 29, 30, 31, 48, 49, 64, 102, 103, - 104, 192, 469, 107, 41, 42, 193, 75, 76, 196, - 3, 629, 80, 438, 76, 175, 84, 177, 86, 179, - 43, 44, 45, 46, 3, 5, 6, 131, 132, 133, - 193, 625, 3, 196, 102, 103, 104, 3, 193, 107, - 610, 196, 129, 91, 92, 93, 94, 95, 68, 153, - 98, 99, 4, 3, 4, 5, 6, 5, 6, 146, - 147, 148, 149, 131, 132, 133, 193, 154, 3, 196, - 3, 175, 120, 177, 6, 179, 37, 38, 39, 40, - 192, 185, 186, 187, 193, 153, 190, 196, 192, 3, - 4, 5, 6, 646, 647, 182, 183, 184, 185, 186, - 187, 188, 189, 70, 55, 193, 193, 175, 196, 177, - 3, 179, 627, 193, 76, 630, 196, 185, 186, 187, - 193, 64, 190, 196, 192, 75, 76, 193, 193, 554, - 196, 196, 193, 182, 84, 196, 86, 193, 80, 80, - 196, 735, 91, 92, 93, 94, 95, 4, 193, 98, - 99, 196, 102, 103, 104, 193, 192, 107, 196, 4, - 193, 75, 76, 196, 734, 193, 193, 192, 196, 196, - 84, 120, 86, 192, 4, 4, 29, 30, 75, 32, - 77, 131, 132, 133, 193, 6, 192, 196, 102, 103, - 104, 44, 45, 107, 192, 192, 3, 791, 3, 4, - 5, 6, 193, 153, 7, 196, 9, 10, 11, 12, - 13, 14, 193, 16, 80, 196, 194, 131, 132, 133, - 23, 6, 25, 26, 27, 175, 57, 177, 193, 179, - 193, 196, 129, 196, 193, 185, 186, 187, 193, 153, - 190, 80, 192, 71, 197, 192, 192, 192, 192, 146, - 147, 148, 149, 150, 192, 192, 4, 154, 192, 4, - 4, 175, 192, 177, 192, 179, 193, 79, 3, 192, - 75, 185, 186, 187, 190, 5, 190, 80, 192, 84, - 6, 86, 46, 75, 6, 182, 183, 184, 185, 186, - 187, 188, 189, 6, 192, 174, 196, 102, 103, 104, - 126, 193, 107, 192, 157, 158, 159, 3, 161, 162, - 196, 154, 193, 166, 167, 168, 78, 4, 171, 172, - 173, 192, 128, 197, 177, 178, 131, 132, 133, 75, - 197, 91, 92, 93, 94, 95, 151, 129, 98, 99, - 6, 6, 91, 92, 93, 94, 95, 3, 153, 98, - 99, 192, 196, 28, 146, 147, 148, 149, 192, 151, - 120, 164, 154, 6, 6, 192, 4, 192, 192, 192, - 175, 120, 177, 192, 179, 192, 3, 6, 196, 193, - 185, 186, 187, 129, 4, 190, 4, 192, 80, 192, - 182, 183, 184, 185, 186, 187, 188, 189, 129, 193, - 146, 147, 148, 149, 6, 129, 5, 53, 154, 50, - 182, 59, 59, 3, 196, 146, 147, 148, 149, 54, - 6, 128, 126, 154, 148, 149, 58, 59, 60, 61, - 62, 63, 130, 65, 66, 192, 182, 183, 184, 185, - 186, 187, 188, 189, 160, 4, 193, 190, 190, 6, - 6, 182, 183, 184, 185, 186, 187, 188, 189, 183, - 184, 185, 186, 187, 188, 189, 90, 91, 92, 93, + 356, 357, 358, 359, 360, 361, 193, 102, 103, 104, + 85, 195, 171, 108, 197, 165, 3, 4, 5, 6, + 649, 197, 193, 126, 3, 128, 181, 212, 193, 88, + 649, 193, 386, 3, 191, 192, 188, 132, 133, 134, + 188, 649, 603, 193, 649, 164, 649, 75, 649, 166, + 164, 152, 153, 194, 281, 192, 192, 164, 75, 192, + 0, 197, 192, 80, 197, 419, 420, 197, 422, 162, + 163, 425, 402, 194, 196, 168, 197, 152, 153, 409, + 67, 437, 8, 91, 92, 93, 94, 95, 75, 76, + 98, 99, 194, 152, 153, 197, 191, 84, 126, 86, + 128, 129, 20, 131, 22, 130, 24, 195, 438, 126, + 786, 128, 129, 121, 74, 102, 103, 104, 85, 74, + 87, 108, 89, 477, 149, 150, 194, 312, 14, 197, + 289, 29, 30, 31, 476, 3, 3, 4, 5, 6, + 156, 157, 158, 41, 42, 132, 133, 134, 194, 431, + 194, 197, 722, 197, 194, 29, 30, 197, 32, 184, + 185, 186, 187, 188, 189, 190, 3, 154, 3, 396, + 44, 45, 120, 734, 122, 123, 124, 3, 4, 5, + 6, 3, 536, 6, 538, 541, 85, 3, 87, 176, + 89, 178, 176, 180, 178, 194, 180, 173, 197, 186, + 187, 188, 194, 559, 191, 197, 193, 194, 75, 76, + 35, 36, 37, 38, 39, 40, 162, 84, 43, 86, + 194, 897, 89, 197, 554, 194, 197, 412, 197, 905, + 57, 194, 6, 909, 197, 102, 103, 104, 194, 915, + 194, 108, 469, 197, 3, 4, 5, 6, 21, 75, + 76, 629, 42, 438, 80, 194, 46, 47, 84, 67, + 86, 51, 52, 170, 171, 132, 133, 134, 188, 189, + 190, 625, 43, 44, 45, 46, 102, 103, 104, 75, + 610, 69, 108, 3, 158, 159, 160, 154, 162, 163, + 170, 171, 3, 167, 168, 169, 152, 153, 172, 173, + 174, 48, 49, 64, 178, 179, 132, 133, 134, 176, + 193, 178, 194, 180, 76, 197, 75, 76, 3, 186, + 187, 188, 5, 6, 191, 84, 193, 86, 154, 37, + 38, 39, 40, 194, 5, 6, 197, 3, 4, 5, + 6, 646, 647, 102, 103, 104, 3, 3, 194, 108, + 176, 197, 178, 194, 180, 194, 197, 3, 197, 68, + 186, 187, 188, 194, 4, 191, 197, 193, 627, 554, + 3, 630, 3, 132, 133, 134, 6, 3, 4, 5, + 6, 193, 7, 737, 9, 10, 11, 12, 13, 14, + 15, 16, 55, 194, 194, 154, 197, 197, 23, 76, + 25, 26, 27, 70, 3, 194, 736, 183, 197, 75, + 76, 194, 194, 64, 197, 197, 80, 176, 84, 178, + 86, 180, 80, 193, 193, 193, 4, 186, 187, 188, + 4, 4, 191, 4, 193, 193, 102, 103, 104, 6, + 193, 795, 108, 91, 92, 93, 94, 95, 193, 75, + 98, 99, 195, 3, 6, 80, 80, 194, 84, 107, + 86, 194, 71, 57, 193, 193, 132, 133, 134, 193, + 193, 193, 80, 121, 4, 193, 102, 103, 104, 193, + 193, 193, 108, 4, 75, 4, 79, 194, 154, 91, + 92, 93, 94, 95, 198, 3, 98, 99, 75, 193, + 77, 191, 6, 6, 6, 107, 132, 133, 134, 5, + 176, 75, 178, 46, 180, 193, 175, 197, 194, 121, + 186, 187, 188, 127, 193, 191, 3, 193, 154, 7, + 78, 9, 10, 11, 12, 13, 14, 197, 16, 130, + 165, 155, 194, 4, 193, 23, 152, 25, 26, 27, + 176, 198, 178, 130, 180, 198, 147, 148, 149, 150, + 186, 187, 188, 75, 155, 191, 130, 193, 193, 129, + 147, 148, 149, 150, 151, 6, 6, 3, 155, 197, + 193, 193, 193, 147, 148, 149, 150, 28, 152, 6, + 193, 155, 183, 184, 185, 186, 187, 188, 189, 190, + 6, 193, 80, 194, 193, 193, 183, 184, 185, 186, + 187, 188, 189, 190, 193, 4, 3, 197, 130, 183, + 184, 185, 186, 187, 188, 189, 190, 6, 194, 4, + 80, 194, 4, 53, 5, 147, 148, 149, 150, 130, + 6, 50, 183, 155, 58, 59, 60, 61, 62, 63, + 3, 65, 66, 197, 59, 59, 147, 148, 149, 150, + 54, 6, 129, 127, 155, 131, 193, 161, 194, 191, + 4, 183, 184, 185, 186, 187, 188, 189, 190, 194, + 191, 91, 92, 93, 94, 95, 193, 165, 98, 99, + 6, 6, 183, 184, 185, 186, 187, 188, 189, 190, + 55, 194, 194, 193, 56, 93, 3, 93, 197, 197, + 197, 121, 197, 197, 197, 193, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 55, - 193, 115, 193, 192, 118, 119, 193, 192, 122, 123, - 124, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 56, 196, 196, 196, 196, 196, 196, - 196, 3, 196, 196, 196, 196, 196, 196, 196, 196, - 64, 6, 196, 196, 196, 196, 196, 196, 196, 196, - 6, 196, 196, 196, 196, 196, 196, 196, 6, 6, - 6, 196, 196, 6, 6, 6, 196, 196, 6, 196, - 196, 6, 196, 6, 6, 196, 196, 6, 196, 6, - 196, 196, 6, 196, 6, 6, 6, 6, 6, 6, + 104, 105, 106, 64, 108, 109, 110, 111, 112, 113, + 197, 197, 116, 197, 197, 119, 120, 6, 197, 123, + 124, 125, 91, 92, 93, 94, 95, 197, 197, 98, + 99, 197, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 197, 197, 197, 6, 197, 197, + 6, 197, 121, 6, 197, 197, 197, 6, 6, 197, + 197, 6, 6, 6, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 6, 197, 197, 197, 197, 6, 6, + 6, 6, 197, 197, 197, 197, 197, 197, 6, 6, + 197, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 4, 4, 4, 4, 196, 193, 193, 196, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 4, 193, 193, - 193, 193, 193, 193, 4, 193, 4, 6, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 6, 193, 193, 94, 515, 193, 196, 196, 193, 535, - 193, 61, 602, 61, 600, 61, 169, 61, 61, 291, - 61, 16, 158, 271, 568, 477, 644, 61, 152, 61, - 61, 61, 61, 424, 695, 649, 203, 701, 617, 643, - 398, 630, -1, -1, -1, -1, 315, -1, -1, 630, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, + 197, 194, 194, 194, 194, 6, 194, 194, 194, 194, + 6, 194, 194, 4, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 4, 6, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 6, 4, 194, + 94, 197, 194, 197, 194, 194, 197, 194, 194, 61, + 515, 600, 535, 61, 602, 169, 61, 61, 61, 61, + 16, 291, 271, 158, 477, 644, 568, 152, 61, 61, + 61, 61, 61, 649, 697, 630, 368, 630, 424, 315, + 203, 366, 617, 703, 643, -1, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 341, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, - -1, -1, 368 + -1, -1, -1, 341 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1458,145 +1455,146 @@ static const yytype_int16 yycheck[] = static const yytype_int16 yystos[] = { 0, 7, 9, 10, 11, 12, 13, 14, 15, 16, - 23, 25, 26, 27, 80, 164, 192, 199, 200, 201, - 203, 213, 214, 216, 218, 221, 222, 223, 224, 225, - 247, 252, 253, 254, 255, 256, 29, 30, 31, 41, - 42, 33, 29, 30, 31, 41, 42, 3, 245, 78, - 245, 161, 162, 167, 35, 36, 37, 38, 39, 40, - 43, 217, 29, 30, 32, 44, 45, 157, 158, 159, - 161, 162, 166, 167, 168, 171, 172, 173, 177, 178, - 30, 155, 156, 157, 3, 3, 245, 3, 248, 249, - 165, 224, 225, 0, 195, 304, 20, 22, 24, 241, - 8, 226, 228, 74, 303, 303, 303, 303, 303, 305, - 245, 74, 302, 302, 302, 302, 302, 194, 14, 245, - 78, 79, 192, 3, 3, 3, 202, 203, 213, 214, - 218, 221, 222, 223, 252, 253, 254, 255, 256, 3, - 245, 6, 169, 170, 169, 170, 3, 172, 161, 245, - 64, 57, 196, 6, 193, 193, 201, 21, 192, 227, - 228, 67, 235, 69, 229, 75, 3, 245, 245, 245, - 3, 64, 192, 215, 76, 3, 245, 245, 245, 3, - 3, 3, 219, 220, 68, 238, 4, 301, 301, 3, + 23, 25, 26, 27, 80, 165, 193, 200, 201, 202, + 204, 214, 215, 217, 219, 222, 223, 224, 225, 226, + 248, 253, 254, 255, 256, 257, 29, 30, 31, 41, + 42, 33, 29, 30, 31, 41, 42, 3, 246, 78, + 246, 162, 163, 168, 35, 36, 37, 38, 39, 40, + 43, 218, 29, 30, 32, 44, 45, 158, 159, 160, + 162, 163, 167, 168, 169, 172, 173, 174, 178, 179, + 30, 156, 157, 158, 3, 3, 246, 3, 249, 250, + 166, 225, 226, 0, 196, 305, 20, 22, 24, 242, + 8, 227, 229, 74, 304, 304, 304, 304, 304, 306, + 246, 74, 303, 303, 303, 303, 303, 195, 14, 246, + 78, 79, 193, 3, 3, 3, 203, 204, 214, 215, + 219, 222, 223, 224, 253, 254, 255, 256, 257, 3, + 246, 6, 170, 171, 170, 171, 3, 173, 162, 246, + 64, 57, 197, 6, 194, 194, 202, 21, 193, 228, + 229, 67, 236, 69, 230, 75, 3, 246, 246, 246, + 3, 64, 193, 216, 76, 3, 246, 246, 246, 3, + 3, 3, 220, 221, 68, 239, 4, 302, 302, 3, 4, 5, 6, 75, 76, 84, 86, 102, 103, 104, - 107, 131, 132, 133, 153, 175, 177, 179, 185, 186, - 187, 190, 192, 257, 259, 260, 261, 263, 264, 265, - 266, 267, 268, 271, 272, 273, 274, 275, 277, 278, - 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, - 290, 293, 294, 295, 296, 297, 298, 3, 5, 6, - 64, 163, 3, 5, 6, 64, 163, 3, 5, 6, - 64, 163, 42, 46, 47, 51, 52, 3, 3, 6, - 245, 192, 249, 301, 227, 228, 257, 55, 70, 233, - 76, 57, 192, 215, 245, 3, 212, 34, 225, 64, - 182, 196, 238, 260, 80, 80, 192, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 75, - 76, 261, 192, 192, 89, 260, 276, 4, 4, 4, - 4, 6, 298, 192, 119, 121, 122, 123, 192, 192, - 261, 261, 5, 6, 191, 281, 291, 292, 225, 260, - 193, 196, 57, 151, 152, 75, 77, 129, 146, 147, - 148, 149, 150, 154, 182, 183, 184, 185, 186, 187, - 188, 189, 194, 191, 196, 191, 196, 191, 196, 191, - 196, 191, 196, 3, 6, 80, 306, 226, 193, 193, - 78, 236, 230, 231, 260, 260, 71, 234, 223, 3, - 125, 127, 204, 205, 206, 211, 57, 192, 310, 311, - 193, 196, 192, 258, 245, 260, 220, 192, 192, 67, - 193, 257, 192, 75, 225, 260, 260, 276, 85, 87, - 89, 4, 192, 192, 192, 192, 4, 4, 197, 193, - 193, 79, 259, 3, 260, 260, 77, 154, 192, 75, - 128, 261, 261, 261, 261, 261, 261, 261, 261, 261, - 261, 261, 261, 261, 261, 3, 187, 281, 6, 291, - 6, 292, 6, 5, 46, 48, 49, 192, 193, 192, - 242, 243, 244, 245, 250, 174, 237, 196, 72, 73, - 232, 260, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 115, 118, 119, 122, 123, - 124, 207, 126, 192, 193, 196, 223, 212, 311, 3, - 257, 196, 70, 71, 81, 82, 83, 180, 299, 300, - 299, 257, 193, 225, 193, 57, 88, 85, 87, 260, - 260, 78, 260, 4, 3, 279, 260, 193, 196, 193, - 196, 5, 6, 301, 192, 261, 225, 257, 128, 151, - 197, 197, 6, 6, 3, 308, 309, 223, 196, 58, - 60, 61, 62, 63, 65, 66, 251, 3, 57, 246, - 263, 264, 265, 266, 267, 268, 269, 270, 238, 231, - 192, 192, 192, 192, 192, 192, 75, 125, 127, 128, - 208, 209, 306, 192, 212, 28, 307, 205, 193, 193, - 192, 6, 6, 4, 3, 6, 193, 196, 193, 193, - 193, 207, 260, 260, 85, 88, 261, 196, 196, 196, - 196, 4, 4, 80, 225, 257, 193, 193, 261, 53, - 50, 182, 193, 196, 193, 243, 59, 59, 3, 196, - 54, 240, 6, 91, 92, 93, 94, 95, 98, 99, - 120, 91, 92, 93, 94, 95, 98, 99, 120, 91, - 92, 93, 94, 95, 98, 99, 120, 91, 92, 93, - 94, 95, 98, 99, 120, 91, 92, 93, 94, 95, - 98, 99, 120, 128, 126, 130, 209, 210, 210, 212, - 193, 192, 160, 257, 300, 193, 85, 260, 193, 190, - 293, 4, 281, 190, 282, 285, 290, 293, 193, 193, - 192, 193, 193, 6, 6, 3, 5, 6, 309, 246, - 244, 244, 192, 269, 55, 56, 239, 193, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 280, - 193, 308, 3, 193, 6, 196, 193, 196, 196, 196, - 299, 64, 212, 257, 260, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 108, 132, 133, 134, 154, 176, 178, 180, 186, 187, + 188, 191, 193, 258, 260, 261, 262, 264, 265, 266, + 267, 268, 269, 272, 273, 274, 275, 276, 278, 279, + 280, 281, 282, 284, 285, 286, 287, 288, 289, 290, + 291, 294, 295, 296, 297, 298, 299, 3, 5, 6, + 64, 164, 3, 5, 6, 64, 164, 3, 5, 6, + 64, 164, 42, 46, 47, 51, 52, 3, 3, 6, + 246, 193, 250, 302, 228, 229, 258, 55, 70, 234, + 76, 57, 193, 216, 246, 3, 213, 34, 226, 64, + 183, 197, 239, 261, 80, 80, 193, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 75, + 76, 262, 193, 193, 89, 261, 277, 4, 4, 4, + 4, 6, 299, 193, 120, 122, 123, 124, 193, 193, + 262, 262, 5, 6, 192, 282, 292, 293, 226, 261, + 194, 197, 57, 152, 153, 75, 77, 130, 147, 148, + 149, 150, 151, 155, 183, 184, 185, 186, 187, 188, + 189, 190, 195, 192, 197, 192, 197, 192, 197, 192, + 197, 192, 197, 3, 6, 80, 307, 227, 194, 194, + 78, 237, 231, 232, 261, 261, 71, 235, 224, 3, + 126, 128, 205, 206, 207, 212, 57, 193, 311, 312, + 194, 197, 193, 259, 246, 261, 221, 193, 193, 67, + 194, 258, 193, 75, 226, 261, 261, 277, 85, 87, + 89, 4, 193, 193, 193, 193, 4, 4, 198, 194, + 194, 79, 260, 3, 261, 261, 77, 155, 193, 75, + 129, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 3, 188, 282, 6, 292, + 6, 293, 6, 5, 46, 48, 49, 193, 194, 193, + 243, 244, 245, 246, 251, 175, 238, 197, 72, 73, + 233, 261, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, + 109, 110, 111, 112, 113, 116, 119, 120, 123, 124, + 125, 208, 127, 193, 194, 197, 224, 213, 312, 3, + 258, 197, 70, 71, 81, 82, 83, 181, 300, 301, + 300, 258, 194, 226, 194, 57, 88, 85, 87, 261, + 261, 78, 261, 4, 3, 280, 261, 194, 197, 194, + 197, 5, 6, 302, 193, 262, 226, 258, 129, 152, + 198, 198, 6, 6, 3, 309, 310, 224, 197, 58, + 60, 61, 62, 63, 65, 66, 252, 3, 57, 247, + 264, 265, 266, 267, 268, 269, 270, 271, 239, 232, + 193, 193, 193, 193, 193, 193, 75, 126, 128, 129, + 209, 210, 307, 193, 213, 28, 308, 206, 194, 194, + 193, 6, 6, 4, 3, 6, 194, 197, 194, 194, + 194, 208, 261, 261, 85, 88, 262, 197, 197, 197, + 197, 4, 4, 80, 226, 258, 194, 194, 262, 53, + 50, 183, 194, 197, 194, 244, 59, 59, 3, 197, + 54, 241, 6, 91, 92, 93, 94, 95, 98, 99, + 107, 121, 91, 92, 93, 94, 95, 98, 99, 107, + 121, 91, 92, 93, 94, 95, 98, 99, 121, 91, + 92, 93, 94, 95, 98, 99, 121, 91, 92, 93, + 94, 95, 98, 99, 121, 129, 127, 131, 210, 211, + 211, 213, 194, 193, 161, 258, 301, 194, 85, 261, + 194, 191, 294, 4, 282, 191, 283, 286, 291, 294, + 194, 194, 193, 194, 194, 6, 6, 3, 5, 6, + 310, 247, 245, 245, 193, 270, 55, 56, 240, 194, + 197, 197, 197, 197, 197, 197, 197, 197, 93, 197, + 197, 197, 197, 197, 197, 197, 197, 93, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 281, 194, 309, 3, 194, 6, 197, + 194, 197, 197, 197, 300, 64, 213, 258, 261, 6, + 6, 6, 6, 6, 6, 6, 6, 197, 6, 6, + 6, 6, 6, 6, 6, 6, 197, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 193, 306, 4, 4, - 4, 4, 193, 260, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 196, 193, 196, 193, - 196, 4, 4, 306, 6, 193, 196, 196, 262, 193, - 306, 6, 4, 193, 306, 193, 306 + 6, 6, 194, 307, 4, 4, 4, 4, 194, 261, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 6, + 194, 194, 194, 194, 194, 194, 194, 194, 6, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 197, 194, 197, 194, 197, 194, + 194, 4, 4, 307, 6, 194, 197, 197, 263, 194, + 307, 6, 4, 194, 307, 194, 307 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 198, 199, 200, 200, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 203, 203, 203, 203, 203, 203, 204, 204, 205, 205, - 206, 206, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 208, 208, - 209, 209, 209, 209, 210, 210, 211, 211, 212, 212, - 213, 214, 214, 215, 215, 216, 217, 217, 217, 217, - 217, 217, 217, 217, 218, 219, 219, 220, 221, 221, - 221, 221, 221, 222, 222, 222, 223, 223, 223, 223, - 224, 224, 225, 226, 227, 227, 228, 229, 229, 230, - 230, 231, 232, 232, 232, 233, 233, 234, 234, 235, + 0, 199, 200, 201, 201, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 204, 204, 204, 204, 204, 204, 205, 205, 206, 206, + 207, 207, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 209, 209, 210, 210, 210, 210, 211, 211, 212, 212, + 213, 213, 214, 215, 215, 216, 216, 217, 218, 218, + 218, 218, 218, 218, 218, 218, 219, 220, 220, 221, + 222, 222, 222, 222, 222, 223, 223, 223, 224, 224, + 224, 224, 225, 225, 226, 227, 228, 228, 229, 230, + 230, 231, 231, 232, 233, 233, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, 239, 239, 240, - 240, 241, 241, 241, 241, 242, 242, 243, 243, 244, - 244, 245, 245, 246, 246, 246, 246, 247, 247, 248, - 248, 249, 250, 250, 251, 251, 251, 251, 251, 251, - 251, 252, 252, 252, 252, 252, 252, 252, 252, 252, - 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, - 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, - 252, 253, 253, 253, 254, 254, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 256, 257, 257, 258, 258, 259, 259, - 260, 260, 260, 260, 260, 261, 261, 261, 261, 261, - 261, 261, 261, 261, 261, 261, 261, 261, 262, 262, - 263, 264, 264, 265, 265, 266, 266, 267, 267, 268, - 268, 269, 269, 269, 269, 269, 269, 270, 270, 271, - 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, - 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, - 271, 271, 272, 272, 273, 274, 274, 275, 275, 275, - 275, 276, 276, 277, 278, 278, 278, 278, 279, 279, - 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 281, 281, 281, 281, 282, 282, - 282, 283, 284, 284, 285, 285, 286, 287, 287, 288, - 289, 289, 290, 291, 292, 293, 293, 294, 295, 295, - 296, 297, 297, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 299, 299, 300, 300, 300, - 300, 300, 300, 301, 302, 302, 303, 303, 304, 304, + 240, 241, 241, 242, 242, 242, 242, 243, 243, 244, + 244, 245, 245, 246, 246, 247, 247, 247, 247, 248, + 248, 249, 249, 250, 251, 251, 252, 252, 252, 252, + 252, 252, 252, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 254, 254, 254, 255, 255, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 257, 258, 258, 259, 259, + 260, 260, 261, 261, 261, 261, 261, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 263, 263, 264, 265, 265, 266, 266, 267, 267, 268, + 268, 269, 269, 270, 270, 270, 270, 270, 270, 271, + 271, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 273, 273, 274, 275, 275, 276, + 276, 276, 276, 277, 277, 278, 279, 279, 279, 279, + 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 282, 282, 282, 282, + 283, 283, 283, 284, 285, 285, 286, 286, 287, 288, + 288, 289, 290, 290, 291, 292, 293, 294, 294, 295, + 296, 296, 297, 298, 298, 299, 299, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 300, 300, 301, + 301, 301, 301, 301, 301, 302, 303, 303, 304, 304, 305, 305, 306, 306, 307, 307, 308, 308, 309, 309, - 309, 309, 310, 310, 311, 311 + 310, 310, 310, 310, 311, 311, 312, 312 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1609,43 +1607,43 @@ static const yytype_int8 yyr2[] = 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 4, 1, 6, 6, + 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, - 2, 1, 1, 2, 2, 0, 5, 4, 1, 3, - 4, 6, 5, 3, 0, 3, 1, 1, 1, 1, - 1, 1, 1, 0, 5, 1, 3, 3, 4, 4, - 4, 4, 6, 8, 11, 8, 1, 1, 3, 3, - 3, 3, 2, 4, 3, 3, 8, 3, 0, 1, - 3, 2, 1, 1, 0, 2, 0, 2, 0, 1, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 3, - 0, 1, 2, 1, 1, 1, 3, 1, 1, 2, - 4, 1, 3, 2, 1, 5, 0, 2, 0, 1, - 3, 5, 4, 6, 1, 1, 1, 1, 1, 1, - 0, 2, 2, 2, 2, 3, 2, 2, 2, 4, - 2, 3, 3, 3, 4, 4, 3, 3, 4, 4, - 5, 6, 7, 9, 4, 5, 7, 9, 2, 3, - 2, 2, 2, 2, 2, 5, 2, 4, 4, 4, + 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, + 1, 2, 2, 1, 1, 2, 2, 0, 5, 4, + 1, 3, 4, 6, 5, 3, 0, 3, 1, 1, + 1, 1, 1, 1, 1, 0, 5, 1, 3, 3, + 4, 4, 4, 4, 6, 8, 11, 8, 1, 1, + 3, 3, 3, 3, 2, 4, 3, 3, 8, 3, + 0, 1, 3, 2, 1, 1, 0, 2, 0, 2, + 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 3, 0, 1, 2, 1, 1, 1, 3, 1, + 1, 2, 4, 1, 3, 2, 1, 5, 0, 2, + 0, 1, 3, 5, 4, 6, 1, 1, 1, 1, + 1, 1, 0, 2, 2, 2, 2, 3, 2, 2, + 2, 4, 2, 3, 3, 3, 4, 4, 3, 3, + 4, 4, 5, 6, 7, 9, 4, 5, 7, 9, + 2, 3, 2, 2, 2, 2, 2, 5, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 3, 1, 3, 3, 5, 3, 1, - 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, - 12, 14, 12, 12, 10, 7, 9, 4, 6, 4, - 6, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 4, 5, 4, 3, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, - 3, 4, 3, 3, 5, 5, 6, 4, 6, 3, - 5, 4, 5, 6, 4, 5, 5, 6, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 3, 1, 1, 2, 2, 3, 2, - 2, 3, 2, 3, 3, 1, 1, 2, 2, 3, - 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, - 2, 2, 2, 1, 2, 0, 3, 0, 1, 0, - 2, 0, 4, 0, 4, 0, 1, 3, 1, 3, - 3, 3, 1, 2, 6, 3 + 4, 4, 4, 4, 4, 3, 1, 3, 3, 5, + 3, 1, 1, 1, 1, 1, 1, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 0, 12, 14, 12, 12, 10, 7, 9, 4, + 6, 4, 6, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 4, 5, 4, 3, 2, 2, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 6, 3, 4, 3, 3, 5, 5, 6, 4, + 6, 3, 5, 4, 5, 6, 4, 5, 5, 6, + 1, 3, 1, 3, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 3, 1, 1, 2, 2, + 3, 2, 2, 3, 2, 3, 3, 1, 1, 2, + 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, + 2, 1, 2, 2, 2, 1, 2, 0, 3, 0, + 1, 0, 2, 0, 4, 0, 4, 0, 1, 3, + 1, 3, 3, 3, 1, 2, 6, 3 }; @@ -2213,7 +2211,7 @@ yydestruct (const char *yymsg, { free(((*yyvaluep).str_value)); } -#line 2217 "parser.cpp" +#line 2215 "parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ @@ -2221,7 +2219,7 @@ yydestruct (const char *yymsg, { free(((*yyvaluep).str_value)); } -#line 2225 "parser.cpp" +#line 2223 "parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2235,7 +2233,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).stmt_array)); } } -#line 2239 "parser.cpp" +#line 2237 "parser.cpp" break; case YYSYMBOL_table_element_array: /* table_element_array */ @@ -2249,7 +2247,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).table_element_array_t)); } } -#line 2253 "parser.cpp" +#line 2251 "parser.cpp" break; case YYSYMBOL_column_constraints: /* column_constraints */ @@ -2260,7 +2258,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).column_constraints_t)); } } -#line 2264 "parser.cpp" +#line 2262 "parser.cpp" break; case YYSYMBOL_default_expr: /* default_expr */ @@ -2268,7 +2266,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2272 "parser.cpp" +#line 2270 "parser.cpp" break; case YYSYMBOL_identifier_array: /* identifier_array */ @@ -2277,7 +2275,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy identifier array\n"); delete (((*yyvaluep).identifier_array_t)); } -#line 2281 "parser.cpp" +#line 2279 "parser.cpp" break; case YYSYMBOL_optional_identifier_array: /* optional_identifier_array */ @@ -2286,7 +2284,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy identifier array\n"); delete (((*yyvaluep).identifier_array_t)); } -#line 2290 "parser.cpp" +#line 2288 "parser.cpp" break; case YYSYMBOL_update_expr_array: /* update_expr_array */ @@ -2300,7 +2298,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).update_expr_array_t)); } } -#line 2304 "parser.cpp" +#line 2302 "parser.cpp" break; case YYSYMBOL_update_expr: /* update_expr */ @@ -2311,7 +2309,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).update_expr_t); } } -#line 2315 "parser.cpp" +#line 2313 "parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ @@ -2321,7 +2319,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2325 "parser.cpp" +#line 2323 "parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ @@ -2331,7 +2329,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2335 "parser.cpp" +#line 2333 "parser.cpp" break; case YYSYMBOL_select_without_paren: /* select_without_paren */ @@ -2341,7 +2339,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2345 "parser.cpp" +#line 2343 "parser.cpp" break; case YYSYMBOL_select_clause_with_modifier: /* select_clause_with_modifier */ @@ -2351,7 +2349,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2355 "parser.cpp" +#line 2353 "parser.cpp" break; case YYSYMBOL_select_clause_without_modifier_paren: /* select_clause_without_modifier_paren */ @@ -2361,7 +2359,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2365 "parser.cpp" +#line 2363 "parser.cpp" break; case YYSYMBOL_select_clause_without_modifier: /* select_clause_without_modifier */ @@ -2371,7 +2369,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).select_stmt); } } -#line 2375 "parser.cpp" +#line 2373 "parser.cpp" break; case YYSYMBOL_order_by_clause: /* order_by_clause */ @@ -2385,7 +2383,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).order_by_expr_list_t)); } } -#line 2389 "parser.cpp" +#line 2387 "parser.cpp" break; case YYSYMBOL_order_by_expr_list: /* order_by_expr_list */ @@ -2399,7 +2397,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).order_by_expr_list_t)); } } -#line 2403 "parser.cpp" +#line 2401 "parser.cpp" break; case YYSYMBOL_order_by_expr: /* order_by_expr */ @@ -2409,7 +2407,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).order_by_expr_t)->expr_; delete ((*yyvaluep).order_by_expr_t); } -#line 2413 "parser.cpp" +#line 2411 "parser.cpp" break; case YYSYMBOL_limit_expr: /* limit_expr */ @@ -2417,7 +2415,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2421 "parser.cpp" +#line 2419 "parser.cpp" break; case YYSYMBOL_offset_expr: /* offset_expr */ @@ -2425,7 +2423,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2429 "parser.cpp" +#line 2427 "parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ @@ -2434,7 +2432,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table reference\n"); delete (((*yyvaluep).table_reference_t)); } -#line 2438 "parser.cpp" +#line 2436 "parser.cpp" break; case YYSYMBOL_search_clause: /* search_clause */ @@ -2442,7 +2440,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2446 "parser.cpp" +#line 2444 "parser.cpp" break; case YYSYMBOL_where_clause: /* where_clause */ @@ -2450,7 +2448,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2454 "parser.cpp" +#line 2452 "parser.cpp" break; case YYSYMBOL_having_clause: /* having_clause */ @@ -2458,7 +2456,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2462 "parser.cpp" +#line 2460 "parser.cpp" break; case YYSYMBOL_group_by_clause: /* group_by_clause */ @@ -2472,7 +2470,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).expr_array_t)); } } -#line 2476 "parser.cpp" +#line 2474 "parser.cpp" break; case YYSYMBOL_table_reference: /* table_reference */ @@ -2481,7 +2479,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table reference\n"); delete (((*yyvaluep).table_reference_t)); } -#line 2485 "parser.cpp" +#line 2483 "parser.cpp" break; case YYSYMBOL_table_reference_unit: /* table_reference_unit */ @@ -2490,7 +2488,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table reference\n"); delete (((*yyvaluep).table_reference_t)); } -#line 2494 "parser.cpp" +#line 2492 "parser.cpp" break; case YYSYMBOL_table_reference_name: /* table_reference_name */ @@ -2499,7 +2497,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table reference\n"); delete (((*yyvaluep).table_reference_t)); } -#line 2503 "parser.cpp" +#line 2501 "parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ @@ -2512,7 +2510,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).table_name_t)); } } -#line 2516 "parser.cpp" +#line 2514 "parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ @@ -2521,7 +2519,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table alias\n"); delete (((*yyvaluep).table_alias_t)); } -#line 2525 "parser.cpp" +#line 2523 "parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ @@ -2535,7 +2533,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).with_expr_list_t)); } } -#line 2539 "parser.cpp" +#line 2537 "parser.cpp" break; case YYSYMBOL_with_expr_list: /* with_expr_list */ @@ -2549,7 +2547,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).with_expr_list_t)); } } -#line 2553 "parser.cpp" +#line 2551 "parser.cpp" break; case YYSYMBOL_with_expr: /* with_expr */ @@ -2559,7 +2557,7 @@ yydestruct (const char *yymsg, delete ((*yyvaluep).with_expr_t)->select_; delete ((*yyvaluep).with_expr_t); } -#line 2563 "parser.cpp" +#line 2561 "parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ @@ -2568,7 +2566,7 @@ yydestruct (const char *yymsg, fprintf(stderr, "destroy table reference\n"); delete (((*yyvaluep).table_reference_t)); } -#line 2572 "parser.cpp" +#line 2570 "parser.cpp" break; case YYSYMBOL_expr_array: /* expr_array */ @@ -2582,7 +2580,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).expr_array_t)); } } -#line 2586 "parser.cpp" +#line 2584 "parser.cpp" break; case YYSYMBOL_expr_array_list: /* expr_array_list */ @@ -2599,7 +2597,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).expr_array_list_t)); } } -#line 2603 "parser.cpp" +#line 2601 "parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ @@ -2607,7 +2605,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2611 "parser.cpp" +#line 2609 "parser.cpp" break; case YYSYMBOL_expr: /* expr */ @@ -2615,7 +2613,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2619 "parser.cpp" +#line 2617 "parser.cpp" break; case YYSYMBOL_operand: /* operand */ @@ -2623,7 +2621,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2627 "parser.cpp" +#line 2625 "parser.cpp" break; case YYSYMBOL_extra_match_tensor_option: /* extra_match_tensor_option */ @@ -2631,7 +2629,7 @@ yydestruct (const char *yymsg, { free(((*yyvaluep).str_value)); } -#line 2635 "parser.cpp" +#line 2633 "parser.cpp" break; case YYSYMBOL_match_tensor_expr: /* match_tensor_expr */ @@ -2639,7 +2637,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2643 "parser.cpp" +#line 2641 "parser.cpp" break; case YYSYMBOL_match_vector_expr: /* match_vector_expr */ @@ -2647,7 +2645,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2651 "parser.cpp" +#line 2649 "parser.cpp" break; case YYSYMBOL_match_sparse_expr: /* match_sparse_expr */ @@ -2655,7 +2653,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2659 "parser.cpp" +#line 2657 "parser.cpp" break; case YYSYMBOL_match_text_expr: /* match_text_expr */ @@ -2663,7 +2661,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2667 "parser.cpp" +#line 2665 "parser.cpp" break; case YYSYMBOL_query_expr: /* query_expr */ @@ -2671,7 +2669,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2675 "parser.cpp" +#line 2673 "parser.cpp" break; case YYSYMBOL_fusion_expr: /* fusion_expr */ @@ -2679,7 +2677,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2683 "parser.cpp" +#line 2681 "parser.cpp" break; case YYSYMBOL_sub_search: /* sub_search */ @@ -2687,7 +2685,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2691 "parser.cpp" +#line 2689 "parser.cpp" break; case YYSYMBOL_sub_search_array: /* sub_search_array */ @@ -2701,7 +2699,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).expr_array_t)); } } -#line 2705 "parser.cpp" +#line 2703 "parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ @@ -2709,7 +2707,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2713 "parser.cpp" +#line 2711 "parser.cpp" break; case YYSYMBOL_conjunction_expr: /* conjunction_expr */ @@ -2717,7 +2715,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2721 "parser.cpp" +#line 2719 "parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ @@ -2725,7 +2723,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2729 "parser.cpp" +#line 2727 "parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ @@ -2733,7 +2731,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2737 "parser.cpp" +#line 2735 "parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ @@ -2741,7 +2739,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2745 "parser.cpp" +#line 2743 "parser.cpp" break; case YYSYMBOL_case_check_array: /* case_check_array */ @@ -2754,7 +2752,7 @@ yydestruct (const char *yymsg, } } } -#line 2758 "parser.cpp" +#line 2756 "parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ @@ -2762,7 +2760,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2766 "parser.cpp" +#line 2764 "parser.cpp" break; case YYSYMBOL_subquery_expr: /* subquery_expr */ @@ -2770,7 +2768,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2774 "parser.cpp" +#line 2772 "parser.cpp" break; case YYSYMBOL_column_expr: /* column_expr */ @@ -2778,7 +2776,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).expr_t)); } -#line 2782 "parser.cpp" +#line 2780 "parser.cpp" break; case YYSYMBOL_constant_expr: /* constant_expr */ @@ -2786,7 +2784,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2790 "parser.cpp" +#line 2788 "parser.cpp" break; case YYSYMBOL_common_array_expr: /* common_array_expr */ @@ -2794,7 +2792,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2798 "parser.cpp" +#line 2796 "parser.cpp" break; case YYSYMBOL_common_sparse_array_expr: /* common_sparse_array_expr */ @@ -2802,7 +2800,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2806 "parser.cpp" +#line 2804 "parser.cpp" break; case YYSYMBOL_subarray_array_expr: /* subarray_array_expr */ @@ -2810,7 +2808,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2814 "parser.cpp" +#line 2812 "parser.cpp" break; case YYSYMBOL_unclosed_subarray_array_expr: /* unclosed_subarray_array_expr */ @@ -2818,7 +2816,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2822 "parser.cpp" +#line 2820 "parser.cpp" break; case YYSYMBOL_sparse_array_expr: /* sparse_array_expr */ @@ -2826,7 +2824,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2830 "parser.cpp" +#line 2828 "parser.cpp" break; case YYSYMBOL_long_sparse_array_expr: /* long_sparse_array_expr */ @@ -2834,7 +2832,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2838 "parser.cpp" +#line 2836 "parser.cpp" break; case YYSYMBOL_unclosed_long_sparse_array_expr: /* unclosed_long_sparse_array_expr */ @@ -2842,7 +2840,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2846 "parser.cpp" +#line 2844 "parser.cpp" break; case YYSYMBOL_double_sparse_array_expr: /* double_sparse_array_expr */ @@ -2850,7 +2848,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2854 "parser.cpp" +#line 2852 "parser.cpp" break; case YYSYMBOL_unclosed_double_sparse_array_expr: /* unclosed_double_sparse_array_expr */ @@ -2858,7 +2856,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2862 "parser.cpp" +#line 2860 "parser.cpp" break; case YYSYMBOL_empty_array_expr: /* empty_array_expr */ @@ -2866,7 +2864,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2870 "parser.cpp" +#line 2868 "parser.cpp" break; case YYSYMBOL_int_sparse_ele: /* int_sparse_ele */ @@ -2874,7 +2872,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).int_sparse_ele_t)); } -#line 2878 "parser.cpp" +#line 2876 "parser.cpp" break; case YYSYMBOL_float_sparse_ele: /* float_sparse_ele */ @@ -2882,7 +2880,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).float_sparse_ele_t)); } -#line 2886 "parser.cpp" +#line 2884 "parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ @@ -2890,7 +2888,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2894 "parser.cpp" +#line 2892 "parser.cpp" break; case YYSYMBOL_long_array_expr: /* long_array_expr */ @@ -2898,7 +2896,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2902 "parser.cpp" +#line 2900 "parser.cpp" break; case YYSYMBOL_unclosed_long_array_expr: /* unclosed_long_array_expr */ @@ -2906,7 +2904,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2910 "parser.cpp" +#line 2908 "parser.cpp" break; case YYSYMBOL_double_array_expr: /* double_array_expr */ @@ -2914,7 +2912,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2918 "parser.cpp" +#line 2916 "parser.cpp" break; case YYSYMBOL_unclosed_double_array_expr: /* unclosed_double_array_expr */ @@ -2922,7 +2920,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2926 "parser.cpp" +#line 2924 "parser.cpp" break; case YYSYMBOL_interval_expr: /* interval_expr */ @@ -2930,7 +2928,7 @@ yydestruct (const char *yymsg, { delete (((*yyvaluep).const_expr_t)); } -#line 2934 "parser.cpp" +#line 2932 "parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ @@ -2938,7 +2936,7 @@ yydestruct (const char *yymsg, { free(((*yyvaluep).str_value)); } -#line 2942 "parser.cpp" +#line 2940 "parser.cpp" break; case YYSYMBOL_if_not_exists_info: /* if_not_exists_info */ @@ -2949,7 +2947,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).if_not_exists_info_t)); } } -#line 2953 "parser.cpp" +#line 2951 "parser.cpp" break; case YYSYMBOL_with_index_param_list: /* with_index_param_list */ @@ -2963,7 +2961,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).with_index_param_list_t)); } } -#line 2967 "parser.cpp" +#line 2965 "parser.cpp" break; case YYSYMBOL_optional_table_properties_list: /* optional_table_properties_list */ @@ -2977,7 +2975,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).with_index_param_list_t)); } } -#line 2981 "parser.cpp" +#line 2979 "parser.cpp" break; case YYSYMBOL_index_info_list: /* index_info_list */ @@ -2991,7 +2989,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).index_info_list_t)); } } -#line 2995 "parser.cpp" +#line 2993 "parser.cpp" break; case YYSYMBOL_index_info_list_one_pack: /* index_info_list_one_pack */ @@ -3005,7 +3003,7 @@ yydestruct (const char *yymsg, delete (((*yyvaluep).index_info_list_t)); } } -#line 3009 "parser.cpp" +#line 3007 "parser.cpp" break; default: @@ -3113,7 +3111,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 3117 "parser.cpp" +#line 3115 "parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3328,7 +3326,7 @@ YYLTYPE yylloc = yyloc_default; { result->statements_ptr_ = (yyvsp[-1].stmt_array); } -#line 3332 "parser.cpp" +#line 3330 "parser.cpp" break; case 3: /* statement_list: statement */ @@ -3339,7 +3337,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_array) = new std::vector(); (yyval.stmt_array)->push_back((yyvsp[0].base_stmt)); } -#line 3343 "parser.cpp" +#line 3341 "parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3350,157 +3348,157 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_array)->push_back((yyvsp[0].base_stmt)); (yyval.stmt_array) = (yyvsp[-2].stmt_array); } -#line 3354 "parser.cpp" +#line 3352 "parser.cpp" break; case 5: /* statement: create_statement */ #line 509 "parser.y" { (yyval.base_stmt) = (yyvsp[0].create_stmt); } -#line 3360 "parser.cpp" +#line 3358 "parser.cpp" break; case 6: /* statement: drop_statement */ #line 510 "parser.y" { (yyval.base_stmt) = (yyvsp[0].drop_stmt); } -#line 3366 "parser.cpp" +#line 3364 "parser.cpp" break; case 7: /* statement: copy_statement */ #line 511 "parser.y" { (yyval.base_stmt) = (yyvsp[0].copy_stmt); } -#line 3372 "parser.cpp" +#line 3370 "parser.cpp" break; case 8: /* statement: show_statement */ #line 512 "parser.y" { (yyval.base_stmt) = (yyvsp[0].show_stmt); } -#line 3378 "parser.cpp" +#line 3376 "parser.cpp" break; case 9: /* statement: select_statement */ #line 513 "parser.y" { (yyval.base_stmt) = (yyvsp[0].select_stmt); } -#line 3384 "parser.cpp" +#line 3382 "parser.cpp" break; case 10: /* statement: delete_statement */ #line 514 "parser.y" { (yyval.base_stmt) = (yyvsp[0].delete_stmt); } -#line 3390 "parser.cpp" +#line 3388 "parser.cpp" break; case 11: /* statement: update_statement */ #line 515 "parser.y" { (yyval.base_stmt) = (yyvsp[0].update_stmt); } -#line 3396 "parser.cpp" +#line 3394 "parser.cpp" break; case 12: /* statement: insert_statement */ #line 516 "parser.y" { (yyval.base_stmt) = (yyvsp[0].insert_stmt); } -#line 3402 "parser.cpp" +#line 3400 "parser.cpp" break; case 13: /* statement: explain_statement */ #line 517 "parser.y" { (yyval.base_stmt) = (yyvsp[0].explain_stmt); } -#line 3408 "parser.cpp" +#line 3406 "parser.cpp" break; case 14: /* statement: flush_statement */ #line 518 "parser.y" { (yyval.base_stmt) = (yyvsp[0].flush_stmt); } -#line 3414 "parser.cpp" +#line 3412 "parser.cpp" break; case 15: /* statement: optimize_statement */ #line 519 "parser.y" { (yyval.base_stmt) = (yyvsp[0].optimize_stmt); } -#line 3420 "parser.cpp" +#line 3418 "parser.cpp" break; case 16: /* statement: command_statement */ #line 520 "parser.y" { (yyval.base_stmt) = (yyvsp[0].command_stmt); } -#line 3426 "parser.cpp" +#line 3424 "parser.cpp" break; case 17: /* statement: compact_statement */ #line 521 "parser.y" { (yyval.base_stmt) = (yyvsp[0].compact_stmt); } -#line 3432 "parser.cpp" +#line 3430 "parser.cpp" break; case 18: /* explainable_statement: create_statement */ #line 523 "parser.y" { (yyval.base_stmt) = (yyvsp[0].create_stmt); } -#line 3438 "parser.cpp" +#line 3436 "parser.cpp" break; case 19: /* explainable_statement: drop_statement */ #line 524 "parser.y" { (yyval.base_stmt) = (yyvsp[0].drop_stmt); } -#line 3444 "parser.cpp" +#line 3442 "parser.cpp" break; case 20: /* explainable_statement: copy_statement */ #line 525 "parser.y" { (yyval.base_stmt) = (yyvsp[0].copy_stmt); } -#line 3450 "parser.cpp" +#line 3448 "parser.cpp" break; case 21: /* explainable_statement: show_statement */ #line 526 "parser.y" { (yyval.base_stmt) = (yyvsp[0].show_stmt); } -#line 3456 "parser.cpp" +#line 3454 "parser.cpp" break; case 22: /* explainable_statement: select_statement */ #line 527 "parser.y" { (yyval.base_stmt) = (yyvsp[0].select_stmt); } -#line 3462 "parser.cpp" +#line 3460 "parser.cpp" break; case 23: /* explainable_statement: delete_statement */ #line 528 "parser.y" { (yyval.base_stmt) = (yyvsp[0].delete_stmt); } -#line 3468 "parser.cpp" +#line 3466 "parser.cpp" break; case 24: /* explainable_statement: update_statement */ #line 529 "parser.y" { (yyval.base_stmt) = (yyvsp[0].update_stmt); } -#line 3474 "parser.cpp" +#line 3472 "parser.cpp" break; case 25: /* explainable_statement: insert_statement */ #line 530 "parser.y" { (yyval.base_stmt) = (yyvsp[0].insert_stmt); } -#line 3480 "parser.cpp" +#line 3478 "parser.cpp" break; case 26: /* explainable_statement: flush_statement */ #line 531 "parser.y" { (yyval.base_stmt) = (yyvsp[0].flush_stmt); } -#line 3486 "parser.cpp" +#line 3484 "parser.cpp" break; case 27: /* explainable_statement: optimize_statement */ #line 532 "parser.y" { (yyval.base_stmt) = (yyvsp[0].optimize_stmt); } -#line 3492 "parser.cpp" +#line 3490 "parser.cpp" break; case 28: /* explainable_statement: command_statement */ #line 533 "parser.y" { (yyval.base_stmt) = (yyvsp[0].command_stmt); } -#line 3498 "parser.cpp" +#line 3496 "parser.cpp" break; case 29: /* explainable_statement: compact_statement */ #line 534 "parser.y" { (yyval.base_stmt) = (yyvsp[0].compact_stmt); } -#line 3504 "parser.cpp" +#line 3502 "parser.cpp" break; case 30: /* create_statement: CREATE DATABASE if_not_exists IDENTIFIER */ @@ -3520,7 +3518,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->create_info_ = create_schema_info; (yyval.create_stmt)->create_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; } -#line 3524 "parser.cpp" +#line 3522 "parser.cpp" break; case 31: /* create_statement: CREATE COLLECTION if_not_exists table_name */ @@ -3538,7 +3536,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->create_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; delete (yyvsp[0].table_name_t); } -#line 3542 "parser.cpp" +#line 3540 "parser.cpp" break; case 32: /* create_statement: CREATE TABLE if_not_exists table_name '(' table_element_array ')' optional_table_properties_list */ @@ -3571,7 +3569,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->create_info_ = create_table_info; (yyval.create_stmt)->create_info_->conflict_type_ = (yyvsp[-5].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; } -#line 3575 "parser.cpp" +#line 3573 "parser.cpp" break; case 33: /* create_statement: CREATE TABLE if_not_exists table_name AS select_statement */ @@ -3591,7 +3589,7 @@ YYLTYPE yylloc = yyloc_default; create_table_info->select_ = (yyvsp[0].select_stmt); (yyval.create_stmt)->create_info_ = create_table_info; } -#line 3595 "parser.cpp" +#line 3593 "parser.cpp" break; case 34: /* create_statement: CREATE VIEW if_not_exists table_name optional_identifier_array AS select_statement */ @@ -3612,7 +3610,7 @@ YYLTYPE yylloc = yyloc_default; create_view_info->conflict_type_ = (yyvsp[-4].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; (yyval.create_stmt)->create_info_ = create_view_info; } -#line 3616 "parser.cpp" +#line 3614 "parser.cpp" break; case 35: /* create_statement: CREATE INDEX if_not_exists_info ON table_name index_info_list */ @@ -3645,7 +3643,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt) = new infinity::CreateStatement(); (yyval.create_stmt)->create_info_ = create_index_info; } -#line 3649 "parser.cpp" +#line 3647 "parser.cpp" break; case 36: /* table_element_array: table_element */ @@ -3654,7 +3652,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table_element_array_t) = new std::vector(); (yyval.table_element_array_t)->push_back((yyvsp[0].table_element_t)); } -#line 3658 "parser.cpp" +#line 3656 "parser.cpp" break; case 37: /* table_element_array: table_element_array ',' table_element */ @@ -3663,7 +3661,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].table_element_array_t)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_array_t) = (yyvsp[-2].table_element_array_t); } -#line 3667 "parser.cpp" +#line 3665 "parser.cpp" break; case 38: /* table_element: table_column */ @@ -3671,7 +3669,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.table_element_t) = (yyvsp[0].table_column_t); } -#line 3675 "parser.cpp" +#line 3673 "parser.cpp" break; case 39: /* table_element: table_constraint */ @@ -3679,7 +3677,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3683 "parser.cpp" +#line 3681 "parser.cpp" break; case 40: /* table_column: IDENTIFIER column_type with_index_param_list default_expr */ @@ -3734,7 +3732,7 @@ YYLTYPE yylloc = yyloc_default; } */ } -#line 3738 "parser.cpp" +#line 3736 "parser.cpp" break; case 41: /* table_column: IDENTIFIER column_type column_constraints default_expr */ @@ -3773,416 +3771,428 @@ YYLTYPE yylloc = yyloc_default; } */ } -#line 3777 "parser.cpp" +#line 3775 "parser.cpp" break; case 42: /* column_type: BOOLEAN */ #line 772 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kBoolean, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3783 "parser.cpp" +#line 3781 "parser.cpp" break; case 43: /* column_type: TINYINT */ #line 773 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTinyInt, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3789 "parser.cpp" +#line 3787 "parser.cpp" break; case 44: /* column_type: SMALLINT */ #line 774 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSmallInt, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3795 "parser.cpp" +#line 3793 "parser.cpp" break; case 45: /* column_type: INTEGER */ #line 775 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kInteger, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3801 "parser.cpp" +#line 3799 "parser.cpp" break; case 46: /* column_type: INT */ #line 776 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kInteger, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3807 "parser.cpp" +#line 3805 "parser.cpp" break; case 47: /* column_type: BIGINT */ #line 777 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kBigInt, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3813 "parser.cpp" +#line 3811 "parser.cpp" break; case 48: /* column_type: HUGEINT */ #line 778 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kHugeInt, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3819 "parser.cpp" +#line 3817 "parser.cpp" break; case 49: /* column_type: FLOAT */ #line 779 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kFloat, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3825 "parser.cpp" +#line 3823 "parser.cpp" break; case 50: /* column_type: REAL */ #line 780 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kFloat, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3831 "parser.cpp" +#line 3829 "parser.cpp" break; case 51: /* column_type: DOUBLE */ #line 781 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDouble, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3837 "parser.cpp" +#line 3835 "parser.cpp" break; case 52: /* column_type: FLOAT16 */ #line 782 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kFloat16, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3843 "parser.cpp" +#line 3841 "parser.cpp" break; case 53: /* column_type: BFLOAT16 */ #line 783 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kBFloat16, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3849 "parser.cpp" +#line 3847 "parser.cpp" break; case 54: /* column_type: DATE */ #line 784 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDate, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3855 "parser.cpp" +#line 3853 "parser.cpp" break; case 55: /* column_type: TIME */ #line 785 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTime, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3861 "parser.cpp" +#line 3859 "parser.cpp" break; case 56: /* column_type: DATETIME */ #line 786 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDateTime, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3867 "parser.cpp" +#line 3865 "parser.cpp" break; case 57: /* column_type: TIMESTAMP */ #line 787 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTimestamp, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3873 "parser.cpp" +#line 3871 "parser.cpp" break; case 58: /* column_type: UUID */ #line 788 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kUuid, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3879 "parser.cpp" +#line 3877 "parser.cpp" break; case 59: /* column_type: POINT */ #line 789 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kPoint, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3885 "parser.cpp" +#line 3883 "parser.cpp" break; case 60: /* column_type: LINE */ #line 790 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kLine, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3891 "parser.cpp" +#line 3889 "parser.cpp" break; case 61: /* column_type: LSEG */ #line 791 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kLineSeg, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3897 "parser.cpp" +#line 3895 "parser.cpp" break; case 62: /* column_type: BOX */ #line 792 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kBox, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3903 "parser.cpp" +#line 3901 "parser.cpp" break; case 63: /* column_type: CIRCLE */ #line 795 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kCircle, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3909 "parser.cpp" +#line 3907 "parser.cpp" break; case 64: /* column_type: VARCHAR */ #line 797 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kVarchar, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3915 "parser.cpp" +#line 3913 "parser.cpp" break; case 65: /* column_type: DECIMAL '(' LONG_VALUE ',' LONG_VALUE ')' */ #line 798 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDecimal, 0, (yyvsp[-3].long_value), (yyvsp[-1].long_value), infinity::EmbeddingDataType::kElemInvalid}; } -#line 3921 "parser.cpp" +#line 3919 "parser.cpp" break; case 66: /* column_type: DECIMAL '(' LONG_VALUE ')' */ #line 799 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDecimal, 0, (yyvsp[-1].long_value), 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3927 "parser.cpp" +#line 3925 "parser.cpp" break; case 67: /* column_type: DECIMAL */ #line 800 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kDecimal, 0, 0, 0, infinity::EmbeddingDataType::kElemInvalid}; } -#line 3933 "parser.cpp" +#line 3931 "parser.cpp" break; case 68: /* column_type: EMBEDDING '(' BIT ',' LONG_VALUE ')' */ #line 803 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } -#line 3939 "parser.cpp" +#line 3937 "parser.cpp" break; case 69: /* column_type: EMBEDDING '(' TINYINT ',' LONG_VALUE ')' */ #line 804 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } -#line 3945 "parser.cpp" +#line 3943 "parser.cpp" break; case 70: /* column_type: EMBEDDING '(' SMALLINT ',' LONG_VALUE ')' */ #line 805 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } -#line 3951 "parser.cpp" +#line 3949 "parser.cpp" break; case 71: /* column_type: EMBEDDING '(' INTEGER ',' LONG_VALUE ')' */ #line 806 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 3957 "parser.cpp" +#line 3955 "parser.cpp" break; case 72: /* column_type: EMBEDDING '(' INT ',' LONG_VALUE ')' */ #line 807 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 3963 "parser.cpp" +#line 3961 "parser.cpp" break; case 73: /* column_type: EMBEDDING '(' BIGINT ',' LONG_VALUE ')' */ #line 808 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } -#line 3969 "parser.cpp" +#line 3967 "parser.cpp" break; case 74: /* column_type: EMBEDDING '(' FLOAT ',' LONG_VALUE ')' */ #line 809 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } -#line 3975 "parser.cpp" +#line 3973 "parser.cpp" break; case 75: /* column_type: EMBEDDING '(' DOUBLE ',' LONG_VALUE ')' */ #line 810 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } -#line 3981 "parser.cpp" +#line 3979 "parser.cpp" break; - case 76: /* column_type: TENSOR '(' BIT ',' LONG_VALUE ')' */ + case 76: /* column_type: EMBEDDING '(' UNSIGNED TINYINT ',' LONG_VALUE ')' */ #line 811 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } -#line 3987 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemUInt8}; } +#line 3985 "parser.cpp" break; - case 77: /* column_type: TENSOR '(' TINYINT ',' LONG_VALUE ')' */ + case 77: /* column_type: TENSOR '(' BIT ',' LONG_VALUE ')' */ #line 812 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } -#line 3993 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } +#line 3991 "parser.cpp" break; - case 78: /* column_type: TENSOR '(' SMALLINT ',' LONG_VALUE ')' */ + case 78: /* column_type: TENSOR '(' TINYINT ',' LONG_VALUE ')' */ #line 813 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } -#line 3999 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } +#line 3997 "parser.cpp" break; - case 79: /* column_type: TENSOR '(' INTEGER ',' LONG_VALUE ')' */ + case 79: /* column_type: TENSOR '(' SMALLINT ',' LONG_VALUE ')' */ #line 814 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4005 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } +#line 4003 "parser.cpp" break; - case 80: /* column_type: TENSOR '(' INT ',' LONG_VALUE ')' */ + case 80: /* column_type: TENSOR '(' INTEGER ',' LONG_VALUE ')' */ #line 815 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4011 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4009 "parser.cpp" break; - case 81: /* column_type: TENSOR '(' BIGINT ',' LONG_VALUE ')' */ + case 81: /* column_type: TENSOR '(' INT ',' LONG_VALUE ')' */ #line 816 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } -#line 4017 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4015 "parser.cpp" break; - case 82: /* column_type: TENSOR '(' FLOAT ',' LONG_VALUE ')' */ + case 82: /* column_type: TENSOR '(' BIGINT ',' LONG_VALUE ')' */ #line 817 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } -#line 4023 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } +#line 4021 "parser.cpp" break; - case 83: /* column_type: TENSOR '(' DOUBLE ',' LONG_VALUE ')' */ + case 83: /* column_type: TENSOR '(' FLOAT ',' LONG_VALUE ')' */ #line 818 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } -#line 4029 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } +#line 4027 "parser.cpp" break; - case 84: /* column_type: TENSORARRAY '(' BIT ',' LONG_VALUE ')' */ + case 84: /* column_type: TENSOR '(' DOUBLE ',' LONG_VALUE ')' */ #line 819 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } -#line 4035 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensor, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } +#line 4033 "parser.cpp" break; - case 85: /* column_type: TENSORARRAY '(' TINYINT ',' LONG_VALUE ')' */ + case 85: /* column_type: TENSORARRAY '(' BIT ',' LONG_VALUE ')' */ #line 820 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } -#line 4041 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } +#line 4039 "parser.cpp" break; - case 86: /* column_type: TENSORARRAY '(' SMALLINT ',' LONG_VALUE ')' */ + case 86: /* column_type: TENSORARRAY '(' TINYINT ',' LONG_VALUE ')' */ #line 821 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } -#line 4047 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } +#line 4045 "parser.cpp" break; - case 87: /* column_type: TENSORARRAY '(' INTEGER ',' LONG_VALUE ')' */ + case 87: /* column_type: TENSORARRAY '(' SMALLINT ',' LONG_VALUE ')' */ #line 822 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4053 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } +#line 4051 "parser.cpp" break; - case 88: /* column_type: TENSORARRAY '(' INT ',' LONG_VALUE ')' */ + case 88: /* column_type: TENSORARRAY '(' INTEGER ',' LONG_VALUE ')' */ #line 823 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4059 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4057 "parser.cpp" break; - case 89: /* column_type: TENSORARRAY '(' BIGINT ',' LONG_VALUE ')' */ + case 89: /* column_type: TENSORARRAY '(' INT ',' LONG_VALUE ')' */ #line 824 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } -#line 4065 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4063 "parser.cpp" break; - case 90: /* column_type: TENSORARRAY '(' FLOAT ',' LONG_VALUE ')' */ + case 90: /* column_type: TENSORARRAY '(' BIGINT ',' LONG_VALUE ')' */ #line 825 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } -#line 4071 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } +#line 4069 "parser.cpp" break; - case 91: /* column_type: TENSORARRAY '(' DOUBLE ',' LONG_VALUE ')' */ + case 91: /* column_type: TENSORARRAY '(' FLOAT ',' LONG_VALUE ')' */ #line 826 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } -#line 4077 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } +#line 4075 "parser.cpp" break; - case 92: /* column_type: VECTOR '(' BIT ',' LONG_VALUE ')' */ + case 92: /* column_type: TENSORARRAY '(' DOUBLE ',' LONG_VALUE ')' */ #line 827 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } -#line 4083 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kTensorArray, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } +#line 4081 "parser.cpp" break; - case 93: /* column_type: VECTOR '(' TINYINT ',' LONG_VALUE ')' */ + case 93: /* column_type: VECTOR '(' BIT ',' LONG_VALUE ')' */ #line 828 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } -#line 4089 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } +#line 4087 "parser.cpp" break; - case 94: /* column_type: VECTOR '(' SMALLINT ',' LONG_VALUE ')' */ + case 94: /* column_type: VECTOR '(' TINYINT ',' LONG_VALUE ')' */ #line 829 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } -#line 4095 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } +#line 4093 "parser.cpp" break; - case 95: /* column_type: VECTOR '(' INTEGER ',' LONG_VALUE ')' */ + case 95: /* column_type: VECTOR '(' SMALLINT ',' LONG_VALUE ')' */ #line 830 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4101 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } +#line 4099 "parser.cpp" break; - case 96: /* column_type: VECTOR '(' INT ',' LONG_VALUE ')' */ + case 96: /* column_type: VECTOR '(' INTEGER ',' LONG_VALUE ')' */ #line 831 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4107 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4105 "parser.cpp" break; - case 97: /* column_type: VECTOR '(' BIGINT ',' LONG_VALUE ')' */ + case 97: /* column_type: VECTOR '(' INT ',' LONG_VALUE ')' */ #line 832 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } -#line 4113 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4111 "parser.cpp" break; - case 98: /* column_type: VECTOR '(' FLOAT ',' LONG_VALUE ')' */ + case 98: /* column_type: VECTOR '(' BIGINT ',' LONG_VALUE ')' */ #line 833 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } -#line 4119 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } +#line 4117 "parser.cpp" break; - case 99: /* column_type: VECTOR '(' DOUBLE ',' LONG_VALUE ')' */ + case 99: /* column_type: VECTOR '(' FLOAT ',' LONG_VALUE ')' */ #line 834 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } -#line 4125 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } +#line 4123 "parser.cpp" break; - case 100: /* column_type: SPARSE '(' BIT ',' LONG_VALUE ')' */ + case 100: /* column_type: VECTOR '(' DOUBLE ',' LONG_VALUE ')' */ #line 835 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } -#line 4131 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } +#line 4129 "parser.cpp" break; - case 101: /* column_type: SPARSE '(' TINYINT ',' LONG_VALUE ')' */ + case 101: /* column_type: VECTOR '(' UNSIGNED TINYINT ',' LONG_VALUE ')' */ #line 836 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } -#line 4137 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kEmbedding, (yyvsp[-1].long_value), 0, 0, infinity::kElemUInt8}; } +#line 4135 "parser.cpp" break; - case 102: /* column_type: SPARSE '(' SMALLINT ',' LONG_VALUE ')' */ + case 102: /* column_type: SPARSE '(' BIT ',' LONG_VALUE ')' */ #line 837 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } -#line 4143 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemBit}; } +#line 4141 "parser.cpp" break; - case 103: /* column_type: SPARSE '(' INTEGER ',' LONG_VALUE ')' */ + case 103: /* column_type: SPARSE '(' TINYINT ',' LONG_VALUE ')' */ #line 838 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4149 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt8}; } +#line 4147 "parser.cpp" break; - case 104: /* column_type: SPARSE '(' INT ',' LONG_VALUE ')' */ + case 104: /* column_type: SPARSE '(' SMALLINT ',' LONG_VALUE ')' */ #line 839 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } -#line 4155 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt16}; } +#line 4153 "parser.cpp" break; - case 105: /* column_type: SPARSE '(' BIGINT ',' LONG_VALUE ')' */ + case 105: /* column_type: SPARSE '(' INTEGER ',' LONG_VALUE ')' */ #line 840 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } -#line 4161 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4159 "parser.cpp" break; - case 106: /* column_type: SPARSE '(' FLOAT ',' LONG_VALUE ')' */ + case 106: /* column_type: SPARSE '(' INT ',' LONG_VALUE ')' */ #line 841 "parser.y" - { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } -#line 4167 "parser.cpp" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt32}; } +#line 4165 "parser.cpp" break; - case 107: /* column_type: SPARSE '(' DOUBLE ',' LONG_VALUE ')' */ + case 107: /* column_type: SPARSE '(' BIGINT ',' LONG_VALUE ')' */ #line 842 "parser.y" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemInt64}; } +#line 4171 "parser.cpp" + break; + + case 108: /* column_type: SPARSE '(' FLOAT ',' LONG_VALUE ')' */ +#line 843 "parser.y" + { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemFloat}; } +#line 4177 "parser.cpp" + break; + + case 109: /* column_type: SPARSE '(' DOUBLE ',' LONG_VALUE ')' */ +#line 844 "parser.y" { (yyval.column_type_t) = infinity::ColumnType{infinity::LogicalType::kSparse, (yyvsp[-1].long_value), 0, 0, infinity::kElemDouble}; } -#line 4173 "parser.cpp" +#line 4183 "parser.cpp" break; - case 108: /* column_constraints: column_constraint */ -#line 861 "parser.y" + case 110: /* column_constraints: column_constraint */ +#line 863 "parser.y" { (yyval.column_constraints_t) = new std::set(); (yyval.column_constraints_t)->insert((yyvsp[0].column_constraint_t)); } -#line 4182 "parser.cpp" +#line 4192 "parser.cpp" break; - case 109: /* column_constraints: column_constraints column_constraint */ -#line 865 "parser.y" + case 111: /* column_constraints: column_constraints column_constraint */ +#line 867 "parser.y" { if((yyvsp[-1].column_constraints_t)->contains((yyvsp[0].column_constraint_t))) { yyerror(&yyloc, scanner, result, "Duplicate column constraint."); @@ -4192,101 +4202,101 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-1].column_constraints_t)->insert((yyvsp[0].column_constraint_t)); (yyval.column_constraints_t) = (yyvsp[-1].column_constraints_t); } -#line 4196 "parser.cpp" +#line 4206 "parser.cpp" break; - case 110: /* column_constraint: PRIMARY KEY */ -#line 875 "parser.y" + case 112: /* column_constraint: PRIMARY KEY */ +#line 877 "parser.y" { (yyval.column_constraint_t) = infinity::ConstraintType::kPrimaryKey; } -#line 4204 "parser.cpp" +#line 4214 "parser.cpp" break; - case 111: /* column_constraint: UNIQUE */ -#line 878 "parser.y" + case 113: /* column_constraint: UNIQUE */ +#line 880 "parser.y" { (yyval.column_constraint_t) = infinity::ConstraintType::kUnique; } -#line 4212 "parser.cpp" +#line 4222 "parser.cpp" break; - case 112: /* column_constraint: NULLABLE */ -#line 881 "parser.y" + case 114: /* column_constraint: NULLABLE */ +#line 883 "parser.y" { (yyval.column_constraint_t) = infinity::ConstraintType::kNull; } -#line 4220 "parser.cpp" +#line 4230 "parser.cpp" break; - case 113: /* column_constraint: NOT NULLABLE */ -#line 884 "parser.y" + case 115: /* column_constraint: NOT NULLABLE */ +#line 886 "parser.y" { (yyval.column_constraint_t) = infinity::ConstraintType::kNotNull; } -#line 4228 "parser.cpp" +#line 4238 "parser.cpp" break; - case 114: /* default_expr: DEFAULT constant_expr */ -#line 888 "parser.y" + case 116: /* default_expr: DEFAULT constant_expr */ +#line 890 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 4236 "parser.cpp" +#line 4246 "parser.cpp" break; - case 115: /* default_expr: %empty */ -#line 891 "parser.y" + case 117: /* default_expr: %empty */ +#line 893 "parser.y" { (yyval.const_expr_t) = nullptr; } -#line 4244 "parser.cpp" +#line 4254 "parser.cpp" break; - case 116: /* table_constraint: PRIMARY KEY '(' identifier_array ')' */ -#line 896 "parser.y" + case 118: /* table_constraint: PRIMARY KEY '(' identifier_array ')' */ +#line 898 "parser.y" { (yyval.table_constraint_t) = new infinity::TableConstraint(); (yyval.table_constraint_t)->names_ptr_ = (yyvsp[-1].identifier_array_t); (yyval.table_constraint_t)->constraint_ = infinity::ConstraintType::kPrimaryKey; } -#line 4254 "parser.cpp" +#line 4264 "parser.cpp" break; - case 117: /* table_constraint: UNIQUE '(' identifier_array ')' */ -#line 901 "parser.y" + case 119: /* table_constraint: UNIQUE '(' identifier_array ')' */ +#line 903 "parser.y" { (yyval.table_constraint_t) = new infinity::TableConstraint(); (yyval.table_constraint_t)->names_ptr_ = (yyvsp[-1].identifier_array_t); (yyval.table_constraint_t)->constraint_ = infinity::ConstraintType::kUnique; } -#line 4264 "parser.cpp" +#line 4274 "parser.cpp" break; - case 118: /* identifier_array: IDENTIFIER */ -#line 908 "parser.y" + case 120: /* identifier_array: IDENTIFIER */ +#line 910 "parser.y" { (yyval.identifier_array_t) = new std::vector(); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.identifier_array_t)->emplace_back((yyvsp[0].str_value)); free((yyvsp[0].str_value)); } -#line 4275 "parser.cpp" +#line 4285 "parser.cpp" break; - case 119: /* identifier_array: identifier_array ',' IDENTIFIER */ -#line 914 "parser.y" + case 121: /* identifier_array: identifier_array ',' IDENTIFIER */ +#line 916 "parser.y" { ParserHelper::ToLower((yyvsp[0].str_value)); (yyvsp[-2].identifier_array_t)->emplace_back((yyvsp[0].str_value)); free((yyvsp[0].str_value)); (yyval.identifier_array_t) = (yyvsp[-2].identifier_array_t); } -#line 4286 "parser.cpp" +#line 4296 "parser.cpp" break; - case 120: /* delete_statement: DELETE FROM table_name where_clause */ -#line 924 "parser.y" + case 122: /* delete_statement: DELETE FROM table_name where_clause */ +#line 926 "parser.y" { (yyval.delete_stmt) = new infinity::DeleteStatement(); @@ -4299,11 +4309,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-1].table_name_t); (yyval.delete_stmt)->where_expr_ = (yyvsp[0].expr_t); } -#line 4303 "parser.cpp" +#line 4313 "parser.cpp" break; - case 121: /* insert_statement: INSERT INTO table_name optional_identifier_array VALUES expr_array_list */ -#line 940 "parser.y" + case 123: /* insert_statement: INSERT INTO table_name optional_identifier_array VALUES expr_array_list */ +#line 942 "parser.y" { bool is_error{false}; for (auto expr_array : *(yyvsp[0].expr_array_list_t)) { @@ -4338,11 +4348,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns_ = (yyvsp[-2].identifier_array_t); (yyval.insert_stmt)->values_ = (yyvsp[0].expr_array_list_t); } -#line 4342 "parser.cpp" +#line 4352 "parser.cpp" break; - case 122: /* insert_statement: INSERT INTO table_name optional_identifier_array select_without_paren */ -#line 974 "parser.y" + case 124: /* insert_statement: INSERT INTO table_name optional_identifier_array select_without_paren */ +#line 976 "parser.y" { (yyval.insert_stmt) = new infinity::InsertStatement(); if((yyvsp[-2].table_name_t)->schema_name_ptr_ != nullptr) { @@ -4355,101 +4365,101 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns_ = (yyvsp[-1].identifier_array_t); (yyval.insert_stmt)->select_ = (yyvsp[0].select_stmt); } -#line 4359 "parser.cpp" +#line 4369 "parser.cpp" break; - case 123: /* optional_identifier_array: '(' identifier_array ')' */ -#line 987 "parser.y" + case 125: /* optional_identifier_array: '(' identifier_array ')' */ +#line 989 "parser.y" { (yyval.identifier_array_t) = (yyvsp[-1].identifier_array_t); } -#line 4367 "parser.cpp" +#line 4377 "parser.cpp" break; - case 124: /* optional_identifier_array: %empty */ -#line 990 "parser.y" + case 126: /* optional_identifier_array: %empty */ +#line 992 "parser.y" { (yyval.identifier_array_t) = nullptr; } -#line 4375 "parser.cpp" +#line 4385 "parser.cpp" break; - case 125: /* explain_statement: EXPLAIN explain_type explainable_statement */ -#line 997 "parser.y" + case 127: /* explain_statement: EXPLAIN explain_type explainable_statement */ +#line 999 "parser.y" { (yyval.explain_stmt) = new infinity::ExplainStatement(); (yyval.explain_stmt)->type_ = (yyvsp[-1].explain_type_t); (yyval.explain_stmt)->statement_ = (yyvsp[0].base_stmt); } -#line 4385 "parser.cpp" +#line 4395 "parser.cpp" break; - case 126: /* explain_type: ANALYZE */ -#line 1003 "parser.y" + case 128: /* explain_type: ANALYZE */ +#line 1005 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kAnalyze; } -#line 4393 "parser.cpp" +#line 4403 "parser.cpp" break; - case 127: /* explain_type: AST */ -#line 1006 "parser.y" + case 129: /* explain_type: AST */ +#line 1008 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kAst; } -#line 4401 "parser.cpp" +#line 4411 "parser.cpp" break; - case 128: /* explain_type: RAW */ -#line 1009 "parser.y" + case 130: /* explain_type: RAW */ +#line 1011 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kUnOpt; } -#line 4409 "parser.cpp" +#line 4419 "parser.cpp" break; - case 129: /* explain_type: LOGICAL */ -#line 1012 "parser.y" + case 131: /* explain_type: LOGICAL */ +#line 1014 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kOpt; } -#line 4417 "parser.cpp" +#line 4427 "parser.cpp" break; - case 130: /* explain_type: PHYSICAL */ -#line 1015 "parser.y" + case 132: /* explain_type: PHYSICAL */ +#line 1017 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kPhysical; } -#line 4425 "parser.cpp" +#line 4435 "parser.cpp" break; - case 131: /* explain_type: PIPELINE */ -#line 1018 "parser.y" + case 133: /* explain_type: PIPELINE */ +#line 1020 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kPipeline; } -#line 4433 "parser.cpp" +#line 4443 "parser.cpp" break; - case 132: /* explain_type: FRAGMENT */ -#line 1021 "parser.y" + case 134: /* explain_type: FRAGMENT */ +#line 1023 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kFragment; } -#line 4441 "parser.cpp" +#line 4451 "parser.cpp" break; - case 133: /* explain_type: %empty */ -#line 1024 "parser.y" + case 135: /* explain_type: %empty */ +#line 1026 "parser.y" { (yyval.explain_type_t) = infinity::ExplainType::kPhysical; } -#line 4449 "parser.cpp" +#line 4459 "parser.cpp" break; - case 134: /* update_statement: UPDATE table_name SET update_expr_array where_clause */ -#line 1031 "parser.y" + case 136: /* update_statement: UPDATE table_name SET update_expr_array where_clause */ +#line 1033 "parser.y" { (yyval.update_stmt) = new infinity::UpdateStatement(); if((yyvsp[-3].table_name_t)->schema_name_ptr_ != nullptr) { @@ -4462,29 +4472,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->where_expr_ = (yyvsp[0].expr_t); (yyval.update_stmt)->update_expr_array_ = (yyvsp[-1].update_expr_array_t); } -#line 4466 "parser.cpp" +#line 4476 "parser.cpp" break; - case 135: /* update_expr_array: update_expr */ -#line 1044 "parser.y" + case 137: /* update_expr_array: update_expr */ +#line 1046 "parser.y" { (yyval.update_expr_array_t) = new std::vector(); (yyval.update_expr_array_t)->emplace_back((yyvsp[0].update_expr_t)); } -#line 4475 "parser.cpp" +#line 4485 "parser.cpp" break; - case 136: /* update_expr_array: update_expr_array ',' update_expr */ -#line 1048 "parser.y" + case 138: /* update_expr_array: update_expr_array ',' update_expr */ +#line 1050 "parser.y" { (yyvsp[-2].update_expr_array_t)->emplace_back((yyvsp[0].update_expr_t)); (yyval.update_expr_array_t) = (yyvsp[-2].update_expr_array_t); } -#line 4484 "parser.cpp" +#line 4494 "parser.cpp" break; - case 137: /* update_expr: IDENTIFIER '=' expr */ -#line 1053 "parser.y" + case 139: /* update_expr: IDENTIFIER '=' expr */ +#line 1055 "parser.y" { (yyval.update_expr_t) = new infinity::UpdateExpr(); ParserHelper::ToLower((yyvsp[-2].str_value)); @@ -4492,11 +4502,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].str_value)); (yyval.update_expr_t)->value = (yyvsp[0].expr_t); } -#line 4496 "parser.cpp" +#line 4506 "parser.cpp" break; - case 138: /* drop_statement: DROP DATABASE if_exists IDENTIFIER */ -#line 1066 "parser.y" + case 140: /* drop_statement: DROP DATABASE if_exists IDENTIFIER */ +#line 1068 "parser.y" { (yyval.drop_stmt) = new infinity::DropStatement(); std::shared_ptr drop_schema_info = std::make_shared(); @@ -4508,11 +4518,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->drop_info_ = drop_schema_info; (yyval.drop_stmt)->drop_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; } -#line 4512 "parser.cpp" +#line 4522 "parser.cpp" break; - case 139: /* drop_statement: DROP COLLECTION if_exists table_name */ -#line 1079 "parser.y" + case 141: /* drop_statement: DROP COLLECTION if_exists table_name */ +#line 1081 "parser.y" { (yyval.drop_stmt) = new infinity::DropStatement(); std::shared_ptr drop_collection_info = std::make_unique(); @@ -4526,11 +4536,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->drop_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; delete (yyvsp[0].table_name_t); } -#line 4530 "parser.cpp" +#line 4540 "parser.cpp" break; - case 140: /* drop_statement: DROP TABLE if_exists table_name */ -#line 1094 "parser.y" + case 142: /* drop_statement: DROP TABLE if_exists table_name */ +#line 1096 "parser.y" { (yyval.drop_stmt) = new infinity::DropStatement(); std::shared_ptr drop_table_info = std::make_unique(); @@ -4544,11 +4554,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->drop_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; delete (yyvsp[0].table_name_t); } -#line 4548 "parser.cpp" +#line 4558 "parser.cpp" break; - case 141: /* drop_statement: DROP VIEW if_exists table_name */ -#line 1109 "parser.y" + case 143: /* drop_statement: DROP VIEW if_exists table_name */ +#line 1111 "parser.y" { (yyval.drop_stmt) = new infinity::DropStatement(); std::shared_ptr drop_view_info = std::make_unique(); @@ -4562,11 +4572,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->drop_info_->conflict_type_ = (yyvsp[-1].bool_value) ? infinity::ConflictType::kIgnore : infinity::ConflictType::kError; delete (yyvsp[0].table_name_t); } -#line 4566 "parser.cpp" +#line 4576 "parser.cpp" break; - case 142: /* drop_statement: DROP INDEX if_exists IDENTIFIER ON table_name */ -#line 1124 "parser.y" + case 144: /* drop_statement: DROP INDEX if_exists IDENTIFIER ON table_name */ +#line 1126 "parser.y" { (yyval.drop_stmt) = new infinity::DropStatement(); std::shared_ptr drop_index_info = std::make_shared(); @@ -4585,11 +4595,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].table_name_t)->table_name_ptr_); delete (yyvsp[0].table_name_t); } -#line 4589 "parser.cpp" +#line 4599 "parser.cpp" break; - case 143: /* copy_statement: COPY table_name TO file_path WITH '(' copy_option_list ')' */ -#line 1147 "parser.y" + case 145: /* copy_statement: COPY table_name TO file_path WITH '(' copy_option_list ')' */ +#line 1149 "parser.y" { (yyval.copy_stmt) = new infinity::CopyStatement(); @@ -4643,11 +4653,11 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].copy_option_array); } -#line 4647 "parser.cpp" +#line 4657 "parser.cpp" break; - case 144: /* copy_statement: COPY table_name '(' expr_array ')' TO file_path WITH '(' copy_option_list ')' */ -#line 1200 "parser.y" + case 146: /* copy_statement: COPY table_name '(' expr_array ')' TO file_path WITH '(' copy_option_list ')' */ +#line 1202 "parser.y" { (yyval.copy_stmt) = new infinity::CopyStatement(); @@ -4703,11 +4713,11 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].copy_option_array); } -#line 4707 "parser.cpp" +#line 4717 "parser.cpp" break; - case 145: /* copy_statement: COPY table_name FROM file_path WITH '(' copy_option_list ')' */ -#line 1255 "parser.y" + case 147: /* copy_statement: COPY table_name FROM file_path WITH '(' copy_option_list ')' */ +#line 1257 "parser.y" { (yyval.copy_stmt) = new infinity::CopyStatement(); @@ -4755,27 +4765,27 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].copy_option_array); } -#line 4759 "parser.cpp" +#line 4769 "parser.cpp" break; - case 146: /* select_statement: select_without_paren */ -#line 1306 "parser.y" + case 148: /* select_statement: select_without_paren */ +#line 1308 "parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 4767 "parser.cpp" +#line 4777 "parser.cpp" break; - case 147: /* select_statement: select_with_paren */ -#line 1309 "parser.y" + case 149: /* select_statement: select_with_paren */ +#line 1311 "parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 4775 "parser.cpp" +#line 4785 "parser.cpp" break; - case 148: /* select_statement: select_statement set_operator select_clause_without_modifier_paren */ -#line 1312 "parser.y" + case 150: /* select_statement: select_statement set_operator select_clause_without_modifier_paren */ +#line 1314 "parser.y" { infinity::SelectStatement* node = (yyvsp[-2].select_stmt); while(node->nested_select_ != nullptr) { @@ -4785,11 +4795,11 @@ YYLTYPE yylloc = yyloc_default; node->nested_select_ = (yyvsp[0].select_stmt); (yyval.select_stmt) = (yyvsp[-2].select_stmt); } -#line 4789 "parser.cpp" +#line 4799 "parser.cpp" break; - case 149: /* select_statement: select_statement set_operator select_clause_without_modifier */ -#line 1321 "parser.y" + case 151: /* select_statement: select_statement set_operator select_clause_without_modifier */ +#line 1323 "parser.y" { infinity::SelectStatement* node = (yyvsp[-2].select_stmt); while(node->nested_select_ != nullptr) { @@ -4799,36 +4809,36 @@ YYLTYPE yylloc = yyloc_default; node->nested_select_ = (yyvsp[0].select_stmt); (yyval.select_stmt) = (yyvsp[-2].select_stmt); } -#line 4803 "parser.cpp" +#line 4813 "parser.cpp" break; - case 150: /* select_with_paren: '(' select_without_paren ')' */ -#line 1331 "parser.y" + case 152: /* select_with_paren: '(' select_without_paren ')' */ +#line 1333 "parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4811 "parser.cpp" +#line 4821 "parser.cpp" break; - case 151: /* select_with_paren: '(' select_with_paren ')' */ -#line 1334 "parser.y" + case 153: /* select_with_paren: '(' select_with_paren ')' */ +#line 1336 "parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4819 "parser.cpp" +#line 4829 "parser.cpp" break; - case 152: /* select_without_paren: with_clause select_clause_with_modifier */ -#line 1338 "parser.y" + case 154: /* select_without_paren: with_clause select_clause_with_modifier */ +#line 1340 "parser.y" { (yyvsp[0].select_stmt)->with_exprs_ = (yyvsp[-1].with_expr_list_t); (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 4828 "parser.cpp" +#line 4838 "parser.cpp" break; - case 153: /* select_clause_with_modifier: select_clause_without_modifier order_by_clause limit_expr offset_expr */ -#line 1343 "parser.y" + case 155: /* select_clause_with_modifier: select_clause_without_modifier order_by_clause limit_expr offset_expr */ +#line 1345 "parser.y" { if((yyvsp[-1].expr_t) == nullptr and (yyvsp[0].expr_t) != nullptr) { delete (yyvsp[-3].select_stmt); @@ -4850,27 +4860,27 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-3].select_stmt)->offset_expr_ = (yyvsp[0].expr_t); (yyval.select_stmt) = (yyvsp[-3].select_stmt); } -#line 4854 "parser.cpp" +#line 4864 "parser.cpp" break; - case 154: /* select_clause_without_modifier_paren: '(' select_clause_without_modifier ')' */ -#line 1365 "parser.y" + case 156: /* select_clause_without_modifier_paren: '(' select_clause_without_modifier ')' */ +#line 1367 "parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4862 "parser.cpp" +#line 4872 "parser.cpp" break; - case 155: /* select_clause_without_modifier_paren: '(' select_clause_without_modifier_paren ')' */ -#line 1368 "parser.y" + case 157: /* select_clause_without_modifier_paren: '(' select_clause_without_modifier_paren ')' */ +#line 1370 "parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4870 "parser.cpp" +#line 4880 "parser.cpp" break; - case 156: /* select_clause_without_modifier: SELECT distinct expr_array from_clause search_clause where_clause group_by_clause having_clause */ -#line 1373 "parser.y" + case 158: /* select_clause_without_modifier: SELECT distinct expr_array from_clause search_clause where_clause group_by_clause having_clause */ +#line 1375 "parser.y" { (yyval.select_stmt) = new infinity::SelectStatement(); (yyval.select_stmt)->select_list_ = (yyvsp[-5].expr_array_t); @@ -4886,245 +4896,245 @@ YYLTYPE yylloc = yyloc_default; YYERROR; } } -#line 4890 "parser.cpp" +#line 4900 "parser.cpp" break; - case 157: /* order_by_clause: ORDER BY order_by_expr_list */ -#line 1389 "parser.y" + case 159: /* order_by_clause: ORDER BY order_by_expr_list */ +#line 1391 "parser.y" { (yyval.order_by_expr_list_t) = (yyvsp[0].order_by_expr_list_t); } -#line 4898 "parser.cpp" +#line 4908 "parser.cpp" break; - case 158: /* order_by_clause: %empty */ -#line 1392 "parser.y" + case 160: /* order_by_clause: %empty */ +#line 1394 "parser.y" { (yyval.order_by_expr_list_t) = nullptr; } -#line 4906 "parser.cpp" +#line 4916 "parser.cpp" break; - case 159: /* order_by_expr_list: order_by_expr */ -#line 1396 "parser.y" + case 161: /* order_by_expr_list: order_by_expr */ +#line 1398 "parser.y" { (yyval.order_by_expr_list_t) = new std::vector(); (yyval.order_by_expr_list_t)->emplace_back((yyvsp[0].order_by_expr_t)); } -#line 4915 "parser.cpp" +#line 4925 "parser.cpp" break; - case 160: /* order_by_expr_list: order_by_expr_list ',' order_by_expr */ -#line 1400 "parser.y" + case 162: /* order_by_expr_list: order_by_expr_list ',' order_by_expr */ +#line 1402 "parser.y" { (yyvsp[-2].order_by_expr_list_t)->emplace_back((yyvsp[0].order_by_expr_t)); (yyval.order_by_expr_list_t) = (yyvsp[-2].order_by_expr_list_t); } -#line 4924 "parser.cpp" +#line 4934 "parser.cpp" break; - case 161: /* order_by_expr: expr order_by_type */ -#line 1405 "parser.y" + case 163: /* order_by_expr: expr order_by_type */ +#line 1407 "parser.y" { (yyval.order_by_expr_t) = new infinity::OrderByExpr(); (yyval.order_by_expr_t)->expr_ = (yyvsp[-1].expr_t); (yyval.order_by_expr_t)->type_ = (yyvsp[0].order_by_type_t); } -#line 4934 "parser.cpp" +#line 4944 "parser.cpp" break; - case 162: /* order_by_type: ASC */ -#line 1411 "parser.y" + case 164: /* order_by_type: ASC */ +#line 1413 "parser.y" { (yyval.order_by_type_t) = infinity::kAsc; } -#line 4942 "parser.cpp" +#line 4952 "parser.cpp" break; - case 163: /* order_by_type: DESC */ -#line 1414 "parser.y" + case 165: /* order_by_type: DESC */ +#line 1416 "parser.y" { (yyval.order_by_type_t) = infinity::kDesc; } -#line 4950 "parser.cpp" +#line 4960 "parser.cpp" break; - case 164: /* order_by_type: %empty */ -#line 1417 "parser.y" + case 166: /* order_by_type: %empty */ +#line 1419 "parser.y" { (yyval.order_by_type_t) = infinity::kAsc; } -#line 4958 "parser.cpp" +#line 4968 "parser.cpp" break; - case 165: /* limit_expr: LIMIT expr */ -#line 1421 "parser.y" + case 167: /* limit_expr: LIMIT expr */ +#line 1423 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 4966 "parser.cpp" +#line 4976 "parser.cpp" break; - case 166: /* limit_expr: %empty */ -#line 1425 "parser.y" + case 168: /* limit_expr: %empty */ +#line 1427 "parser.y" { (yyval.expr_t) = nullptr; } -#line 4972 "parser.cpp" +#line 4982 "parser.cpp" break; - case 167: /* offset_expr: OFFSET expr */ -#line 1427 "parser.y" + case 169: /* offset_expr: OFFSET expr */ +#line 1429 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 4980 "parser.cpp" +#line 4990 "parser.cpp" break; - case 168: /* offset_expr: %empty */ -#line 1431 "parser.y" + case 170: /* offset_expr: %empty */ +#line 1433 "parser.y" { (yyval.expr_t) = nullptr; } -#line 4986 "parser.cpp" +#line 4996 "parser.cpp" break; - case 169: /* distinct: DISTINCT */ -#line 1433 "parser.y" + case 171: /* distinct: DISTINCT */ +#line 1435 "parser.y" { (yyval.bool_value) = true; } -#line 4994 "parser.cpp" +#line 5004 "parser.cpp" break; - case 170: /* distinct: %empty */ -#line 1436 "parser.y" + case 172: /* distinct: %empty */ +#line 1438 "parser.y" { (yyval.bool_value) = false; } -#line 5002 "parser.cpp" +#line 5012 "parser.cpp" break; - case 171: /* from_clause: FROM table_reference */ -#line 1440 "parser.y" + case 173: /* from_clause: FROM table_reference */ +#line 1442 "parser.y" { (yyval.table_reference_t) = (yyvsp[0].table_reference_t); } -#line 5010 "parser.cpp" +#line 5020 "parser.cpp" break; - case 172: /* from_clause: %empty */ -#line 1443 "parser.y" + case 174: /* from_clause: %empty */ +#line 1445 "parser.y" { (yyval.table_reference_t) = nullptr; } -#line 5018 "parser.cpp" +#line 5028 "parser.cpp" break; - case 173: /* search_clause: SEARCH sub_search_array */ -#line 1447 "parser.y" + case 175: /* search_clause: SEARCH sub_search_array */ +#line 1449 "parser.y" { infinity::SearchExpr* search_expr = new infinity::SearchExpr(); search_expr->SetExprs((yyvsp[0].expr_array_t)); (yyval.expr_t) = search_expr; } -#line 5028 "parser.cpp" +#line 5038 "parser.cpp" break; - case 174: /* search_clause: %empty */ -#line 1452 "parser.y" + case 176: /* search_clause: %empty */ +#line 1454 "parser.y" { (yyval.expr_t) = nullptr; } -#line 5036 "parser.cpp" +#line 5046 "parser.cpp" break; - case 175: /* where_clause: WHERE expr */ -#line 1456 "parser.y" + case 177: /* where_clause: WHERE expr */ +#line 1458 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 5044 "parser.cpp" +#line 5054 "parser.cpp" break; - case 176: /* where_clause: %empty */ -#line 1459 "parser.y" + case 178: /* where_clause: %empty */ +#line 1461 "parser.y" { (yyval.expr_t) = nullptr; } -#line 5052 "parser.cpp" +#line 5062 "parser.cpp" break; - case 177: /* having_clause: HAVING expr */ -#line 1463 "parser.y" + case 179: /* having_clause: HAVING expr */ +#line 1465 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 5060 "parser.cpp" +#line 5070 "parser.cpp" break; - case 178: /* having_clause: %empty */ -#line 1466 "parser.y" + case 180: /* having_clause: %empty */ +#line 1468 "parser.y" { (yyval.expr_t) = nullptr; } -#line 5068 "parser.cpp" +#line 5078 "parser.cpp" break; - case 179: /* group_by_clause: GROUP BY expr_array */ -#line 1470 "parser.y" + case 181: /* group_by_clause: GROUP BY expr_array */ +#line 1472 "parser.y" { (yyval.expr_array_t) = (yyvsp[0].expr_array_t); } -#line 5076 "parser.cpp" +#line 5086 "parser.cpp" break; - case 180: /* group_by_clause: %empty */ -#line 1473 "parser.y" + case 182: /* group_by_clause: %empty */ +#line 1475 "parser.y" { (yyval.expr_array_t) = nullptr; } -#line 5084 "parser.cpp" +#line 5094 "parser.cpp" break; - case 181: /* set_operator: UNION */ -#line 1477 "parser.y" + case 183: /* set_operator: UNION */ +#line 1479 "parser.y" { (yyval.set_operator_t) = infinity::SetOperatorType::kUnion; } -#line 5092 "parser.cpp" +#line 5102 "parser.cpp" break; - case 182: /* set_operator: UNION ALL */ -#line 1480 "parser.y" + case 184: /* set_operator: UNION ALL */ +#line 1482 "parser.y" { (yyval.set_operator_t) = infinity::SetOperatorType::kUnionAll; } -#line 5100 "parser.cpp" +#line 5110 "parser.cpp" break; - case 183: /* set_operator: INTERSECT */ -#line 1483 "parser.y" + case 185: /* set_operator: INTERSECT */ +#line 1485 "parser.y" { (yyval.set_operator_t) = infinity::SetOperatorType::kIntersect; } -#line 5108 "parser.cpp" +#line 5118 "parser.cpp" break; - case 184: /* set_operator: EXCEPT */ -#line 1486 "parser.y" + case 186: /* set_operator: EXCEPT */ +#line 1488 "parser.y" { (yyval.set_operator_t) = infinity::SetOperatorType::kExcept; } -#line 5116 "parser.cpp" +#line 5126 "parser.cpp" break; - case 185: /* table_reference: table_reference_unit */ -#line 1494 "parser.y" + case 187: /* table_reference: table_reference_unit */ +#line 1496 "parser.y" { (yyval.table_reference_t) = (yyvsp[0].table_reference_t); } -#line 5124 "parser.cpp" +#line 5134 "parser.cpp" break; - case 186: /* table_reference: table_reference ',' table_reference_unit */ -#line 1497 "parser.y" + case 188: /* table_reference: table_reference ',' table_reference_unit */ +#line 1499 "parser.y" { infinity::CrossProductReference* cross_product_ref = nullptr; if((yyvsp[-2].table_reference_t)->type_ == infinity::TableRefType::kCrossProduct) { @@ -5138,11 +5148,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table_reference_t) = cross_product_ref; } -#line 5142 "parser.cpp" +#line 5152 "parser.cpp" break; - case 189: /* table_reference_name: table_name table_alias */ -#line 1514 "parser.y" + case 191: /* table_reference_name: table_name table_alias */ +#line 1516 "parser.y" { infinity::TableReference* table_ref = new infinity::TableReference(); if((yyvsp[-1].table_name_t)->schema_name_ptr_ != nullptr) { @@ -5156,32 +5166,32 @@ YYLTYPE yylloc = yyloc_default; table_ref->alias_ = (yyvsp[0].table_alias_t); (yyval.table_reference_t) = table_ref; } -#line 5160 "parser.cpp" +#line 5170 "parser.cpp" break; - case 190: /* table_reference_name: '(' select_statement ')' table_alias */ -#line 1528 "parser.y" + case 192: /* table_reference_name: '(' select_statement ')' table_alias */ +#line 1530 "parser.y" { infinity::SubqueryReference* subquery_reference = new infinity::SubqueryReference(); subquery_reference->select_statement_ = (yyvsp[-2].select_stmt); subquery_reference->alias_ = (yyvsp[0].table_alias_t); (yyval.table_reference_t) = subquery_reference; } -#line 5171 "parser.cpp" +#line 5181 "parser.cpp" break; - case 191: /* table_name: IDENTIFIER */ -#line 1537 "parser.y" + case 193: /* table_name: IDENTIFIER */ +#line 1539 "parser.y" { (yyval.table_name_t) = new infinity::TableName(); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.table_name_t)->table_name_ptr_ = (yyvsp[0].str_value); } -#line 5181 "parser.cpp" +#line 5191 "parser.cpp" break; - case 192: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1542 "parser.y" + case 194: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1544 "parser.y" { (yyval.table_name_t) = new infinity::TableName(); ParserHelper::ToLower((yyvsp[-2].str_value)); @@ -5189,84 +5199,84 @@ YYLTYPE yylloc = yyloc_default; (yyval.table_name_t)->schema_name_ptr_ = (yyvsp[-2].str_value); (yyval.table_name_t)->table_name_ptr_ = (yyvsp[0].str_value); } -#line 5193 "parser.cpp" +#line 5203 "parser.cpp" break; - case 193: /* table_alias: AS IDENTIFIER */ -#line 1551 "parser.y" + case 195: /* table_alias: AS IDENTIFIER */ +#line 1553 "parser.y" { (yyval.table_alias_t) = new infinity::TableAlias(); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.table_alias_t)->alias_ = (yyvsp[0].str_value); } -#line 5203 "parser.cpp" +#line 5213 "parser.cpp" break; - case 194: /* table_alias: IDENTIFIER */ -#line 1556 "parser.y" + case 196: /* table_alias: IDENTIFIER */ +#line 1558 "parser.y" { (yyval.table_alias_t) = new infinity::TableAlias(); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.table_alias_t)->alias_ = (yyvsp[0].str_value); } -#line 5213 "parser.cpp" +#line 5223 "parser.cpp" break; - case 195: /* table_alias: AS IDENTIFIER '(' identifier_array ')' */ -#line 1561 "parser.y" + case 197: /* table_alias: AS IDENTIFIER '(' identifier_array ')' */ +#line 1563 "parser.y" { (yyval.table_alias_t) = new infinity::TableAlias(); ParserHelper::ToLower((yyvsp[-3].str_value)); (yyval.table_alias_t)->alias_ = (yyvsp[-3].str_value); (yyval.table_alias_t)->column_alias_array_ = (yyvsp[-1].identifier_array_t); } -#line 5224 "parser.cpp" +#line 5234 "parser.cpp" break; - case 196: /* table_alias: %empty */ -#line 1567 "parser.y" + case 198: /* table_alias: %empty */ +#line 1569 "parser.y" { (yyval.table_alias_t) = nullptr; } -#line 5232 "parser.cpp" +#line 5242 "parser.cpp" break; - case 197: /* with_clause: WITH with_expr_list */ -#line 1574 "parser.y" + case 199: /* with_clause: WITH with_expr_list */ +#line 1576 "parser.y" { (yyval.with_expr_list_t) = (yyvsp[0].with_expr_list_t); } -#line 5240 "parser.cpp" +#line 5250 "parser.cpp" break; - case 198: /* with_clause: %empty */ -#line 1577 "parser.y" + case 200: /* with_clause: %empty */ +#line 1579 "parser.y" { (yyval.with_expr_list_t) = nullptr; } -#line 5248 "parser.cpp" +#line 5258 "parser.cpp" break; - case 199: /* with_expr_list: with_expr */ -#line 1581 "parser.y" + case 201: /* with_expr_list: with_expr */ +#line 1583 "parser.y" { (yyval.with_expr_list_t) = new std::vector(); (yyval.with_expr_list_t)->emplace_back((yyvsp[0].with_expr_t)); } -#line 5257 "parser.cpp" +#line 5267 "parser.cpp" break; - case 200: /* with_expr_list: with_expr_list ',' with_expr */ -#line 1584 "parser.y" + case 202: /* with_expr_list: with_expr_list ',' with_expr */ +#line 1586 "parser.y" { (yyvsp[-2].with_expr_list_t)->emplace_back((yyvsp[0].with_expr_t)); (yyval.with_expr_list_t) = (yyvsp[-2].with_expr_list_t); } -#line 5266 "parser.cpp" +#line 5276 "parser.cpp" break; - case 201: /* with_expr: IDENTIFIER AS '(' select_clause_with_modifier ')' */ -#line 1589 "parser.y" + case 203: /* with_expr: IDENTIFIER AS '(' select_clause_with_modifier ')' */ +#line 1591 "parser.y" { (yyval.with_expr_t) = new infinity::WithExpr(); ParserHelper::ToLower((yyvsp[-4].str_value)); @@ -5274,11 +5284,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-4].str_value)); (yyval.with_expr_t)->select_ = (yyvsp[-1].select_stmt); } -#line 5278 "parser.cpp" +#line 5288 "parser.cpp" break; - case 202: /* join_clause: table_reference_unit NATURAL JOIN table_reference_name */ -#line 1601 "parser.y" + case 204: /* join_clause: table_reference_unit NATURAL JOIN table_reference_name */ +#line 1603 "parser.y" { infinity::JoinReference* join_reference = new infinity::JoinReference(); join_reference->left_ = (yyvsp[-3].table_reference_t); @@ -5286,11 +5296,11 @@ YYLTYPE yylloc = yyloc_default; join_reference->join_type_ = infinity::JoinType::kNatural; (yyval.table_reference_t) = join_reference; } -#line 5290 "parser.cpp" +#line 5300 "parser.cpp" break; - case 203: /* join_clause: table_reference_unit join_type JOIN table_reference_name ON expr */ -#line 1608 "parser.y" + case 205: /* join_clause: table_reference_unit join_type JOIN table_reference_name ON expr */ +#line 1610 "parser.y" { infinity::JoinReference* join_reference = new infinity::JoinReference(); join_reference->left_ = (yyvsp[-5].table_reference_t); @@ -5299,102 +5309,102 @@ YYLTYPE yylloc = yyloc_default; join_reference->condition_ = (yyvsp[0].expr_t); (yyval.table_reference_t) = join_reference; } -#line 5303 "parser.cpp" +#line 5313 "parser.cpp" break; - case 204: /* join_type: INNER */ -#line 1622 "parser.y" + case 206: /* join_type: INNER */ +#line 1624 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kInner; } -#line 5311 "parser.cpp" +#line 5321 "parser.cpp" break; - case 205: /* join_type: LEFT */ -#line 1625 "parser.y" + case 207: /* join_type: LEFT */ +#line 1627 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kLeft; } -#line 5319 "parser.cpp" +#line 5329 "parser.cpp" break; - case 206: /* join_type: RIGHT */ -#line 1628 "parser.y" + case 208: /* join_type: RIGHT */ +#line 1630 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kRight; } -#line 5327 "parser.cpp" +#line 5337 "parser.cpp" break; - case 207: /* join_type: OUTER */ -#line 1631 "parser.y" + case 209: /* join_type: OUTER */ +#line 1633 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kFull; } -#line 5335 "parser.cpp" +#line 5345 "parser.cpp" break; - case 208: /* join_type: FULL */ -#line 1634 "parser.y" + case 210: /* join_type: FULL */ +#line 1636 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kFull; } -#line 5343 "parser.cpp" +#line 5353 "parser.cpp" break; - case 209: /* join_type: CROSS */ -#line 1637 "parser.y" + case 211: /* join_type: CROSS */ +#line 1639 "parser.y" { (yyval.join_type_t) = infinity::JoinType::kCross; } -#line 5351 "parser.cpp" +#line 5361 "parser.cpp" break; - case 210: /* join_type: %empty */ -#line 1640 "parser.y" + case 212: /* join_type: %empty */ +#line 1642 "parser.y" { } -#line 5358 "parser.cpp" +#line 5368 "parser.cpp" break; - case 211: /* show_statement: SHOW DATABASES */ -#line 1646 "parser.y" + case 213: /* show_statement: SHOW DATABASES */ +#line 1648 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kDatabases; } -#line 5367 "parser.cpp" +#line 5377 "parser.cpp" break; - case 212: /* show_statement: SHOW TABLES */ -#line 1650 "parser.y" + case 214: /* show_statement: SHOW TABLES */ +#line 1652 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kTables; } -#line 5376 "parser.cpp" +#line 5386 "parser.cpp" break; - case 213: /* show_statement: SHOW VIEWS */ -#line 1654 "parser.y" + case 215: /* show_statement: SHOW VIEWS */ +#line 1656 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kViews; } -#line 5385 "parser.cpp" +#line 5395 "parser.cpp" break; - case 214: /* show_statement: SHOW CONFIGS */ -#line 1658 "parser.y" + case 216: /* show_statement: SHOW CONFIGS */ +#line 1660 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kConfigs; } -#line 5394 "parser.cpp" +#line 5404 "parser.cpp" break; - case 215: /* show_statement: SHOW CONFIG IDENTIFIER */ -#line 1662 "parser.y" + case 217: /* show_statement: SHOW CONFIG IDENTIFIER */ +#line 1664 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kConfig; @@ -5402,118 +5412,118 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->var_name_ = std::string((yyvsp[0].str_value)); free((yyvsp[0].str_value)); } -#line 5406 "parser.cpp" +#line 5416 "parser.cpp" break; - case 216: /* show_statement: SHOW PROFILES */ -#line 1669 "parser.y" + case 218: /* show_statement: SHOW PROFILES */ +#line 1671 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kProfiles; } -#line 5415 "parser.cpp" +#line 5425 "parser.cpp" break; - case 217: /* show_statement: SHOW BUFFER */ -#line 1673 "parser.y" + case 219: /* show_statement: SHOW BUFFER */ +#line 1675 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kBuffer; } -#line 5424 "parser.cpp" +#line 5434 "parser.cpp" break; - case 218: /* show_statement: SHOW QUERIES */ -#line 1677 "parser.y" + case 220: /* show_statement: SHOW QUERIES */ +#line 1679 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kQueries; } -#line 5433 "parser.cpp" +#line 5443 "parser.cpp" break; - case 219: /* show_statement: SHOW QUERY SESSION LONG_VALUE */ -#line 1681 "parser.y" + case 221: /* show_statement: SHOW QUERY SESSION LONG_VALUE */ +#line 1683 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kQuery; (yyval.show_stmt)->session_id_ = (yyvsp[0].long_value); } -#line 5443 "parser.cpp" +#line 5453 "parser.cpp" break; - case 220: /* show_statement: SHOW TRANSACTIONS */ -#line 1686 "parser.y" + case 222: /* show_statement: SHOW TRANSACTIONS */ +#line 1688 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kTransactions; } -#line 5452 "parser.cpp" +#line 5462 "parser.cpp" break; - case 221: /* show_statement: SHOW TRANSACTION LONG_VALUE */ -#line 1690 "parser.y" + case 223: /* show_statement: SHOW TRANSACTION LONG_VALUE */ +#line 1692 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kTransaction; (yyval.show_stmt)->txn_id_ = (yyvsp[0].long_value); } -#line 5462 "parser.cpp" +#line 5472 "parser.cpp" break; - case 222: /* show_statement: SHOW SESSION VARIABLES */ -#line 1695 "parser.y" + case 224: /* show_statement: SHOW SESSION VARIABLES */ +#line 1697 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kSessionVariables; } -#line 5471 "parser.cpp" +#line 5481 "parser.cpp" break; - case 223: /* show_statement: SHOW GLOBAL VARIABLES */ -#line 1699 "parser.y" + case 225: /* show_statement: SHOW GLOBAL VARIABLES */ +#line 1701 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kGlobalVariables; } -#line 5480 "parser.cpp" +#line 5490 "parser.cpp" break; - case 224: /* show_statement: SHOW SESSION VARIABLE IDENTIFIER */ -#line 1703 "parser.y" + case 226: /* show_statement: SHOW SESSION VARIABLE IDENTIFIER */ +#line 1705 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kSessionVariable; (yyval.show_stmt)->var_name_ = std::string((yyvsp[0].str_value)); free((yyvsp[0].str_value)); } -#line 5491 "parser.cpp" +#line 5501 "parser.cpp" break; - case 225: /* show_statement: SHOW GLOBAL VARIABLE IDENTIFIER */ -#line 1709 "parser.y" + case 227: /* show_statement: SHOW GLOBAL VARIABLE IDENTIFIER */ +#line 1711 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kGlobalVariable; (yyval.show_stmt)->var_name_ = std::string((yyvsp[0].str_value)); free((yyvsp[0].str_value)); } -#line 5502 "parser.cpp" +#line 5512 "parser.cpp" break; - case 226: /* show_statement: SHOW DATABASE IDENTIFIER */ -#line 1715 "parser.y" + case 228: /* show_statement: SHOW DATABASE IDENTIFIER */ +#line 1717 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kDatabase; (yyval.show_stmt)->schema_name_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 5513 "parser.cpp" +#line 5523 "parser.cpp" break; - case 227: /* show_statement: SHOW TABLE table_name */ -#line 1721 "parser.y" + case 229: /* show_statement: SHOW TABLE table_name */ +#line 1723 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kTable; @@ -5525,11 +5535,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].table_name_t)->table_name_ptr_); delete (yyvsp[0].table_name_t); } -#line 5529 "parser.cpp" +#line 5539 "parser.cpp" break; - case 228: /* show_statement: SHOW TABLE table_name COLUMNS */ -#line 1732 "parser.y" + case 230: /* show_statement: SHOW TABLE table_name COLUMNS */ +#line 1734 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kColumns; @@ -5541,11 +5551,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].table_name_t)->table_name_ptr_); delete (yyvsp[-1].table_name_t); } -#line 5545 "parser.cpp" +#line 5555 "parser.cpp" break; - case 229: /* show_statement: SHOW TABLE table_name SEGMENTS */ -#line 1743 "parser.y" + case 231: /* show_statement: SHOW TABLE table_name SEGMENTS */ +#line 1745 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kSegments; @@ -5557,11 +5567,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].table_name_t)->table_name_ptr_); delete (yyvsp[-1].table_name_t); } -#line 5561 "parser.cpp" +#line 5571 "parser.cpp" break; - case 230: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE */ -#line 1754 "parser.y" + case 232: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE */ +#line 1756 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kSegment; @@ -5574,11 +5584,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->segment_id_ = (yyvsp[0].long_value); delete (yyvsp[-2].table_name_t); } -#line 5578 "parser.cpp" +#line 5588 "parser.cpp" break; - case 231: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCKS */ -#line 1766 "parser.y" + case 233: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCKS */ +#line 1768 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kBlocks; @@ -5591,11 +5601,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->segment_id_ = (yyvsp[-1].long_value); delete (yyvsp[-3].table_name_t); } -#line 5595 "parser.cpp" +#line 5605 "parser.cpp" break; - case 232: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCK LONG_VALUE */ -#line 1778 "parser.y" + case 234: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCK LONG_VALUE */ +#line 1780 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kBlock; @@ -5609,11 +5619,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->block_id_ = (yyvsp[0].long_value); delete (yyvsp[-4].table_name_t); } -#line 5613 "parser.cpp" +#line 5623 "parser.cpp" break; - case 233: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCK LONG_VALUE COLUMN LONG_VALUE */ -#line 1791 "parser.y" + case 235: /* show_statement: SHOW TABLE table_name SEGMENT LONG_VALUE BLOCK LONG_VALUE COLUMN LONG_VALUE */ +#line 1793 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kBlockColumn; @@ -5628,11 +5638,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->column_id_ = (yyvsp[0].long_value); delete (yyvsp[-6].table_name_t); } -#line 5632 "parser.cpp" +#line 5642 "parser.cpp" break; - case 234: /* show_statement: SHOW TABLE table_name INDEXES */ -#line 1805 "parser.y" + case 236: /* show_statement: SHOW TABLE table_name INDEXES */ +#line 1807 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kIndexes; @@ -5644,11 +5654,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].table_name_t)->table_name_ptr_); delete (yyvsp[-1].table_name_t); } -#line 5648 "parser.cpp" +#line 5658 "parser.cpp" break; - case 235: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER */ -#line 1816 "parser.y" + case 237: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER */ +#line 1818 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kIndex; @@ -5663,11 +5673,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->index_name_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 5667 "parser.cpp" +#line 5677 "parser.cpp" break; - case 236: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER SEGMENT LONG_VALUE */ -#line 1830 "parser.y" + case 238: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER SEGMENT LONG_VALUE */ +#line 1832 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kIndexSegment; @@ -5684,11 +5694,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->segment_id_ = (yyvsp[0].long_value); } -#line 5688 "parser.cpp" +#line 5698 "parser.cpp" break; - case 237: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER SEGMENT LONG_VALUE CHUNK LONG_VALUE */ -#line 1846 "parser.y" + case 239: /* show_statement: SHOW TABLE table_name INDEX IDENTIFIER SEGMENT LONG_VALUE CHUNK LONG_VALUE */ +#line 1848 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kIndexChunk; @@ -5706,65 +5716,65 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->segment_id_ = (yyvsp[-2].long_value); (yyval.show_stmt)->chunk_id_ = (yyvsp[0].long_value); } -#line 5710 "parser.cpp" +#line 5720 "parser.cpp" break; - case 238: /* show_statement: SHOW LOGS */ -#line 1863 "parser.y" + case 240: /* show_statement: SHOW LOGS */ +#line 1865 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kLogs; } -#line 5719 "parser.cpp" +#line 5729 "parser.cpp" break; - case 239: /* show_statement: SHOW DELTA LOGS */ -#line 1867 "parser.y" + case 241: /* show_statement: SHOW DELTA LOGS */ +#line 1869 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kDeltaLogs; } -#line 5728 "parser.cpp" +#line 5738 "parser.cpp" break; - case 240: /* show_statement: SHOW CATALOGS */ -#line 1871 "parser.y" + case 242: /* show_statement: SHOW CATALOGS */ +#line 1873 "parser.y" { (yyval.show_stmt) = new infinity::ShowStatement(); (yyval.show_stmt)->show_type_ = infinity::ShowStmtType::kCatalogs; } -#line 5737 "parser.cpp" +#line 5747 "parser.cpp" break; - case 241: /* flush_statement: FLUSH DATA */ -#line 1879 "parser.y" + case 243: /* flush_statement: FLUSH DATA */ +#line 1881 "parser.y" { (yyval.flush_stmt) = new infinity::FlushStatement(); (yyval.flush_stmt)->type_ = infinity::FlushType::kData; } -#line 5746 "parser.cpp" +#line 5756 "parser.cpp" break; - case 242: /* flush_statement: FLUSH LOG */ -#line 1883 "parser.y" + case 244: /* flush_statement: FLUSH LOG */ +#line 1885 "parser.y" { (yyval.flush_stmt) = new infinity::FlushStatement(); (yyval.flush_stmt)->type_ = infinity::FlushType::kLog; } -#line 5755 "parser.cpp" +#line 5765 "parser.cpp" break; - case 243: /* flush_statement: FLUSH BUFFER */ -#line 1887 "parser.y" + case 245: /* flush_statement: FLUSH BUFFER */ +#line 1889 "parser.y" { (yyval.flush_stmt) = new infinity::FlushStatement(); (yyval.flush_stmt)->type_ = infinity::FlushType::kBuffer; } -#line 5764 "parser.cpp" +#line 5774 "parser.cpp" break; - case 244: /* optimize_statement: OPTIMIZE table_name */ -#line 1895 "parser.y" + case 246: /* optimize_statement: OPTIMIZE table_name */ +#line 1897 "parser.y" { (yyval.optimize_stmt) = new infinity::OptimizeStatement(); if((yyvsp[0].table_name_t)->schema_name_ptr_ != nullptr) { @@ -5775,11 +5785,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].table_name_t)->table_name_ptr_); delete (yyvsp[0].table_name_t); } -#line 5779 "parser.cpp" +#line 5789 "parser.cpp" break; - case 245: /* optimize_statement: OPTIMIZE IDENTIFIER ON table_name with_index_param_list */ -#line 1906 "parser.y" + case 247: /* optimize_statement: OPTIMIZE IDENTIFIER ON table_name with_index_param_list */ +#line 1908 "parser.y" { (yyval.optimize_stmt) = new infinity::OptimizeStatement(); if((yyvsp[-1].table_name_t)->schema_name_ptr_ != nullptr) { @@ -5799,54 +5809,54 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[0].with_index_param_list_t); } -#line 5803 "parser.cpp" +#line 5813 "parser.cpp" break; - case 246: /* command_statement: USE IDENTIFIER */ -#line 1929 "parser.y" + case 248: /* command_statement: USE IDENTIFIER */ +#line 1931 "parser.y" { (yyval.command_stmt) = new infinity::CommandStatement(); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.command_stmt)->command_info_ = std::make_shared((yyvsp[0].str_value)); free((yyvsp[0].str_value)); } -#line 5814 "parser.cpp" +#line 5824 "parser.cpp" break; - case 247: /* command_statement: EXPORT PROFILE LONG_VALUE file_path */ -#line 1935 "parser.y" + case 249: /* command_statement: EXPORT PROFILE LONG_VALUE file_path */ +#line 1937 "parser.y" { (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared((yyvsp[0].str_value), infinity::ExportType::kProfileRecord, (yyvsp[-1].long_value)); free((yyvsp[0].str_value)); } -#line 5824 "parser.cpp" +#line 5834 "parser.cpp" break; - case 248: /* command_statement: SET SESSION IDENTIFIER ON */ -#line 1940 "parser.y" + case 250: /* command_statement: SET SESSION IDENTIFIER ON */ +#line 1942 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kSession, infinity::SetVarType::kBool, (yyvsp[-1].str_value), true); free((yyvsp[-1].str_value)); } -#line 5835 "parser.cpp" +#line 5845 "parser.cpp" break; - case 249: /* command_statement: SET SESSION IDENTIFIER OFF */ -#line 1946 "parser.y" + case 251: /* command_statement: SET SESSION IDENTIFIER OFF */ +#line 1948 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kSession, infinity::SetVarType::kBool, (yyvsp[-1].str_value), false); free((yyvsp[-1].str_value)); } -#line 5846 "parser.cpp" +#line 5856 "parser.cpp" break; - case 250: /* command_statement: SET SESSION IDENTIFIER IDENTIFIER */ -#line 1952 "parser.y" + case 252: /* command_statement: SET SESSION IDENTIFIER IDENTIFIER */ +#line 1954 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -5855,55 +5865,55 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); free((yyvsp[0].str_value)); } -#line 5859 "parser.cpp" +#line 5869 "parser.cpp" break; - case 251: /* command_statement: SET SESSION IDENTIFIER LONG_VALUE */ -#line 1960 "parser.y" + case 253: /* command_statement: SET SESSION IDENTIFIER LONG_VALUE */ +#line 1962 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kSession, infinity::SetVarType::kInteger, (yyvsp[-1].str_value), (yyvsp[0].long_value)); free((yyvsp[-1].str_value)); } -#line 5870 "parser.cpp" +#line 5880 "parser.cpp" break; - case 252: /* command_statement: SET SESSION IDENTIFIER DOUBLE_VALUE */ -#line 1966 "parser.y" + case 254: /* command_statement: SET SESSION IDENTIFIER DOUBLE_VALUE */ +#line 1968 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kSession, infinity::SetVarType::kDouble, (yyvsp[-1].str_value), (yyvsp[0].double_value)); free((yyvsp[-1].str_value)); } -#line 5881 "parser.cpp" +#line 5891 "parser.cpp" break; - case 253: /* command_statement: SET GLOBAL IDENTIFIER ON */ -#line 1972 "parser.y" + case 255: /* command_statement: SET GLOBAL IDENTIFIER ON */ +#line 1974 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kGlobal, infinity::SetVarType::kBool, (yyvsp[-1].str_value), true); free((yyvsp[-1].str_value)); } -#line 5892 "parser.cpp" +#line 5902 "parser.cpp" break; - case 254: /* command_statement: SET GLOBAL IDENTIFIER OFF */ -#line 1978 "parser.y" + case 256: /* command_statement: SET GLOBAL IDENTIFIER OFF */ +#line 1980 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kGlobal, infinity::SetVarType::kBool, (yyvsp[-1].str_value), false); free((yyvsp[-1].str_value)); } -#line 5903 "parser.cpp" +#line 5913 "parser.cpp" break; - case 255: /* command_statement: SET GLOBAL IDENTIFIER IDENTIFIER */ -#line 1984 "parser.y" + case 257: /* command_statement: SET GLOBAL IDENTIFIER IDENTIFIER */ +#line 1986 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -5912,55 +5922,55 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); free((yyvsp[0].str_value)); } -#line 5916 "parser.cpp" +#line 5926 "parser.cpp" break; - case 256: /* command_statement: SET GLOBAL IDENTIFIER LONG_VALUE */ -#line 1992 "parser.y" + case 258: /* command_statement: SET GLOBAL IDENTIFIER LONG_VALUE */ +#line 1994 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kGlobal, infinity::SetVarType::kInteger, (yyvsp[-1].str_value), (yyvsp[0].long_value)); free((yyvsp[-1].str_value)); } -#line 5927 "parser.cpp" +#line 5937 "parser.cpp" break; - case 257: /* command_statement: SET GLOBAL IDENTIFIER DOUBLE_VALUE */ -#line 1998 "parser.y" + case 259: /* command_statement: SET GLOBAL IDENTIFIER DOUBLE_VALUE */ +#line 2000 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kGlobal, infinity::SetVarType::kDouble, (yyvsp[-1].str_value), (yyvsp[0].double_value)); free((yyvsp[-1].str_value)); } -#line 5938 "parser.cpp" +#line 5948 "parser.cpp" break; - case 258: /* command_statement: SET CONFIG IDENTIFIER ON */ -#line 2004 "parser.y" + case 260: /* command_statement: SET CONFIG IDENTIFIER ON */ +#line 2006 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kConfig, infinity::SetVarType::kBool, (yyvsp[-1].str_value), true); free((yyvsp[-1].str_value)); } -#line 5949 "parser.cpp" +#line 5959 "parser.cpp" break; - case 259: /* command_statement: SET CONFIG IDENTIFIER OFF */ -#line 2010 "parser.y" + case 261: /* command_statement: SET CONFIG IDENTIFIER OFF */ +#line 2012 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kConfig, infinity::SetVarType::kBool, (yyvsp[-1].str_value), false); free((yyvsp[-1].str_value)); } -#line 5960 "parser.cpp" +#line 5970 "parser.cpp" break; - case 260: /* command_statement: SET CONFIG IDENTIFIER IDENTIFIER */ -#line 2016 "parser.y" + case 262: /* command_statement: SET CONFIG IDENTIFIER IDENTIFIER */ +#line 2018 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -5969,33 +5979,33 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); free((yyvsp[0].str_value)); } -#line 5973 "parser.cpp" +#line 5983 "parser.cpp" break; - case 261: /* command_statement: SET CONFIG IDENTIFIER LONG_VALUE */ -#line 2024 "parser.y" + case 263: /* command_statement: SET CONFIG IDENTIFIER LONG_VALUE */ +#line 2026 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kConfig, infinity::SetVarType::kInteger, (yyvsp[-1].str_value), (yyvsp[0].long_value)); free((yyvsp[-1].str_value)); } -#line 5984 "parser.cpp" +#line 5994 "parser.cpp" break; - case 262: /* command_statement: SET CONFIG IDENTIFIER DOUBLE_VALUE */ -#line 2030 "parser.y" + case 264: /* command_statement: SET CONFIG IDENTIFIER DOUBLE_VALUE */ +#line 2032 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); (yyval.command_stmt) = new infinity::CommandStatement(); (yyval.command_stmt)->command_info_ = std::make_shared(infinity::SetScope::kConfig, infinity::SetVarType::kDouble, (yyvsp[-1].str_value), (yyvsp[0].double_value)); free((yyvsp[-1].str_value)); } -#line 5995 "parser.cpp" +#line 6005 "parser.cpp" break; - case 263: /* compact_statement: COMPACT TABLE table_name */ -#line 2037 "parser.y" + case 265: /* compact_statement: COMPACT TABLE table_name */ +#line 2039 "parser.y" { std::string schema_name; if ((yyvsp[0].table_name_t)->schema_name_ptr_ != nullptr) { @@ -6008,38 +6018,38 @@ YYLTYPE yylloc = yyloc_default; (yyval.compact_stmt) = new infinity::ManualCompactStatement(std::move(schema_name), std::move(table_name)); delete (yyvsp[0].table_name_t); } -#line 6012 "parser.cpp" +#line 6022 "parser.cpp" break; - case 264: /* expr_array: expr_alias */ -#line 2054 "parser.y" + case 266: /* expr_array: expr_alias */ +#line 2056 "parser.y" { (yyval.expr_array_t) = new std::vector(); (yyval.expr_array_t)->emplace_back((yyvsp[0].expr_t)); } -#line 6021 "parser.cpp" +#line 6031 "parser.cpp" break; - case 265: /* expr_array: expr_array ',' expr_alias */ -#line 2058 "parser.y" + case 267: /* expr_array: expr_array ',' expr_alias */ +#line 2060 "parser.y" { (yyvsp[-2].expr_array_t)->emplace_back((yyvsp[0].expr_t)); (yyval.expr_array_t) = (yyvsp[-2].expr_array_t); } -#line 6030 "parser.cpp" +#line 6040 "parser.cpp" break; - case 266: /* expr_array_list: '(' expr_array ')' */ -#line 2063 "parser.y" + case 268: /* expr_array_list: '(' expr_array ')' */ +#line 2065 "parser.y" { (yyval.expr_array_list_t) = new std::vector*>(); (yyval.expr_array_list_t)->push_back((yyvsp[-1].expr_array_t)); } -#line 6039 "parser.cpp" +#line 6049 "parser.cpp" break; - case 267: /* expr_array_list: expr_array_list ',' '(' expr_array ')' */ -#line 2067 "parser.y" + case 269: /* expr_array_list: expr_array_list ',' '(' expr_array ')' */ +#line 2069 "parser.y" { if(!(yyvsp[-4].expr_array_list_t)->empty() && (yyvsp[-4].expr_array_list_t)->back()->size() != (yyvsp[-1].expr_array_t)->size()) { yyerror(&yyloc, scanner, result, "The expr_array in list shall have the same size."); @@ -6055,73 +6065,73 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-4].expr_array_list_t)->push_back((yyvsp[-1].expr_array_t)); (yyval.expr_array_list_t) = (yyvsp[-4].expr_array_list_t); } -#line 6059 "parser.cpp" +#line 6069 "parser.cpp" break; - case 268: /* expr_alias: expr AS IDENTIFIER */ -#line 2094 "parser.y" + case 270: /* expr_alias: expr AS IDENTIFIER */ +#line 2096 "parser.y" { (yyval.expr_t) = (yyvsp[-2].expr_t); ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.expr_t)->alias_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 6070 "parser.cpp" +#line 6080 "parser.cpp" break; - case 269: /* expr_alias: expr */ -#line 2100 "parser.y" + case 271: /* expr_alias: expr */ +#line 2102 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6078 "parser.cpp" +#line 6088 "parser.cpp" break; - case 275: /* operand: '(' expr ')' */ -#line 2110 "parser.y" + case 277: /* operand: '(' expr ')' */ +#line 2112 "parser.y" { (yyval.expr_t) = (yyvsp[-1].expr_t); } -#line 6086 "parser.cpp" +#line 6096 "parser.cpp" break; - case 276: /* operand: '(' select_without_paren ')' */ -#line 2113 "parser.y" + case 278: /* operand: '(' select_without_paren ')' */ +#line 2115 "parser.y" { infinity::SubqueryExpr* subquery_expr = new infinity::SubqueryExpr(); subquery_expr->subquery_type_ = infinity::SubqueryType::kScalar; subquery_expr->select_ = (yyvsp[-1].select_stmt); (yyval.expr_t) = subquery_expr; } -#line 6097 "parser.cpp" +#line 6107 "parser.cpp" break; - case 277: /* operand: constant_expr */ -#line 2119 "parser.y" + case 279: /* operand: constant_expr */ +#line 2121 "parser.y" { (yyval.expr_t) = (yyvsp[0].const_expr_t); } -#line 6105 "parser.cpp" +#line 6115 "parser.cpp" break; - case 288: /* extra_match_tensor_option: ',' STRING */ -#line 2133 "parser.y" + case 290: /* extra_match_tensor_option: ',' STRING */ +#line 2135 "parser.y" { (yyval.str_value) = (yyvsp[0].str_value); } -#line 6113 "parser.cpp" +#line 6123 "parser.cpp" break; - case 289: /* extra_match_tensor_option: %empty */ -#line 2136 "parser.y" + case 291: /* extra_match_tensor_option: %empty */ +#line 2138 "parser.y" { (yyval.str_value) = nullptr; } -#line 6121 "parser.cpp" +#line 6131 "parser.cpp" break; - case 290: /* match_tensor_expr: MATCH TENSOR '(' column_expr ',' common_array_expr ',' STRING ',' STRING extra_match_tensor_option ')' */ -#line 2142 "parser.y" + case 292: /* match_tensor_expr: MATCH TENSOR '(' column_expr ',' common_array_expr ',' STRING ',' STRING extra_match_tensor_option ')' */ +#line 2144 "parser.y" { auto match_tensor_expr = std::make_unique(); // search column @@ -6138,11 +6148,11 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr_t) = match_tensor_expr.release(); } -#line 6142 "parser.cpp" +#line 6152 "parser.cpp" break; - case 291: /* match_vector_expr: MATCH VECTOR '(' expr ',' array_expr ',' STRING ',' STRING ',' LONG_VALUE ')' with_index_param_list */ -#line 2161 "parser.y" + case 293: /* match_vector_expr: MATCH VECTOR '(' expr ',' array_expr ',' STRING ',' STRING ',' LONG_VALUE ')' with_index_param_list */ +#line 2163 "parser.y" { infinity::KnnExpr* match_vector_expr = new infinity::KnnExpr(); (yyval.expr_t) = match_vector_expr; @@ -6184,11 +6194,11 @@ YYLTYPE yylloc = yyloc_default; Return1: ; } -#line 6188 "parser.cpp" +#line 6198 "parser.cpp" break; - case 292: /* match_vector_expr: MATCH VECTOR '(' expr ',' array_expr ',' STRING ',' STRING ')' with_index_param_list */ -#line 2203 "parser.y" + case 294: /* match_vector_expr: MATCH VECTOR '(' expr ',' array_expr ',' STRING ',' STRING ')' with_index_param_list */ +#line 2205 "parser.y" { infinity::KnnExpr* match_vector_expr = new infinity::KnnExpr(); (yyval.expr_t) = match_vector_expr; @@ -6231,11 +6241,11 @@ YYLTYPE yylloc = yyloc_default; Return2: ; } -#line 6235 "parser.cpp" +#line 6245 "parser.cpp" break; - case 293: /* match_sparse_expr: MATCH SPARSE '(' expr ',' common_sparse_array_expr ',' STRING ',' LONG_VALUE ')' with_index_param_list */ -#line 2249 "parser.y" + case 295: /* match_sparse_expr: MATCH SPARSE '(' expr ',' common_sparse_array_expr ',' STRING ',' LONG_VALUE ')' with_index_param_list */ +#line 2251 "parser.y" { auto match_sparse_expr = new infinity::MatchSparseExpr(); (yyval.expr_t) = match_sparse_expr; @@ -6253,11 +6263,11 @@ YYLTYPE yylloc = yyloc_default; // topn and options match_sparse_expr->SetOptParams((yyvsp[-2].long_value), (yyvsp[0].with_index_param_list_t)); } -#line 6257 "parser.cpp" +#line 6267 "parser.cpp" break; - case 294: /* match_sparse_expr: MATCH SPARSE '(' expr ',' common_sparse_array_expr ',' STRING ')' with_index_param_list */ -#line 2267 "parser.y" + case 296: /* match_sparse_expr: MATCH SPARSE '(' expr ',' common_sparse_array_expr ',' STRING ')' with_index_param_list */ +#line 2269 "parser.y" { auto match_sparse_expr = new infinity::MatchSparseExpr(); (yyval.expr_t) = match_sparse_expr; @@ -6275,11 +6285,11 @@ YYLTYPE yylloc = yyloc_default; // topn and options match_sparse_expr->SetOptParams(infinity::DEFAULT_MATCH_SPARSE_TOP_N, (yyvsp[0].with_index_param_list_t)); } -#line 6279 "parser.cpp" +#line 6289 "parser.cpp" break; - case 295: /* match_text_expr: MATCH TEXT '(' STRING ',' STRING ')' */ -#line 2285 "parser.y" + case 297: /* match_text_expr: MATCH TEXT '(' STRING ',' STRING ')' */ +#line 2287 "parser.y" { infinity::MatchExpr* match_text_expr = new infinity::MatchExpr(); match_text_expr->fields_ = std::string((yyvsp[-3].str_value)); @@ -6288,11 +6298,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); (yyval.expr_t) = match_text_expr; } -#line 6292 "parser.cpp" +#line 6302 "parser.cpp" break; - case 296: /* match_text_expr: MATCH TEXT '(' STRING ',' STRING ',' STRING ')' */ -#line 2293 "parser.y" + case 298: /* match_text_expr: MATCH TEXT '(' STRING ',' STRING ',' STRING ')' */ +#line 2295 "parser.y" { infinity::MatchExpr* match_text_expr = new infinity::MatchExpr(); match_text_expr->fields_ = std::string((yyvsp[-5].str_value)); @@ -6303,22 +6313,22 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); (yyval.expr_t) = match_text_expr; } -#line 6307 "parser.cpp" +#line 6317 "parser.cpp" break; - case 297: /* query_expr: QUERY '(' STRING ')' */ -#line 2304 "parser.y" + case 299: /* query_expr: QUERY '(' STRING ')' */ +#line 2306 "parser.y" { infinity::MatchExpr* match_text_expr = new infinity::MatchExpr(); match_text_expr->matching_text_ = std::string((yyvsp[-1].str_value)); free((yyvsp[-1].str_value)); (yyval.expr_t) = match_text_expr; } -#line 6318 "parser.cpp" +#line 6328 "parser.cpp" break; - case 298: /* query_expr: QUERY '(' STRING ',' STRING ')' */ -#line 2310 "parser.y" + case 300: /* query_expr: QUERY '(' STRING ',' STRING ')' */ +#line 2312 "parser.y" { infinity::MatchExpr* match_text_expr = new infinity::MatchExpr(); match_text_expr->matching_text_ = std::string((yyvsp[-3].str_value)); @@ -6327,22 +6337,22 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].str_value)); (yyval.expr_t) = match_text_expr; } -#line 6331 "parser.cpp" +#line 6341 "parser.cpp" break; - case 299: /* fusion_expr: FUSION '(' STRING ')' */ -#line 2319 "parser.y" + case 301: /* fusion_expr: FUSION '(' STRING ')' */ +#line 2321 "parser.y" { infinity::FusionExpr* fusion_expr = new infinity::FusionExpr(); fusion_expr->method_ = std::string((yyvsp[-1].str_value)); free((yyvsp[-1].str_value)); (yyval.expr_t) = fusion_expr; } -#line 6342 "parser.cpp" +#line 6352 "parser.cpp" break; - case 300: /* fusion_expr: FUSION '(' STRING ',' STRING ')' */ -#line 2325 "parser.y" + case 302: /* fusion_expr: FUSION '(' STRING ',' STRING ')' */ +#line 2327 "parser.y" { auto fusion_expr = std::make_unique(); fusion_expr->method_ = std::string((yyvsp[-3].str_value)); @@ -6354,77 +6364,77 @@ YYLTYPE yylloc = yyloc_default; fusion_expr->JobAfterParser(); (yyval.expr_t) = fusion_expr.release(); } -#line 6358 "parser.cpp" +#line 6368 "parser.cpp" break; - case 301: /* sub_search: match_vector_expr */ -#line 2337 "parser.y" + case 303: /* sub_search: match_vector_expr */ +#line 2339 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6366 "parser.cpp" +#line 6376 "parser.cpp" break; - case 302: /* sub_search: match_text_expr */ -#line 2340 "parser.y" + case 304: /* sub_search: match_text_expr */ +#line 2342 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6374 "parser.cpp" +#line 6384 "parser.cpp" break; - case 303: /* sub_search: match_tensor_expr */ -#line 2343 "parser.y" + case 305: /* sub_search: match_tensor_expr */ +#line 2345 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6382 "parser.cpp" +#line 6392 "parser.cpp" break; - case 304: /* sub_search: match_sparse_expr */ -#line 2346 "parser.y" + case 306: /* sub_search: match_sparse_expr */ +#line 2348 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6390 "parser.cpp" +#line 6400 "parser.cpp" break; - case 305: /* sub_search: query_expr */ -#line 2349 "parser.y" + case 307: /* sub_search: query_expr */ +#line 2351 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6398 "parser.cpp" +#line 6408 "parser.cpp" break; - case 306: /* sub_search: fusion_expr */ -#line 2352 "parser.y" + case 308: /* sub_search: fusion_expr */ +#line 2354 "parser.y" { (yyval.expr_t) = (yyvsp[0].expr_t); } -#line 6406 "parser.cpp" +#line 6416 "parser.cpp" break; - case 307: /* sub_search_array: sub_search */ -#line 2356 "parser.y" + case 309: /* sub_search_array: sub_search */ +#line 2358 "parser.y" { (yyval.expr_array_t) = new std::vector(); (yyval.expr_array_t)->emplace_back((yyvsp[0].expr_t)); } -#line 6415 "parser.cpp" +#line 6425 "parser.cpp" break; - case 308: /* sub_search_array: sub_search_array ',' sub_search */ -#line 2360 "parser.y" + case 310: /* sub_search_array: sub_search_array ',' sub_search */ +#line 2362 "parser.y" { (yyvsp[-2].expr_array_t)->emplace_back((yyvsp[0].expr_t)); (yyval.expr_array_t) = (yyvsp[-2].expr_array_t); } -#line 6424 "parser.cpp" +#line 6434 "parser.cpp" break; - case 309: /* function_expr: IDENTIFIER '(' ')' */ -#line 2365 "parser.y" + case 311: /* function_expr: IDENTIFIER '(' ')' */ +#line 2367 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); ParserHelper::ToLower((yyvsp[-2].str_value)); @@ -6433,11 +6443,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_ = nullptr; (yyval.expr_t) = func_expr; } -#line 6437 "parser.cpp" +#line 6447 "parser.cpp" break; - case 310: /* function_expr: IDENTIFIER '(' expr_array ')' */ -#line 2373 "parser.y" + case 312: /* function_expr: IDENTIFIER '(' expr_array ')' */ +#line 2375 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); ParserHelper::ToLower((yyvsp[-3].str_value)); @@ -6446,11 +6456,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_ = (yyvsp[-1].expr_array_t); (yyval.expr_t) = func_expr; } -#line 6450 "parser.cpp" +#line 6460 "parser.cpp" break; - case 311: /* function_expr: IDENTIFIER '(' DISTINCT expr_array ')' */ -#line 2381 "parser.y" + case 313: /* function_expr: IDENTIFIER '(' DISTINCT expr_array ')' */ +#line 2383 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); ParserHelper::ToLower((yyvsp[-4].str_value)); @@ -6460,11 +6470,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->distinct_ = true; (yyval.expr_t) = func_expr; } -#line 6464 "parser.cpp" +#line 6474 "parser.cpp" break; - case 312: /* function_expr: operand IS NOT NULLABLE */ -#line 2390 "parser.y" + case 314: /* function_expr: operand IS NOT NULLABLE */ +#line 2392 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "is_not_null"; @@ -6472,11 +6482,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[-3].expr_t)); (yyval.expr_t) = func_expr; } -#line 6476 "parser.cpp" +#line 6486 "parser.cpp" break; - case 313: /* function_expr: operand IS NULLABLE */ -#line 2397 "parser.y" + case 315: /* function_expr: operand IS NULLABLE */ +#line 2399 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "is_null"; @@ -6484,11 +6494,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[-2].expr_t)); (yyval.expr_t) = func_expr; } -#line 6488 "parser.cpp" +#line 6498 "parser.cpp" break; - case 314: /* function_expr: NOT operand */ -#line 2404 "parser.y" + case 316: /* function_expr: NOT operand */ +#line 2406 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "not"; @@ -6496,11 +6506,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6500 "parser.cpp" +#line 6510 "parser.cpp" break; - case 315: /* function_expr: '-' operand */ -#line 2411 "parser.y" + case 317: /* function_expr: '-' operand */ +#line 2413 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "-"; @@ -6508,11 +6518,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6512 "parser.cpp" +#line 6522 "parser.cpp" break; - case 316: /* function_expr: '+' operand */ -#line 2418 "parser.y" + case 318: /* function_expr: '+' operand */ +#line 2420 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "+"; @@ -6520,11 +6530,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6524 "parser.cpp" +#line 6534 "parser.cpp" break; - case 317: /* function_expr: operand '-' operand */ -#line 2425 "parser.y" + case 319: /* function_expr: operand '-' operand */ +#line 2427 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "-"; @@ -6533,11 +6543,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6537 "parser.cpp" +#line 6547 "parser.cpp" break; - case 318: /* function_expr: operand '+' operand */ -#line 2433 "parser.y" + case 320: /* function_expr: operand '+' operand */ +#line 2435 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "+"; @@ -6546,11 +6556,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6550 "parser.cpp" +#line 6560 "parser.cpp" break; - case 319: /* function_expr: operand '*' operand */ -#line 2441 "parser.y" + case 321: /* function_expr: operand '*' operand */ +#line 2443 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "*"; @@ -6559,11 +6569,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6563 "parser.cpp" +#line 6573 "parser.cpp" break; - case 320: /* function_expr: operand '/' operand */ -#line 2449 "parser.y" + case 322: /* function_expr: operand '/' operand */ +#line 2451 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "/"; @@ -6572,11 +6582,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6576 "parser.cpp" +#line 6586 "parser.cpp" break; - case 321: /* function_expr: operand '%' operand */ -#line 2457 "parser.y" + case 323: /* function_expr: operand '%' operand */ +#line 2459 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "%"; @@ -6585,11 +6595,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6589 "parser.cpp" +#line 6599 "parser.cpp" break; - case 322: /* function_expr: operand '=' operand */ -#line 2465 "parser.y" + case 324: /* function_expr: operand '=' operand */ +#line 2467 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "="; @@ -6598,11 +6608,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6602 "parser.cpp" +#line 6612 "parser.cpp" break; - case 323: /* function_expr: operand EQUAL operand */ -#line 2473 "parser.y" + case 325: /* function_expr: operand EQUAL operand */ +#line 2475 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "="; @@ -6611,11 +6621,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6615 "parser.cpp" +#line 6625 "parser.cpp" break; - case 324: /* function_expr: operand NOT_EQ operand */ -#line 2481 "parser.y" + case 326: /* function_expr: operand NOT_EQ operand */ +#line 2483 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "<>"; @@ -6624,11 +6634,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6628 "parser.cpp" +#line 6638 "parser.cpp" break; - case 325: /* function_expr: operand '<' operand */ -#line 2489 "parser.y" + case 327: /* function_expr: operand '<' operand */ +#line 2491 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "<"; @@ -6637,11 +6647,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6641 "parser.cpp" +#line 6651 "parser.cpp" break; - case 326: /* function_expr: operand '>' operand */ -#line 2497 "parser.y" + case 328: /* function_expr: operand '>' operand */ +#line 2499 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = ">"; @@ -6650,11 +6660,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6654 "parser.cpp" +#line 6664 "parser.cpp" break; - case 327: /* function_expr: operand LESS_EQ operand */ -#line 2505 "parser.y" + case 329: /* function_expr: operand LESS_EQ operand */ +#line 2507 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "<="; @@ -6663,11 +6673,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6667 "parser.cpp" +#line 6677 "parser.cpp" break; - case 328: /* function_expr: operand GREATER_EQ operand */ -#line 2513 "parser.y" + case 330: /* function_expr: operand GREATER_EQ operand */ +#line 2515 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = ">="; @@ -6676,11 +6686,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6680 "parser.cpp" +#line 6690 "parser.cpp" break; - case 329: /* function_expr: EXTRACT '(' STRING FROM operand ')' */ -#line 2521 "parser.y" + case 331: /* function_expr: EXTRACT '(' STRING FROM operand ')' */ +#line 2523 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); ParserHelper::ToLower((yyvsp[-3].str_value)); @@ -6711,11 +6721,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[-1].expr_t)); (yyval.expr_t) = func_expr; } -#line 6715 "parser.cpp" +#line 6725 "parser.cpp" break; - case 330: /* function_expr: operand LIKE operand */ -#line 2551 "parser.y" + case 332: /* function_expr: operand LIKE operand */ +#line 2553 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "like"; @@ -6724,11 +6734,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6728 "parser.cpp" +#line 6738 "parser.cpp" break; - case 331: /* function_expr: operand NOT LIKE operand */ -#line 2559 "parser.y" + case 333: /* function_expr: operand NOT LIKE operand */ +#line 2561 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "not_like"; @@ -6737,11 +6747,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6741 "parser.cpp" +#line 6751 "parser.cpp" break; - case 332: /* conjunction_expr: expr AND expr */ -#line 2568 "parser.y" + case 334: /* conjunction_expr: expr AND expr */ +#line 2570 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "and"; @@ -6750,11 +6760,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6754 "parser.cpp" +#line 6764 "parser.cpp" break; - case 333: /* conjunction_expr: expr OR expr */ -#line 2576 "parser.y" + case 335: /* conjunction_expr: expr OR expr */ +#line 2578 "parser.y" { infinity::FunctionExpr* func_expr = new infinity::FunctionExpr(); func_expr->func_name_ = "or"; @@ -6763,11 +6773,11 @@ YYLTYPE yylloc = yyloc_default; func_expr->arguments_->emplace_back((yyvsp[0].expr_t)); (yyval.expr_t) = func_expr; } -#line 6767 "parser.cpp" +#line 6777 "parser.cpp" break; - case 334: /* between_expr: operand BETWEEN operand AND operand */ -#line 2585 "parser.y" + case 336: /* between_expr: operand BETWEEN operand AND operand */ +#line 2587 "parser.y" { infinity::BetweenExpr* between_expr = new infinity::BetweenExpr(); between_expr->value_ = (yyvsp[-4].expr_t); @@ -6775,44 +6785,44 @@ YYLTYPE yylloc = yyloc_default; between_expr->upper_bound_ = (yyvsp[0].expr_t); (yyval.expr_t) = between_expr; } -#line 6779 "parser.cpp" +#line 6789 "parser.cpp" break; - case 335: /* in_expr: operand IN '(' expr_array ')' */ -#line 2593 "parser.y" + case 337: /* in_expr: operand IN '(' expr_array ')' */ +#line 2595 "parser.y" { infinity::InExpr* in_expr = new infinity::InExpr(true); in_expr->left_ = (yyvsp[-4].expr_t); in_expr->arguments_ = (yyvsp[-1].expr_array_t); (yyval.expr_t) = in_expr; } -#line 6790 "parser.cpp" +#line 6800 "parser.cpp" break; - case 336: /* in_expr: operand NOT IN '(' expr_array ')' */ -#line 2599 "parser.y" + case 338: /* in_expr: operand NOT IN '(' expr_array ')' */ +#line 2601 "parser.y" { infinity::InExpr* in_expr = new infinity::InExpr(false); in_expr->left_ = (yyvsp[-5].expr_t); in_expr->arguments_ = (yyvsp[-1].expr_array_t); (yyval.expr_t) = in_expr; } -#line 6801 "parser.cpp" +#line 6811 "parser.cpp" break; - case 337: /* case_expr: CASE expr case_check_array END */ -#line 2606 "parser.y" + case 339: /* case_expr: CASE expr case_check_array END */ +#line 2608 "parser.y" { infinity::CaseExpr* case_expr = new infinity::CaseExpr(); case_expr->expr_ = (yyvsp[-2].expr_t); case_expr->case_check_array_ = (yyvsp[-1].case_check_array_t); (yyval.expr_t) = case_expr; } -#line 6812 "parser.cpp" +#line 6822 "parser.cpp" break; - case 338: /* case_expr: CASE expr case_check_array ELSE expr END */ -#line 2612 "parser.y" + case 340: /* case_expr: CASE expr case_check_array ELSE expr END */ +#line 2614 "parser.y" { infinity::CaseExpr* case_expr = new infinity::CaseExpr(); case_expr->expr_ = (yyvsp[-4].expr_t); @@ -6820,32 +6830,32 @@ YYLTYPE yylloc = yyloc_default; case_expr->else_expr_ = (yyvsp[-1].expr_t); (yyval.expr_t) = case_expr; } -#line 6824 "parser.cpp" +#line 6834 "parser.cpp" break; - case 339: /* case_expr: CASE case_check_array END */ -#line 2619 "parser.y" + case 341: /* case_expr: CASE case_check_array END */ +#line 2621 "parser.y" { infinity::CaseExpr* case_expr = new infinity::CaseExpr(); case_expr->case_check_array_ = (yyvsp[-1].case_check_array_t); (yyval.expr_t) = case_expr; } -#line 6834 "parser.cpp" +#line 6844 "parser.cpp" break; - case 340: /* case_expr: CASE case_check_array ELSE expr END */ -#line 2624 "parser.y" + case 342: /* case_expr: CASE case_check_array ELSE expr END */ +#line 2626 "parser.y" { infinity::CaseExpr* case_expr = new infinity::CaseExpr(); case_expr->case_check_array_ = (yyvsp[-3].case_check_array_t); case_expr->else_expr_ = (yyvsp[-1].expr_t); (yyval.expr_t) = case_expr; } -#line 6845 "parser.cpp" +#line 6855 "parser.cpp" break; - case 341: /* case_check_array: WHEN expr THEN expr */ -#line 2631 "parser.y" + case 343: /* case_check_array: WHEN expr THEN expr */ +#line 2633 "parser.y" { (yyval.case_check_array_t) = new std::vector(); infinity::WhenThen* when_then_ptr = new infinity::WhenThen(); @@ -6853,11 +6863,11 @@ YYLTYPE yylloc = yyloc_default; when_then_ptr->then_ = (yyvsp[0].expr_t); (yyval.case_check_array_t)->emplace_back(when_then_ptr); } -#line 6857 "parser.cpp" +#line 6867 "parser.cpp" break; - case 342: /* case_check_array: case_check_array WHEN expr THEN expr */ -#line 2638 "parser.y" + case 344: /* case_check_array: case_check_array WHEN expr THEN expr */ +#line 2640 "parser.y" { infinity::WhenThen* when_then_ptr = new infinity::WhenThen(); when_then_ptr->when_ = (yyvsp[-2].expr_t); @@ -6865,11 +6875,11 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-4].case_check_array_t)->emplace_back(when_then_ptr); (yyval.case_check_array_t) = (yyvsp[-4].case_check_array_t); } -#line 6869 "parser.cpp" +#line 6879 "parser.cpp" break; - case 343: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 2646 "parser.y" + case 345: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 2648 "parser.y" { std::shared_ptr type_info_ptr{nullptr}; switch((yyvsp[-1].column_type_t).logical_type_) { @@ -6893,33 +6903,33 @@ YYLTYPE yylloc = yyloc_default; cast_expr->expr_ = (yyvsp[-3].expr_t); (yyval.expr_t) = cast_expr; } -#line 6897 "parser.cpp" +#line 6907 "parser.cpp" break; - case 344: /* subquery_expr: EXISTS '(' select_without_paren ')' */ -#line 2670 "parser.y" + case 346: /* subquery_expr: EXISTS '(' select_without_paren ')' */ +#line 2672 "parser.y" { infinity::SubqueryExpr* subquery_expr = new infinity::SubqueryExpr(); subquery_expr->subquery_type_ = infinity::SubqueryType::kExists; subquery_expr->select_ = (yyvsp[-1].select_stmt); (yyval.expr_t) = subquery_expr; } -#line 6908 "parser.cpp" +#line 6918 "parser.cpp" break; - case 345: /* subquery_expr: NOT EXISTS '(' select_without_paren ')' */ -#line 2676 "parser.y" + case 347: /* subquery_expr: NOT EXISTS '(' select_without_paren ')' */ +#line 2678 "parser.y" { infinity::SubqueryExpr* subquery_expr = new infinity::SubqueryExpr(); subquery_expr->subquery_type_ = infinity::SubqueryType::kNotExists; subquery_expr->select_ = (yyvsp[-1].select_stmt); (yyval.expr_t) = subquery_expr; } -#line 6919 "parser.cpp" +#line 6929 "parser.cpp" break; - case 346: /* subquery_expr: operand IN '(' select_without_paren ')' */ -#line 2682 "parser.y" + case 348: /* subquery_expr: operand IN '(' select_without_paren ')' */ +#line 2684 "parser.y" { infinity::SubqueryExpr* subquery_expr = new infinity::SubqueryExpr(); subquery_expr->subquery_type_ = infinity::SubqueryType::kIn; @@ -6927,11 +6937,11 @@ YYLTYPE yylloc = yyloc_default; subquery_expr->select_ = (yyvsp[-1].select_stmt); (yyval.expr_t) = subquery_expr; } -#line 6931 "parser.cpp" +#line 6941 "parser.cpp" break; - case 347: /* subquery_expr: operand NOT IN '(' select_without_paren ')' */ -#line 2689 "parser.y" + case 349: /* subquery_expr: operand NOT IN '(' select_without_paren ')' */ +#line 2691 "parser.y" { infinity::SubqueryExpr* subquery_expr = new infinity::SubqueryExpr(); subquery_expr->subquery_type_ = infinity::SubqueryType::kNotIn; @@ -6939,11 +6949,11 @@ YYLTYPE yylloc = yyloc_default; subquery_expr->select_ = (yyvsp[-1].select_stmt); (yyval.expr_t) = subquery_expr; } -#line 6943 "parser.cpp" +#line 6953 "parser.cpp" break; - case 348: /* column_expr: IDENTIFIER */ -#line 2697 "parser.y" + case 350: /* column_expr: IDENTIFIER */ +#line 2699 "parser.y" { infinity::ColumnExpr* column_expr = new infinity::ColumnExpr(); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -6951,11 +6961,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].str_value)); (yyval.expr_t) = column_expr; } -#line 6955 "parser.cpp" +#line 6965 "parser.cpp" break; - case 349: /* column_expr: column_expr '.' IDENTIFIER */ -#line 2704 "parser.y" + case 351: /* column_expr: column_expr '.' IDENTIFIER */ +#line 2706 "parser.y" { infinity::ColumnExpr* column_expr = (infinity::ColumnExpr*)(yyvsp[-2].expr_t); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -6963,21 +6973,21 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].str_value)); (yyval.expr_t) = column_expr; } -#line 6967 "parser.cpp" +#line 6977 "parser.cpp" break; - case 350: /* column_expr: '*' */ -#line 2711 "parser.y" + case 352: /* column_expr: '*' */ +#line 2713 "parser.y" { infinity::ColumnExpr* column_expr = new infinity::ColumnExpr(); column_expr->star_ = true; (yyval.expr_t) = column_expr; } -#line 6977 "parser.cpp" +#line 6987 "parser.cpp" break; - case 351: /* column_expr: column_expr '.' '*' */ -#line 2716 "parser.y" + case 353: /* column_expr: column_expr '.' '*' */ +#line 2718 "parser.y" { infinity::ColumnExpr* column_expr = (infinity::ColumnExpr*)(yyvsp[-2].expr_t); if(column_expr->star_) { @@ -6987,232 +6997,232 @@ YYLTYPE yylloc = yyloc_default; column_expr->star_ = true; (yyval.expr_t) = column_expr; } -#line 6991 "parser.cpp" +#line 7001 "parser.cpp" break; - case 352: /* constant_expr: STRING */ -#line 2726 "parser.y" + case 354: /* constant_expr: STRING */ +#line 2728 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kString); const_expr->str_value_ = (yyvsp[0].str_value); (yyval.const_expr_t) = const_expr; } -#line 7001 "parser.cpp" +#line 7011 "parser.cpp" break; - case 353: /* constant_expr: TRUE */ -#line 2731 "parser.y" + case 355: /* constant_expr: TRUE */ +#line 2733 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kBoolean); const_expr->bool_value_ = true; (yyval.const_expr_t) = const_expr; } -#line 7011 "parser.cpp" +#line 7021 "parser.cpp" break; - case 354: /* constant_expr: FALSE */ -#line 2736 "parser.y" + case 356: /* constant_expr: FALSE */ +#line 2738 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kBoolean); const_expr->bool_value_ = false; (yyval.const_expr_t) = const_expr; } -#line 7021 "parser.cpp" +#line 7031 "parser.cpp" break; - case 355: /* constant_expr: DOUBLE_VALUE */ -#line 2741 "parser.y" + case 357: /* constant_expr: DOUBLE_VALUE */ +#line 2743 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kDouble); const_expr->double_value_ = (yyvsp[0].double_value); (yyval.const_expr_t) = const_expr; } -#line 7031 "parser.cpp" +#line 7041 "parser.cpp" break; - case 356: /* constant_expr: LONG_VALUE */ -#line 2746 "parser.y" + case 358: /* constant_expr: LONG_VALUE */ +#line 2748 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInteger); const_expr->integer_value_ = (yyvsp[0].long_value); (yyval.const_expr_t) = const_expr; } -#line 7041 "parser.cpp" +#line 7051 "parser.cpp" break; - case 357: /* constant_expr: DATE STRING */ -#line 2751 "parser.y" + case 359: /* constant_expr: DATE STRING */ +#line 2753 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kDate); const_expr->date_value_ = (yyvsp[0].str_value); (yyval.const_expr_t) = const_expr; } -#line 7051 "parser.cpp" +#line 7061 "parser.cpp" break; - case 358: /* constant_expr: TIME STRING */ -#line 2756 "parser.y" + case 360: /* constant_expr: TIME STRING */ +#line 2758 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kTime); const_expr->date_value_ = (yyvsp[0].str_value); (yyval.const_expr_t) = const_expr; } -#line 7061 "parser.cpp" +#line 7071 "parser.cpp" break; - case 359: /* constant_expr: DATETIME STRING */ -#line 2761 "parser.y" + case 361: /* constant_expr: DATETIME STRING */ +#line 2763 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kDateTime); const_expr->date_value_ = (yyvsp[0].str_value); (yyval.const_expr_t) = const_expr; } -#line 7071 "parser.cpp" +#line 7081 "parser.cpp" break; - case 360: /* constant_expr: TIMESTAMP STRING */ -#line 2766 "parser.y" + case 362: /* constant_expr: TIMESTAMP STRING */ +#line 2768 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kTimestamp); const_expr->date_value_ = (yyvsp[0].str_value); (yyval.const_expr_t) = const_expr; } -#line 7081 "parser.cpp" +#line 7091 "parser.cpp" break; - case 361: /* constant_expr: INTERVAL interval_expr */ -#line 2771 "parser.y" + case 363: /* constant_expr: INTERVAL interval_expr */ +#line 2773 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7089 "parser.cpp" +#line 7099 "parser.cpp" break; - case 362: /* constant_expr: interval_expr */ -#line 2774 "parser.y" + case 364: /* constant_expr: interval_expr */ +#line 2776 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7097 "parser.cpp" +#line 7107 "parser.cpp" break; - case 363: /* constant_expr: common_array_expr */ -#line 2777 "parser.y" + case 365: /* constant_expr: common_array_expr */ +#line 2779 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7105 "parser.cpp" +#line 7115 "parser.cpp" break; - case 364: /* common_array_expr: array_expr */ -#line 2781 "parser.y" + case 366: /* common_array_expr: array_expr */ +#line 2783 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7113 "parser.cpp" +#line 7123 "parser.cpp" break; - case 365: /* common_array_expr: subarray_array_expr */ -#line 2784 "parser.y" + case 367: /* common_array_expr: subarray_array_expr */ +#line 2786 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7121 "parser.cpp" +#line 7131 "parser.cpp" break; - case 366: /* common_array_expr: sparse_array_expr */ -#line 2787 "parser.y" + case 368: /* common_array_expr: sparse_array_expr */ +#line 2789 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7129 "parser.cpp" +#line 7139 "parser.cpp" break; - case 367: /* common_array_expr: empty_array_expr */ -#line 2790 "parser.y" + case 369: /* common_array_expr: empty_array_expr */ +#line 2792 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7137 "parser.cpp" +#line 7147 "parser.cpp" break; - case 368: /* common_sparse_array_expr: sparse_array_expr */ -#line 2794 "parser.y" + case 370: /* common_sparse_array_expr: sparse_array_expr */ +#line 2796 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7145 "parser.cpp" +#line 7155 "parser.cpp" break; - case 369: /* common_sparse_array_expr: array_expr */ -#line 2797 "parser.y" + case 371: /* common_sparse_array_expr: array_expr */ +#line 2799 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7153 "parser.cpp" +#line 7163 "parser.cpp" break; - case 370: /* common_sparse_array_expr: empty_array_expr */ -#line 2800 "parser.y" + case 372: /* common_sparse_array_expr: empty_array_expr */ +#line 2802 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7161 "parser.cpp" +#line 7171 "parser.cpp" break; - case 371: /* subarray_array_expr: unclosed_subarray_array_expr ']' */ -#line 2804 "parser.y" + case 373: /* subarray_array_expr: unclosed_subarray_array_expr ']' */ +#line 2806 "parser.y" { (yyval.const_expr_t) = (yyvsp[-1].const_expr_t); } -#line 7169 "parser.cpp" +#line 7179 "parser.cpp" break; - case 372: /* unclosed_subarray_array_expr: '[' common_array_expr */ -#line 2808 "parser.y" + case 374: /* unclosed_subarray_array_expr: '[' common_array_expr */ +#line 2810 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kSubArrayArray); const_expr->sub_array_array_.emplace_back((yyvsp[0].const_expr_t)); (yyval.const_expr_t) = const_expr; } -#line 7179 "parser.cpp" +#line 7189 "parser.cpp" break; - case 373: /* unclosed_subarray_array_expr: unclosed_subarray_array_expr ',' common_array_expr */ -#line 2813 "parser.y" + case 375: /* unclosed_subarray_array_expr: unclosed_subarray_array_expr ',' common_array_expr */ +#line 2815 "parser.y" { (yyvsp[-2].const_expr_t)->sub_array_array_.emplace_back((yyvsp[0].const_expr_t)); (yyval.const_expr_t) = (yyvsp[-2].const_expr_t); } -#line 7188 "parser.cpp" +#line 7198 "parser.cpp" break; - case 374: /* sparse_array_expr: long_sparse_array_expr */ -#line 2818 "parser.y" + case 376: /* sparse_array_expr: long_sparse_array_expr */ +#line 2820 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7196 "parser.cpp" +#line 7206 "parser.cpp" break; - case 375: /* sparse_array_expr: double_sparse_array_expr */ -#line 2821 "parser.y" + case 377: /* sparse_array_expr: double_sparse_array_expr */ +#line 2823 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7204 "parser.cpp" +#line 7214 "parser.cpp" break; - case 376: /* long_sparse_array_expr: unclosed_long_sparse_array_expr ']' */ -#line 2825 "parser.y" + case 378: /* long_sparse_array_expr: unclosed_long_sparse_array_expr ']' */ +#line 2827 "parser.y" { (yyval.const_expr_t) = (yyvsp[-1].const_expr_t); } -#line 7212 "parser.cpp" +#line 7222 "parser.cpp" break; - case 377: /* unclosed_long_sparse_array_expr: '[' int_sparse_ele */ -#line 2829 "parser.y" + case 379: /* unclosed_long_sparse_array_expr: '[' int_sparse_ele */ +#line 2831 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kLongSparseArray); const_expr->long_sparse_array_.first.emplace_back((yyvsp[0].int_sparse_ele_t)->first); @@ -7220,30 +7230,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].int_sparse_ele_t); (yyval.const_expr_t) = const_expr; } -#line 7224 "parser.cpp" +#line 7234 "parser.cpp" break; - case 378: /* unclosed_long_sparse_array_expr: unclosed_long_sparse_array_expr ',' int_sparse_ele */ -#line 2836 "parser.y" + case 380: /* unclosed_long_sparse_array_expr: unclosed_long_sparse_array_expr ',' int_sparse_ele */ +#line 2838 "parser.y" { (yyvsp[-2].const_expr_t)->long_sparse_array_.first.emplace_back((yyvsp[0].int_sparse_ele_t)->first); (yyvsp[-2].const_expr_t)->long_sparse_array_.second.emplace_back((yyvsp[0].int_sparse_ele_t)->second); delete (yyvsp[0].int_sparse_ele_t); (yyval.const_expr_t) = (yyvsp[-2].const_expr_t); } -#line 7235 "parser.cpp" +#line 7245 "parser.cpp" break; - case 379: /* double_sparse_array_expr: unclosed_double_sparse_array_expr ']' */ -#line 2843 "parser.y" + case 381: /* double_sparse_array_expr: unclosed_double_sparse_array_expr ']' */ +#line 2845 "parser.y" { (yyval.const_expr_t) = (yyvsp[-1].const_expr_t); } -#line 7243 "parser.cpp" +#line 7253 "parser.cpp" break; - case 380: /* unclosed_double_sparse_array_expr: '[' float_sparse_ele */ -#line 2847 "parser.y" + case 382: /* unclosed_double_sparse_array_expr: '[' float_sparse_ele */ +#line 2849 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kDoubleSparseArray); const_expr->double_sparse_array_.first.emplace_back((yyvsp[0].float_sparse_ele_t)->first); @@ -7251,266 +7261,266 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].float_sparse_ele_t); (yyval.const_expr_t) = const_expr; } -#line 7255 "parser.cpp" +#line 7265 "parser.cpp" break; - case 381: /* unclosed_double_sparse_array_expr: unclosed_double_sparse_array_expr ',' float_sparse_ele */ -#line 2854 "parser.y" + case 383: /* unclosed_double_sparse_array_expr: unclosed_double_sparse_array_expr ',' float_sparse_ele */ +#line 2856 "parser.y" { (yyvsp[-2].const_expr_t)->double_sparse_array_.first.emplace_back((yyvsp[0].float_sparse_ele_t)->first); (yyvsp[-2].const_expr_t)->double_sparse_array_.second.emplace_back((yyvsp[0].float_sparse_ele_t)->second); delete (yyvsp[0].float_sparse_ele_t); (yyval.const_expr_t) = (yyvsp[-2].const_expr_t); } -#line 7266 "parser.cpp" +#line 7276 "parser.cpp" break; - case 382: /* empty_array_expr: '[' ']' */ -#line 2861 "parser.y" + case 384: /* empty_array_expr: '[' ']' */ +#line 2863 "parser.y" { (yyval.const_expr_t) = new infinity::ConstantExpr(infinity::LiteralType::kEmptyArray); } -#line 7274 "parser.cpp" +#line 7284 "parser.cpp" break; - case 383: /* int_sparse_ele: LONG_VALUE ':' LONG_VALUE */ -#line 2865 "parser.y" + case 385: /* int_sparse_ele: LONG_VALUE ':' LONG_VALUE */ +#line 2867 "parser.y" { (yyval.int_sparse_ele_t) = new std::pair{(yyvsp[-2].long_value), (yyvsp[0].long_value)}; } -#line 7282 "parser.cpp" +#line 7292 "parser.cpp" break; - case 384: /* float_sparse_ele: LONG_VALUE ':' DOUBLE_VALUE */ -#line 2869 "parser.y" + case 386: /* float_sparse_ele: LONG_VALUE ':' DOUBLE_VALUE */ +#line 2871 "parser.y" { (yyval.float_sparse_ele_t) = new std::pair{(yyvsp[-2].long_value), (yyvsp[0].double_value)}; } -#line 7290 "parser.cpp" +#line 7300 "parser.cpp" break; - case 385: /* array_expr: long_array_expr */ -#line 2873 "parser.y" + case 387: /* array_expr: long_array_expr */ +#line 2875 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7298 "parser.cpp" +#line 7308 "parser.cpp" break; - case 386: /* array_expr: double_array_expr */ -#line 2876 "parser.y" + case 388: /* array_expr: double_array_expr */ +#line 2878 "parser.y" { (yyval.const_expr_t) = (yyvsp[0].const_expr_t); } -#line 7306 "parser.cpp" +#line 7316 "parser.cpp" break; - case 387: /* long_array_expr: unclosed_long_array_expr ']' */ -#line 2880 "parser.y" + case 389: /* long_array_expr: unclosed_long_array_expr ']' */ +#line 2882 "parser.y" { (yyval.const_expr_t) = (yyvsp[-1].const_expr_t); } -#line 7314 "parser.cpp" +#line 7324 "parser.cpp" break; - case 388: /* unclosed_long_array_expr: '[' LONG_VALUE */ -#line 2884 "parser.y" + case 390: /* unclosed_long_array_expr: '[' LONG_VALUE */ +#line 2886 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kIntegerArray); const_expr->long_array_.emplace_back((yyvsp[0].long_value)); (yyval.const_expr_t) = const_expr; } -#line 7324 "parser.cpp" +#line 7334 "parser.cpp" break; - case 389: /* unclosed_long_array_expr: unclosed_long_array_expr ',' LONG_VALUE */ -#line 2889 "parser.y" + case 391: /* unclosed_long_array_expr: unclosed_long_array_expr ',' LONG_VALUE */ +#line 2891 "parser.y" { (yyvsp[-2].const_expr_t)->long_array_.emplace_back((yyvsp[0].long_value)); (yyval.const_expr_t) = (yyvsp[-2].const_expr_t); } -#line 7333 "parser.cpp" +#line 7343 "parser.cpp" break; - case 390: /* double_array_expr: unclosed_double_array_expr ']' */ -#line 2894 "parser.y" + case 392: /* double_array_expr: unclosed_double_array_expr ']' */ +#line 2896 "parser.y" { (yyval.const_expr_t) = (yyvsp[-1].const_expr_t); } -#line 7341 "parser.cpp" +#line 7351 "parser.cpp" break; - case 391: /* unclosed_double_array_expr: '[' DOUBLE_VALUE */ -#line 2898 "parser.y" + case 393: /* unclosed_double_array_expr: '[' DOUBLE_VALUE */ +#line 2900 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kDoubleArray); const_expr->double_array_.emplace_back((yyvsp[0].double_value)); (yyval.const_expr_t) = const_expr; } -#line 7351 "parser.cpp" +#line 7361 "parser.cpp" break; - case 392: /* unclosed_double_array_expr: unclosed_double_array_expr ',' DOUBLE_VALUE */ -#line 2903 "parser.y" + case 394: /* unclosed_double_array_expr: unclosed_double_array_expr ',' DOUBLE_VALUE */ +#line 2905 "parser.y" { (yyvsp[-2].const_expr_t)->double_array_.emplace_back((yyvsp[0].double_value)); (yyval.const_expr_t) = (yyvsp[-2].const_expr_t); } -#line 7360 "parser.cpp" +#line 7370 "parser.cpp" break; - case 393: /* interval_expr: LONG_VALUE SECONDS */ -#line 2908 "parser.y" + case 395: /* interval_expr: LONG_VALUE SECONDS */ +#line 2910 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kSecond; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7371 "parser.cpp" +#line 7381 "parser.cpp" break; - case 394: /* interval_expr: LONG_VALUE SECOND */ -#line 2914 "parser.y" + case 396: /* interval_expr: LONG_VALUE SECOND */ +#line 2916 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kSecond; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7382 "parser.cpp" +#line 7392 "parser.cpp" break; - case 395: /* interval_expr: LONG_VALUE MINUTES */ -#line 2920 "parser.y" + case 397: /* interval_expr: LONG_VALUE MINUTES */ +#line 2922 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kMinute; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7393 "parser.cpp" +#line 7403 "parser.cpp" break; - case 396: /* interval_expr: LONG_VALUE MINUTE */ -#line 2926 "parser.y" + case 398: /* interval_expr: LONG_VALUE MINUTE */ +#line 2928 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kMinute; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7404 "parser.cpp" +#line 7414 "parser.cpp" break; - case 397: /* interval_expr: LONG_VALUE HOURS */ -#line 2932 "parser.y" + case 399: /* interval_expr: LONG_VALUE HOURS */ +#line 2934 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kHour; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7415 "parser.cpp" +#line 7425 "parser.cpp" break; - case 398: /* interval_expr: LONG_VALUE HOUR */ -#line 2938 "parser.y" + case 400: /* interval_expr: LONG_VALUE HOUR */ +#line 2940 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kHour; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7426 "parser.cpp" +#line 7436 "parser.cpp" break; - case 399: /* interval_expr: LONG_VALUE DAYS */ -#line 2944 "parser.y" + case 401: /* interval_expr: LONG_VALUE DAYS */ +#line 2946 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kDay; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7437 "parser.cpp" +#line 7447 "parser.cpp" break; - case 400: /* interval_expr: LONG_VALUE DAY */ -#line 2950 "parser.y" + case 402: /* interval_expr: LONG_VALUE DAY */ +#line 2952 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kDay; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7448 "parser.cpp" +#line 7458 "parser.cpp" break; - case 401: /* interval_expr: LONG_VALUE MONTHS */ -#line 2956 "parser.y" + case 403: /* interval_expr: LONG_VALUE MONTHS */ +#line 2958 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kMonth; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7459 "parser.cpp" +#line 7469 "parser.cpp" break; - case 402: /* interval_expr: LONG_VALUE MONTH */ -#line 2962 "parser.y" + case 404: /* interval_expr: LONG_VALUE MONTH */ +#line 2964 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kMonth; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7470 "parser.cpp" +#line 7480 "parser.cpp" break; - case 403: /* interval_expr: LONG_VALUE YEARS */ -#line 2968 "parser.y" + case 405: /* interval_expr: LONG_VALUE YEARS */ +#line 2970 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kYear; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7481 "parser.cpp" +#line 7491 "parser.cpp" break; - case 404: /* interval_expr: LONG_VALUE YEAR */ -#line 2974 "parser.y" + case 406: /* interval_expr: LONG_VALUE YEAR */ +#line 2976 "parser.y" { infinity::ConstantExpr* const_expr = new infinity::ConstantExpr(infinity::LiteralType::kInterval); const_expr->interval_type_ = infinity::TimeUnit::kYear; const_expr->integer_value_ = (yyvsp[-1].long_value); (yyval.const_expr_t) = const_expr; } -#line 7492 "parser.cpp" +#line 7502 "parser.cpp" break; - case 405: /* copy_option_list: copy_option */ -#line 2985 "parser.y" + case 407: /* copy_option_list: copy_option */ +#line 2987 "parser.y" { (yyval.copy_option_array) = new std::vector(); (yyval.copy_option_array)->push_back((yyvsp[0].copy_option_t)); } -#line 7501 "parser.cpp" +#line 7511 "parser.cpp" break; - case 406: /* copy_option_list: copy_option_list ',' copy_option */ -#line 2989 "parser.y" + case 408: /* copy_option_list: copy_option_list ',' copy_option */ +#line 2991 "parser.y" { (yyvsp[-2].copy_option_array)->push_back((yyvsp[0].copy_option_t)); (yyval.copy_option_array) = (yyvsp[-2].copy_option_array); } -#line 7510 "parser.cpp" +#line 7520 "parser.cpp" break; - case 407: /* copy_option: FORMAT IDENTIFIER */ -#line 2994 "parser.y" + case 409: /* copy_option: FORMAT IDENTIFIER */ +#line 2996 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kFormat; @@ -7541,11 +7551,11 @@ YYLTYPE yylloc = yyloc_default; YYERROR; } } -#line 7545 "parser.cpp" +#line 7555 "parser.cpp" break; - case 408: /* copy_option: DELIMITER STRING */ -#line 3024 "parser.y" + case 410: /* copy_option: DELIMITER STRING */ +#line 3026 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kDelimiter; @@ -7556,83 +7566,83 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].str_value)); } -#line 7560 "parser.cpp" +#line 7570 "parser.cpp" break; - case 409: /* copy_option: HEADER */ -#line 3034 "parser.y" + case 411: /* copy_option: HEADER */ +#line 3036 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kHeader; (yyval.copy_option_t)->header_ = true; } -#line 7570 "parser.cpp" +#line 7580 "parser.cpp" break; - case 410: /* copy_option: OFFSET LONG_VALUE */ -#line 3039 "parser.y" + case 412: /* copy_option: OFFSET LONG_VALUE */ +#line 3041 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kOffset; (yyval.copy_option_t)->offset_ = (yyvsp[0].long_value); } -#line 7580 "parser.cpp" +#line 7590 "parser.cpp" break; - case 411: /* copy_option: LIMIT LONG_VALUE */ -#line 3044 "parser.y" + case 413: /* copy_option: LIMIT LONG_VALUE */ +#line 3046 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kLimit; (yyval.copy_option_t)->limit_ = (yyvsp[0].long_value); } -#line 7590 "parser.cpp" +#line 7600 "parser.cpp" break; - case 412: /* copy_option: ROWLIMIT LONG_VALUE */ -#line 3049 "parser.y" + case 414: /* copy_option: ROWLIMIT LONG_VALUE */ +#line 3051 "parser.y" { (yyval.copy_option_t) = new infinity::CopyOption(); (yyval.copy_option_t)->option_type_ = infinity::CopyOptionType::kRowLimit; (yyval.copy_option_t)->row_limit_ = (yyvsp[0].long_value); } -#line 7600 "parser.cpp" +#line 7610 "parser.cpp" break; - case 413: /* file_path: STRING */ -#line 3055 "parser.y" + case 415: /* file_path: STRING */ +#line 3057 "parser.y" { (yyval.str_value) = (yyvsp[0].str_value); } -#line 7608 "parser.cpp" +#line 7618 "parser.cpp" break; - case 414: /* if_exists: IF EXISTS */ -#line 3059 "parser.y" + case 416: /* if_exists: IF EXISTS */ +#line 3061 "parser.y" { (yyval.bool_value) = true; } -#line 7614 "parser.cpp" +#line 7624 "parser.cpp" break; - case 415: /* if_exists: %empty */ -#line 3060 "parser.y" + case 417: /* if_exists: %empty */ +#line 3062 "parser.y" { (yyval.bool_value) = false; } -#line 7620 "parser.cpp" +#line 7630 "parser.cpp" break; - case 416: /* if_not_exists: IF NOT EXISTS */ -#line 3062 "parser.y" + case 418: /* if_not_exists: IF NOT EXISTS */ +#line 3064 "parser.y" { (yyval.bool_value) = true; } -#line 7626 "parser.cpp" +#line 7636 "parser.cpp" break; - case 417: /* if_not_exists: %empty */ -#line 3063 "parser.y" + case 419: /* if_not_exists: %empty */ +#line 3065 "parser.y" { (yyval.bool_value) = false; } -#line 7632 "parser.cpp" +#line 7642 "parser.cpp" break; - case 420: /* if_not_exists_info: if_not_exists IDENTIFIER */ -#line 3078 "parser.y" + case 422: /* if_not_exists_info: if_not_exists IDENTIFIER */ +#line 3080 "parser.y" { (yyval.if_not_exists_info_t) = new infinity::IfNotExistsInfo(); (yyval.if_not_exists_info_t)->exists_ = true; @@ -7641,80 +7651,80 @@ YYLTYPE yylloc = yyloc_default; (yyval.if_not_exists_info_t)->info_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 7645 "parser.cpp" +#line 7655 "parser.cpp" break; - case 421: /* if_not_exists_info: %empty */ -#line 3086 "parser.y" + case 423: /* if_not_exists_info: %empty */ +#line 3088 "parser.y" { (yyval.if_not_exists_info_t) = new infinity::IfNotExistsInfo(); } -#line 7653 "parser.cpp" +#line 7663 "parser.cpp" break; - case 422: /* with_index_param_list: WITH '(' index_param_list ')' */ -#line 3090 "parser.y" + case 424: /* with_index_param_list: WITH '(' index_param_list ')' */ +#line 3092 "parser.y" { (yyval.with_index_param_list_t) = (yyvsp[-1].index_param_list_t); } -#line 7661 "parser.cpp" +#line 7671 "parser.cpp" break; - case 423: /* with_index_param_list: %empty */ -#line 3093 "parser.y" + case 425: /* with_index_param_list: %empty */ +#line 3095 "parser.y" { (yyval.with_index_param_list_t) = new std::vector(); } -#line 7669 "parser.cpp" +#line 7679 "parser.cpp" break; - case 424: /* optional_table_properties_list: PROPERTIES '(' index_param_list ')' */ -#line 3097 "parser.y" + case 426: /* optional_table_properties_list: PROPERTIES '(' index_param_list ')' */ +#line 3099 "parser.y" { (yyval.with_index_param_list_t) = (yyvsp[-1].index_param_list_t); } -#line 7677 "parser.cpp" +#line 7687 "parser.cpp" break; - case 425: /* optional_table_properties_list: %empty */ -#line 3100 "parser.y" + case 427: /* optional_table_properties_list: %empty */ +#line 3102 "parser.y" { (yyval.with_index_param_list_t) = nullptr; } -#line 7685 "parser.cpp" +#line 7695 "parser.cpp" break; - case 426: /* index_param_list: index_param */ -#line 3104 "parser.y" + case 428: /* index_param_list: index_param */ +#line 3106 "parser.y" { (yyval.index_param_list_t) = new std::vector(); (yyval.index_param_list_t)->push_back((yyvsp[0].index_param_t)); } -#line 7694 "parser.cpp" +#line 7704 "parser.cpp" break; - case 427: /* index_param_list: index_param_list ',' index_param */ -#line 3108 "parser.y" + case 429: /* index_param_list: index_param_list ',' index_param */ +#line 3110 "parser.y" { (yyvsp[-2].index_param_list_t)->push_back((yyvsp[0].index_param_t)); (yyval.index_param_list_t) = (yyvsp[-2].index_param_list_t); } -#line 7703 "parser.cpp" +#line 7713 "parser.cpp" break; - case 428: /* index_param: IDENTIFIER */ -#line 3113 "parser.y" + case 430: /* index_param: IDENTIFIER */ +#line 3115 "parser.y" { ParserHelper::ToLower((yyvsp[0].str_value)); (yyval.index_param_t) = new infinity::InitParameter(); (yyval.index_param_t)->param_name_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 7714 "parser.cpp" +#line 7724 "parser.cpp" break; - case 429: /* index_param: IDENTIFIER '=' IDENTIFIER */ -#line 3119 "parser.y" + case 431: /* index_param: IDENTIFIER '=' IDENTIFIER */ +#line 3121 "parser.y" { ParserHelper::ToLower((yyvsp[-2].str_value)); ParserHelper::ToLower((yyvsp[0].str_value)); @@ -7725,11 +7735,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_param_t)->param_value_ = (yyvsp[0].str_value); free((yyvsp[0].str_value)); } -#line 7729 "parser.cpp" +#line 7739 "parser.cpp" break; - case 430: /* index_param: IDENTIFIER '=' LONG_VALUE */ -#line 3129 "parser.y" + case 432: /* index_param: IDENTIFIER '=' LONG_VALUE */ +#line 3131 "parser.y" { (yyval.index_param_t) = new infinity::InitParameter(); (yyval.index_param_t)->param_name_ = (yyvsp[-2].str_value); @@ -7737,11 +7747,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_param_t)->param_value_ = std::to_string((yyvsp[0].long_value)); } -#line 7741 "parser.cpp" +#line 7751 "parser.cpp" break; - case 431: /* index_param: IDENTIFIER '=' DOUBLE_VALUE */ -#line 3136 "parser.y" + case 433: /* index_param: IDENTIFIER '=' DOUBLE_VALUE */ +#line 3138 "parser.y" { (yyval.index_param_t) = new infinity::InitParameter(); (yyval.index_param_t)->param_name_ = (yyvsp[-2].str_value); @@ -7749,20 +7759,20 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_param_t)->param_value_ = std::to_string((yyvsp[0].double_value)); } -#line 7753 "parser.cpp" +#line 7763 "parser.cpp" break; - case 432: /* index_info_list: index_info_list_one_pack */ -#line 3147 "parser.y" + case 434: /* index_info_list: index_info_list_one_pack */ +#line 3149 "parser.y" { (yyval.index_info_list_t) = (yyvsp[0].index_info_list_t); (yyvsp[0].index_info_list_t) = nullptr; } -#line 7762 "parser.cpp" +#line 7772 "parser.cpp" break; - case 433: /* index_info_list: index_info_list index_info_list_one_pack */ -#line 3151 "parser.y" + case 435: /* index_info_list: index_info_list index_info_list_one_pack */ +#line 3153 "parser.y" { (yyval.index_info_list_t) = (yyvsp[-1].index_info_list_t); (yyvsp[-1].index_info_list_t) = nullptr; @@ -7770,11 +7780,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].index_info_list_t); (yyvsp[0].index_info_list_t) = nullptr; } -#line 7774 "parser.cpp" +#line 7784 "parser.cpp" break; - case 434: /* index_info_list_one_pack: '(' identifier_array ')' USING IDENTIFIER with_index_param_list */ -#line 3159 "parser.y" + case 436: /* index_info_list_one_pack: '(' identifier_array ')' USING IDENTIFIER with_index_param_list */ +#line 3161 "parser.y" { ParserHelper::ToLower((yyvsp[-1].str_value)); infinity::IndexType index_type = infinity::IndexType::kInvalid; @@ -7827,11 +7837,11 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-4].identifier_array_t); } -#line 7831 "parser.cpp" +#line 7841 "parser.cpp" break; - case 435: /* index_info_list_one_pack: '(' identifier_array ')' */ -#line 3211 "parser.y" + case 437: /* index_info_list_one_pack: '(' identifier_array ')' */ +#line 3213 "parser.y" { infinity::IndexType index_type = infinity::IndexType::kSecondary; size_t index_count = (yyvsp[-1].identifier_array_t)->size(); @@ -7845,11 +7855,11 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].identifier_array_t); } -#line 7849 "parser.cpp" +#line 7859 "parser.cpp" break; -#line 7853 "parser.cpp" +#line 7863 "parser.cpp" default: break; } @@ -8078,7 +8088,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 3225 "parser.y" +#line 3227 "parser.y" void diff --git a/src/parser/parser.h b/src/parser/parser.h index 6411206765..0756b52f37 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -231,81 +231,82 @@ struct SQL_LTYPE { DATETIME = 359, /* DATETIME */ FLOAT16 = 360, /* FLOAT16 */ BFLOAT16 = 361, /* BFLOAT16 */ - TIMESTAMP = 362, /* TIMESTAMP */ - UUID = 363, /* UUID */ - POINT = 364, /* POINT */ - LINE = 365, /* LINE */ - LSEG = 366, /* LSEG */ - BOX = 367, /* BOX */ - PATH = 368, /* PATH */ - POLYGON = 369, /* POLYGON */ - CIRCLE = 370, /* CIRCLE */ - BLOB = 371, /* BLOB */ - BITMAP = 372, /* BITMAP */ - EMBEDDING = 373, /* EMBEDDING */ - VECTOR = 374, /* VECTOR */ - BIT = 375, /* BIT */ - TEXT = 376, /* TEXT */ - TENSOR = 377, /* TENSOR */ - SPARSE = 378, /* SPARSE */ - TENSORARRAY = 379, /* TENSORARRAY */ - PRIMARY = 380, /* PRIMARY */ - KEY = 381, /* KEY */ - UNIQUE = 382, /* UNIQUE */ - NULLABLE = 383, /* NULLABLE */ - IS = 384, /* IS */ - DEFAULT = 385, /* DEFAULT */ - TRUE = 386, /* TRUE */ - FALSE = 387, /* FALSE */ - INTERVAL = 388, /* INTERVAL */ - SECOND = 389, /* SECOND */ - SECONDS = 390, /* SECONDS */ - MINUTE = 391, /* MINUTE */ - MINUTES = 392, /* MINUTES */ - HOUR = 393, /* HOUR */ - HOURS = 394, /* HOURS */ - DAY = 395, /* DAY */ - DAYS = 396, /* DAYS */ - MONTH = 397, /* MONTH */ - MONTHS = 398, /* MONTHS */ - YEAR = 399, /* YEAR */ - YEARS = 400, /* YEARS */ - EQUAL = 401, /* EQUAL */ - NOT_EQ = 402, /* NOT_EQ */ - LESS_EQ = 403, /* LESS_EQ */ - GREATER_EQ = 404, /* GREATER_EQ */ - BETWEEN = 405, /* BETWEEN */ - AND = 406, /* AND */ - OR = 407, /* OR */ - EXTRACT = 408, /* EXTRACT */ - LIKE = 409, /* LIKE */ - DATA = 410, /* DATA */ - LOG = 411, /* LOG */ - BUFFER = 412, /* BUFFER */ - TRANSACTIONS = 413, /* TRANSACTIONS */ - TRANSACTION = 414, /* TRANSACTION */ - USING = 415, /* USING */ - SESSION = 416, /* SESSION */ - GLOBAL = 417, /* GLOBAL */ - OFF = 418, /* OFF */ - EXPORT = 419, /* EXPORT */ - PROFILE = 420, /* PROFILE */ - CONFIGS = 421, /* CONFIGS */ - CONFIG = 422, /* CONFIG */ - PROFILES = 423, /* PROFILES */ - VARIABLES = 424, /* VARIABLES */ - VARIABLE = 425, /* VARIABLE */ - DELTA = 426, /* DELTA */ - LOGS = 427, /* LOGS */ - CATALOGS = 428, /* CATALOGS */ - SEARCH = 429, /* SEARCH */ - MATCH = 430, /* MATCH */ - MAXSIM = 431, /* MAXSIM */ - QUERY = 432, /* QUERY */ - QUERIES = 433, /* QUERIES */ - FUSION = 434, /* FUSION */ - ROWLIMIT = 435, /* ROWLIMIT */ - NUMBER = 436 /* NUMBER */ + UNSIGNED = 362, /* UNSIGNED */ + TIMESTAMP = 363, /* TIMESTAMP */ + UUID = 364, /* UUID */ + POINT = 365, /* POINT */ + LINE = 366, /* LINE */ + LSEG = 367, /* LSEG */ + BOX = 368, /* BOX */ + PATH = 369, /* PATH */ + POLYGON = 370, /* POLYGON */ + CIRCLE = 371, /* CIRCLE */ + BLOB = 372, /* BLOB */ + BITMAP = 373, /* BITMAP */ + EMBEDDING = 374, /* EMBEDDING */ + VECTOR = 375, /* VECTOR */ + BIT = 376, /* BIT */ + TEXT = 377, /* TEXT */ + TENSOR = 378, /* TENSOR */ + SPARSE = 379, /* SPARSE */ + TENSORARRAY = 380, /* TENSORARRAY */ + PRIMARY = 381, /* PRIMARY */ + KEY = 382, /* KEY */ + UNIQUE = 383, /* UNIQUE */ + NULLABLE = 384, /* NULLABLE */ + IS = 385, /* IS */ + DEFAULT = 386, /* DEFAULT */ + TRUE = 387, /* TRUE */ + FALSE = 388, /* FALSE */ + INTERVAL = 389, /* INTERVAL */ + SECOND = 390, /* SECOND */ + SECONDS = 391, /* SECONDS */ + MINUTE = 392, /* MINUTE */ + MINUTES = 393, /* MINUTES */ + HOUR = 394, /* HOUR */ + HOURS = 395, /* HOURS */ + DAY = 396, /* DAY */ + DAYS = 397, /* DAYS */ + MONTH = 398, /* MONTH */ + MONTHS = 399, /* MONTHS */ + YEAR = 400, /* YEAR */ + YEARS = 401, /* YEARS */ + EQUAL = 402, /* EQUAL */ + NOT_EQ = 403, /* NOT_EQ */ + LESS_EQ = 404, /* LESS_EQ */ + GREATER_EQ = 405, /* GREATER_EQ */ + BETWEEN = 406, /* BETWEEN */ + AND = 407, /* AND */ + OR = 408, /* OR */ + EXTRACT = 409, /* EXTRACT */ + LIKE = 410, /* LIKE */ + DATA = 411, /* DATA */ + LOG = 412, /* LOG */ + BUFFER = 413, /* BUFFER */ + TRANSACTIONS = 414, /* TRANSACTIONS */ + TRANSACTION = 415, /* TRANSACTION */ + USING = 416, /* USING */ + SESSION = 417, /* SESSION */ + GLOBAL = 418, /* GLOBAL */ + OFF = 419, /* OFF */ + EXPORT = 420, /* EXPORT */ + PROFILE = 421, /* PROFILE */ + CONFIGS = 422, /* CONFIGS */ + CONFIG = 423, /* CONFIG */ + PROFILES = 424, /* PROFILES */ + VARIABLES = 425, /* VARIABLES */ + VARIABLE = 426, /* VARIABLE */ + DELTA = 427, /* DELTA */ + LOGS = 428, /* LOGS */ + CATALOGS = 429, /* CATALOGS */ + SEARCH = 430, /* SEARCH */ + MATCH = 431, /* MATCH */ + MAXSIM = 432, /* MAXSIM */ + QUERY = 433, /* QUERY */ + QUERIES = 434, /* QUERIES */ + FUSION = 435, /* FUSION */ + ROWLIMIT = 436, /* ROWLIMIT */ + NUMBER = 437 /* NUMBER */ }; typedef enum sqltokentype sqltoken_kind_t; #endif @@ -391,7 +392,7 @@ union SQLSTYPE std::pair* int_sparse_ele_t; std::pair* float_sparse_ele_t; -#line 395 "parser.h" +#line 396 "parser.h" }; typedef union SQLSTYPE SQLSTYPE; diff --git a/src/parser/parser.y b/src/parser/parser.y index 628162bd11..c357151755 100644 --- a/src/parser/parser.y +++ b/src/parser/parser.y @@ -380,7 +380,7 @@ struct SQL_LTYPE { %token DATABASE TABLE COLLECTION TABLES INTO VALUES AST PIPELINE RAW LOGICAL PHYSICAL FRAGMENT VIEW INDEX ANALYZE VIEWS DATABASES SEGMENT SEGMENTS BLOCK BLOCKS COLUMN COLUMNS INDEXES CHUNK %token GROUP BY HAVING AS NATURAL JOIN LEFT RIGHT OUTER FULL ON INNER CROSS DISTINCT WHERE ORDER LIMIT OFFSET ASC DESC %token IF NOT EXISTS IN FROM TO WITH DELIMITER FORMAT HEADER CAST END CASE ELSE THEN WHEN -%token BOOLEAN INTEGER INT TINYINT SMALLINT BIGINT HUGEINT VARCHAR FLOAT DOUBLE REAL DECIMAL DATE TIME DATETIME FLOAT16 BFLOAT16 +%token BOOLEAN INTEGER INT TINYINT SMALLINT BIGINT HUGEINT VARCHAR FLOAT DOUBLE REAL DECIMAL DATE TIME DATETIME FLOAT16 BFLOAT16 UNSIGNED %token TIMESTAMP UUID POINT LINE LSEG BOX PATH POLYGON CIRCLE BLOB BITMAP EMBEDDING VECTOR BIT TEXT TENSOR SPARSE TENSORARRAY %token PRIMARY KEY UNIQUE NULLABLE IS DEFAULT %token TRUE FALSE INTERVAL SECOND SECONDS MINUTE MINUTES HOUR HOURS DAY DAYS MONTH MONTHS YEAR YEARS @@ -808,6 +808,7 @@ BOOLEAN { $$ = infinity::ColumnType{infinity::LogicalType::kBoolean, 0, 0, 0, in | EMBEDDING '(' BIGINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemInt64}; } | EMBEDDING '(' FLOAT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemFloat}; } | EMBEDDING '(' DOUBLE ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemDouble}; } +| EMBEDDING '(' UNSIGNED TINYINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $6, 0, 0, infinity::kElemUInt8}; } | TENSOR '(' BIT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kTensor, $5, 0, 0, infinity::kElemBit}; } | TENSOR '(' TINYINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kTensor, $5, 0, 0, infinity::kElemInt8}; } | TENSOR '(' SMALLINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kTensor, $5, 0, 0, infinity::kElemInt16}; } @@ -832,6 +833,7 @@ BOOLEAN { $$ = infinity::ColumnType{infinity::LogicalType::kBoolean, 0, 0, 0, in | VECTOR '(' BIGINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemInt64}; } | VECTOR '(' FLOAT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemFloat}; } | VECTOR '(' DOUBLE ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $5, 0, 0, infinity::kElemDouble}; } +| VECTOR '(' UNSIGNED TINYINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kEmbedding, $6, 0, 0, infinity::kElemUInt8}; } | SPARSE '(' BIT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kSparse, $5, 0, 0, infinity::kElemBit}; } | SPARSE '(' TINYINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kSparse, $5, 0, 0, infinity::kElemInt8}; } | SPARSE '(' SMALLINT ',' LONG_VALUE ')' { $$ = infinity::ColumnType{infinity::LogicalType::kSparse, $5, 0, 0, infinity::kElemInt16}; } diff --git a/src/parser/type/complex/embedding_type.cpp b/src/parser/type/complex/embedding_type.cpp index 40fe534780..5fa9f084ce 100644 --- a/src/parser/type/complex/embedding_type.cpp +++ b/src/parser/type/complex/embedding_type.cpp @@ -25,6 +25,7 @@ size_t EmbeddingType::embedding_type_width[] = { 8, // int64 4, // float32 8, // double64 + 1, // uint8 }; void EmbeddingType::Init(const void *from_ptr, size_t size) { diff --git a/src/parser/type/complex/embedding_type.h b/src/parser/type/complex/embedding_type.h index 2109952828..4b51c00b57 100644 --- a/src/parser/type/complex/embedding_type.h +++ b/src/parser/type/complex/embedding_type.h @@ -31,6 +31,7 @@ enum EmbeddingDataType : int8_t { kElemInt64, kElemFloat, kElemDouble, + kElemUInt8, kElemInvalid, }; @@ -74,6 +75,11 @@ inline EmbeddingDataType ToEmbeddingDataType() { return EmbeddingDataType::kElemDouble; } +template <> +inline EmbeddingDataType ToEmbeddingDataType() { + return EmbeddingDataType::kElemUInt8; +} + struct EmbeddingType { public: char *ptr{}; @@ -110,6 +116,8 @@ struct EmbeddingType { return "FLOAT32"; case kElemDouble: return "FLOAT64"; + case kElemUInt8: + return "UINT8"; default: { ParserError("Unexpected embedding type"); } @@ -132,6 +140,8 @@ struct EmbeddingType { return kElemFloat; } else if (sv == "FLOAT64" || sv == "DOUBLE" || sv == "F64") { return kElemDouble; + } else if (sv == "UINT8") { + return kElemUInt8; } else { ParserError("Unexpected embedding type"); } @@ -154,6 +164,8 @@ struct EmbeddingType { return Embedding2StringInternal(embedding, dimension); case kElemDouble: return Embedding2StringInternal(embedding, dimension); + case kElemUInt8: + return Embedding2StringInternal(embedding, dimension); default: { ParserError("Unexpected embedding type"); } @@ -173,6 +185,28 @@ struct EmbeddingType { return ss.str(); } + template <> + inline std::string Embedding2StringInternal(const EmbeddingType &embedding, size_t dimension) { + std::stringstream ss; + ss << "["; + for (size_t i = 0; i < dimension - 1; ++i) { + ss << int(((int8_t *)(embedding.ptr))[i]) << ','; + } + ss << int(((int8_t *)(embedding.ptr))[dimension - 1]) << "]"; + return ss.str(); + } + + template <> + inline std::string Embedding2StringInternal(const EmbeddingType &embedding, size_t dimension) { + std::stringstream ss; + ss << "["; + for (size_t i = 0; i < dimension - 1; ++i) { + ss << int(((uint8_t *)(embedding.ptr))[i]) << ','; + } + ss << int(((uint8_t *)(embedding.ptr))[dimension - 1]) << "]"; + return ss.str(); + } + template <> inline std::string Embedding2StringInternal(const EmbeddingType &embedding, size_t dimension) { std::stringstream ss; diff --git a/src/parser/type/data_type.cpp b/src/parser/type/data_type.cpp index 6c774c2242..340da2a31c 100644 --- a/src/parser/type/data_type.cpp +++ b/src/parser/type/data_type.cpp @@ -559,6 +559,21 @@ BooleanT DataType::StringToValue(const std::string_view &str) { return str_lower == "true"; } +template <> +uint8_t DataType::StringToValue(const std::string_view &str) { + if (str.empty()) { + return {}; + } + uint8_t value{}; + auto res = std::from_chars(str.begin(), str.end(), value); + if(res.ptr != str.data() + str.size()) { + std::string error_message = fmt::format("Error: parse u8 integer: {} to {}", str, value); + std::cerr << error_message << std::endl; + ParserError(error_message); + } + return value; +} + template <> TinyIntT DataType::StringToValue(const std::string_view &str) { if (str.empty()) { diff --git a/src/parser/type/data_type.h b/src/parser/type/data_type.h index bffb6c00a8..0389121db0 100644 --- a/src/parser/type/data_type.h +++ b/src/parser/type/data_type.h @@ -324,6 +324,9 @@ std::string DataType::TypeToString(); template <> BooleanT DataType::StringToValue(const std::string_view &str_view); +template <> +uint8_t DataType::StringToValue(const std::string_view &str_view); + template <> TinyIntT DataType::StringToValue(const std::string_view &str_view); diff --git a/src/parser/type/info/embedding_info.cpp b/src/parser/type/info/embedding_info.cpp index faad9a5fec..0c77851ee9 100644 --- a/src/parser/type/info/embedding_info.cpp +++ b/src/parser/type/info/embedding_info.cpp @@ -47,6 +47,8 @@ std::string EmbeddingInfo::EmbeddingDataTypeToString(EmbeddingDataType type) { return "float"; case kElemDouble: return "double"; + case kElemUInt8: + return "uint8"; default: ParserError("Unexpected embedding type"); } diff --git a/src/parser/type/logical_type.cpp b/src/parser/type/logical_type.cpp index b627812b2c..3c1812bf99 100644 --- a/src/parser/type/logical_type.cpp +++ b/src/parser/type/logical_type.cpp @@ -263,6 +263,9 @@ LogicalType GetCommonLogicalType(const EmbeddingDataType column_type) { case EmbeddingDataType::kElemInt8: { return GetCommonLogicalType(); } + case EmbeddingDataType::kElemUInt8: { + return GetCommonLogicalType(); + } case EmbeddingDataType::kElemInt16: { return GetCommonLogicalType(); } @@ -290,6 +293,9 @@ LogicalType GetCommonLogicalType(const EmbeddingDataType type1, const EmbeddingD case EmbeddingDataType::kElemInt8: { return GetCommonLogicalType(type2); } + case EmbeddingDataType::kElemUInt8: { + return GetCommonLogicalType(type2); + } case EmbeddingDataType::kElemInt16: { return GetCommonLogicalType(type2); } diff --git a/src/planner/expression_binder.cpp b/src/planner/expression_binder.cpp index 65415b9039..ea23173e21 100644 --- a/src/planner/expression_binder.cpp +++ b/src/planner/expression_binder.cpp @@ -585,6 +585,12 @@ SharedPtr ExpressionBinder::BuildKnnExpr(const KnnExpr &parsed_k embedding_info->Dimension())); RecoverableError(status); } + if (parsed_knn_expr.embedding_data_type_ != embedding_info->Type()) { + Status status = Status::SyntaxError(fmt::format("Query embedding with data type: {} which doesn't match with column embedding type {}.", + EmbeddingInfo::EmbeddingDataTypeToString(parsed_knn_expr.embedding_data_type_), + EmbeddingInfo::EmbeddingDataTypeToString(embedding_info->Type()))); + RecoverableError(std::move(status)); + } } arguments.emplace_back(expr_ptr); diff --git a/src/planner/logical_planner.cpp b/src/planner/logical_planner.cpp index 2a040e5f34..da94b0e9a0 100644 --- a/src/planner/logical_planner.cpp +++ b/src/planner/logical_planner.cpp @@ -685,7 +685,7 @@ Status LogicalPlanner::BuildCreateIndex(const CreateStatement *statement, Shared case IndexType::kHnsw: { assert(index_info->index_param_list_ != nullptr); // The following check might affect performance - IndexHnsw::ValidateColumnDataType(base_table_ref, index_info->column_name_); // may throw exception + IndexHnsw::ValidateColumnDataType(base_table_ref, index_info->column_name_, *(index_info->index_param_list_)); // may throw exception base_index_ptr = IndexHnsw::Make(index_name, index_filename, {index_info->column_name_}, *(index_info->index_param_list_)); break; } diff --git a/src/storage/column_vector/column_vector.cpp b/src/storage/column_vector/column_vector.cpp index 76a4a351d2..66cb3b2552 100644 --- a/src/storage/column_vector/column_vector.cpp +++ b/src/storage/column_vector/column_vector.cpp @@ -1606,6 +1606,10 @@ void ColumnVector::AppendByStringView(std::string_view sv) { AppendEmbedding(ele_str_views, dst_off); break; } + case kElemUInt8: { + AppendEmbedding(ele_str_views, dst_off); + break; + } case kElemInt8: { AppendEmbedding(ele_str_views, dst_off); break; @@ -1651,6 +1655,10 @@ void ColumnVector::AppendByStringView(std::string_view sv) { AppendTensor(ele_str_views, dst_off, unit_embedding_dim); break; } + case kElemUInt8: { + AppendTensor(ele_str_views, dst_off, unit_embedding_dim); + break; + } case kElemInt8: { AppendTensor(ele_str_views, dst_off, unit_embedding_dim); break; @@ -1702,6 +1710,10 @@ void ColumnVector::AppendByStringView(std::string_view sv) { AppendTensorArray(ele_str_views, dst_off, unit_embedding_dim); break; } + case kElemUInt8: { + AppendTensorArray(ele_str_views, dst_off, unit_embedding_dim); + break; + } case kElemInt8: { AppendTensorArray(ele_str_views, dst_off, unit_embedding_dim); break; @@ -1755,6 +1767,10 @@ void ColumnVector::AppendByStringView(std::string_view sv) { AppendSparse(ele_str_views, index); break; } + case kElemUInt8: { + AppendSparse(ele_str_views, index); + break; + } case kElemInt8: { AppendSparse(ele_str_views, index); break; diff --git a/src/storage/column_vector/null_value.cppm b/src/storage/column_vector/null_value.cppm index 509595e9e2..8dabc8f22d 100644 --- a/src/storage/column_vector/null_value.cppm +++ b/src/storage/column_vector/null_value.cppm @@ -37,6 +37,11 @@ inline BooleanT NullValue() { return false; } +template <> +inline u8 NullValue() { + return std::numeric_limits::infinity(); +} + template <> inline TinyIntT NullValue() { return std::numeric_limits::infinity(); diff --git a/src/storage/definition/index_hnsw.cpp b/src/storage/definition/index_hnsw.cpp index 4954aacdc8..6dad5a71ba 100644 --- a/src/storage/definition/index_hnsw.cpp +++ b/src/storage/definition/index_hnsw.cpp @@ -31,6 +31,9 @@ import index_base; import logical_type; import statement_common; import logger; +import data_type; +import embedding_info; +import internal_types; namespace infinity { @@ -144,18 +147,36 @@ nlohmann::json IndexHnsw::Serialize() const { return res; } -void IndexHnsw::ValidateColumnDataType(const SharedPtr &base_table_ref, const String &column_name) { +void IndexHnsw::ValidateColumnDataType(const SharedPtr &base_table_ref, + const String &column_name, + const Vector &index_param_list) { + SharedPtr data_type_ptr; auto &column_names_vector = *(base_table_ref->column_names_); auto &column_types_vector = *(base_table_ref->column_types_); SizeT column_id = std::find(column_names_vector.begin(), column_names_vector.end(), column_name) - column_names_vector.begin(); if (column_id == column_names_vector.size()) { Status status = Status::ColumnNotExist(column_name); RecoverableError(status); - } else if (auto &data_type = column_types_vector[column_id]; data_type->type() != LogicalType::kEmbedding) { + } + if (data_type_ptr = column_types_vector[column_id]; data_type_ptr->type() != LogicalType::kEmbedding) { Status status = Status::InvalidIndexDefinition( - fmt::format("Attempt to create HNSW index on column: {}, data type: {}.", column_name, data_type->ToString())); + fmt::format("Attempt to create HNSW index on column: {}, data type: {}.", column_name, data_type_ptr->ToString())); RecoverableError(status); } + SharedPtr embedding_info = std::dynamic_pointer_cast(data_type_ptr->type_info()); + EmbeddingDataType embedding_data_type = embedding_info->Type(); + for (const auto *para : index_param_list) { + if (para->param_name_ == "encode" && StringToHnswEncodeType(para->param_value_) == HnswEncodeType::kLVQ) { + // TODO: now only support float? + if (embedding_data_type != EmbeddingDataType::kElemFloat) { + Status status = + Status::InvalidIndexDefinition(fmt::format("Attempt to create HNSW index with LVQ encoding on column: {}, data type: {}.", + column_name, + data_type_ptr->ToString())); + RecoverableError(status); + } + } + } } } // namespace infinity \ No newline at end of file diff --git a/src/storage/definition/index_hnsw.cppm b/src/storage/definition/index_hnsw.cppm index f64deffc0f..df849ce15a 100644 --- a/src/storage/definition/index_hnsw.cppm +++ b/src/storage/definition/index_hnsw.cppm @@ -71,7 +71,7 @@ public: virtual nlohmann::json Serialize() const override; public: - static void ValidateColumnDataType(const SharedPtr &base_table_ref, const String &column_name); + static void ValidateColumnDataType(const SharedPtr &base_table_ref, const String &column_name, const Vector &index_param_list); public: const MetricType metric_type_{MetricType::kInvalid}; diff --git a/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp b/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp index d6ab47fb6a..ba1a79f987 100644 --- a/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp +++ b/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp @@ -54,6 +54,12 @@ AbstractHnsw HnswIndexInMem::InitAbstractIndex(const IndexBase *index_base, cons case EmbeddingDataType::kElemFloat: { return InitAbstractIndex(index_hnsw); } + case EmbeddingDataType::kElemUInt8: { + return InitAbstractIndex(index_hnsw); + } + case EmbeddingDataType::kElemInt8: { + return InitAbstractIndex(index_hnsw); + } default: { return nullptr; } diff --git a/src/storage/knn_index/knn_hnsw/abstract_hnsw.cppm b/src/storage/knn_index/knn_hnsw/abstract_hnsw.cppm index c650aa5417..f3a87dce22 100644 --- a/src/storage/knn_index/knn_hnsw/abstract_hnsw.cppm +++ b/src/storage/knn_index/knn_hnsw/abstract_hnsw.cppm @@ -50,6 +50,12 @@ class BlockColumnEntry; export using AbstractHnsw = std::variant, SegmentOffset> *, KnnHnsw, SegmentOffset> *, KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, + KnnHnsw, SegmentOffset> *, KnnHnsw, SegmentOffset> *, KnnHnsw, SegmentOffset> *, KnnHnsw, SegmentOffset> *, @@ -85,6 +91,9 @@ private: } } case HnswEncodeType::kLVQ: { + if constexpr (std::is_same_v || std::is_same_v) { + return nullptr; + } else { switch (index_hnsw->metric_type_) { case MetricType::kMetricL2: { using HnswIndex = KnnHnsw, SegmentOffset>; @@ -102,6 +111,7 @@ private: return nullptr; } } + } } default: { return nullptr; diff --git a/src/storage/knn_index/knn_hnsw/data_store/lvq_vec_store.cppm b/src/storage/knn_index/knn_hnsw/data_store/lvq_vec_store.cppm index fb67729367..45bc346b22 100644 --- a/src/storage/knn_index/knn_hnsw/data_store/lvq_vec_store.cppm +++ b/src/storage/knn_index/knn_hnsw/data_store/lvq_vec_store.cppm @@ -64,6 +64,7 @@ public: ~LVQQuery() { delete[] reinterpret_cast(inner_.release()); } }; using QueryType = LVQQuery; + using DistanceType = f32; private: LVQVecStoreMeta(SizeT dim) : dim_(dim), compress_data_size_(sizeof(LVQData) + sizeof(CompressType) * dim) { diff --git a/src/storage/knn_index/knn_hnsw/data_store/plain_vec_store.cppm b/src/storage/knn_index/knn_hnsw/data_store/plain_vec_store.cppm index dbd8eca4cf..8807734317 100644 --- a/src/storage/knn_index/knn_hnsw/data_store/plain_vec_store.cppm +++ b/src/storage/knn_index/knn_hnsw/data_store/plain_vec_store.cppm @@ -36,6 +36,7 @@ public: using This = PlainVecStoreMeta; using StoreType = const DataType *; using QueryType = const DataType *; + using DistanceType = f32; private: PlainVecStoreMeta(SizeT dim) : dim_(dim) {} diff --git a/src/storage/knn_index/knn_hnsw/data_store/sparse_vec_store.cppm b/src/storage/knn_index/knn_hnsw/data_store/sparse_vec_store.cppm index 9d1d8c76c2..006b0c7dc5 100644 --- a/src/storage/knn_index/knn_hnsw/data_store/sparse_vec_store.cppm +++ b/src/storage/knn_index/knn_hnsw/data_store/sparse_vec_store.cppm @@ -37,6 +37,7 @@ public: using QueryVecType = SparseVecRef; using StoreType = SparseVecRef; using QueryType = SparseVecRef; + using DistanceType = std::conditional_t, IdxType, std::conditional_t, f64, f32>>; private: SparseVecStoreMeta(SizeT max_dim) : max_dim_(max_dim) {} diff --git a/src/storage/knn_index/knn_hnsw/dist_func_cos.cppm b/src/storage/knn_index/knn_hnsw/dist_func_cos.cppm index 4bcf50a18a..2ea84c48e3 100644 --- a/src/storage/knn_index/knn_hnsw/dist_func_cos.cppm +++ b/src/storage/knn_index/knn_hnsw/dist_func_cos.cppm @@ -36,9 +36,10 @@ class PlainCosDist { public: using VecStoreMeta = PlainVecStoreMeta; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: - using SIMDFuncType = DataType (*)(const DataType *, const DataType *, SizeT); + using SIMDFuncType = f32 (*)(const DataType *, const DataType *, SizeT); SIMDFuncType SIMDFunc = nullptr; @@ -60,10 +61,14 @@ public: } else { SIMDFunc = GetSIMD_FUNCTIONS().HNSW_F32Cos_ptr_; } + } else if constexpr (std::is_same()) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8Cos_ptr_; + } else if constexpr (std::is_same()) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8Cos_ptr_; } } - DataType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { + DistanceType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { return -SIMDFunc(v1, v2, vec_store_meta.dim()); } @@ -111,6 +116,7 @@ public: using This = LVQCosDist; using VecStoreMeta = LVQVecStoreMeta>; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: using SIMDFuncType = i32 (*)(const CompressType *, const CompressType *, SizeT); diff --git a/src/storage/knn_index/knn_hnsw/dist_func_ip.cppm b/src/storage/knn_index/knn_hnsw/dist_func_ip.cppm index 5e96620551..99f7e9360a 100644 --- a/src/storage/knn_index/knn_hnsw/dist_func_ip.cppm +++ b/src/storage/knn_index/knn_hnsw/dist_func_ip.cppm @@ -34,9 +34,10 @@ class PlainIPDist { public: using VecStoreMeta = PlainVecStoreMeta; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: - using SIMDFuncType = DataType (*)(const DataType *, const DataType *, SizeT); + using SIMDFuncType = std::conditional_t, f32, i32> (*)(const DataType *, const DataType *, SizeT); SIMDFuncType SIMDFunc = nullptr; @@ -57,10 +58,30 @@ public: } else { SIMDFunc = GetSIMD_FUNCTIONS().HNSW_F32IP_ptr_; } + } else if constexpr (std::is_same()) { + if (dim % 64 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8IP_64_ptr_; + } else if (dim % 32 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8IP_32_ptr_; + } else if (dim % 16 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8IP_16_ptr_; + } else { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8IP_ptr_; + } + } else if constexpr (std::is_same()) { + if (dim % 64 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8IP_64_ptr_; + } else if (dim % 32 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8IP_32_ptr_; + } else if (dim % 16 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8IP_16_ptr_; + } else { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8IP_ptr_; + } } } - DataType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { + DistanceType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { return -SIMDFunc(v1, v2, vec_store_meta.dim()); } @@ -110,6 +131,7 @@ public: using This = LVQIPDist; using VecStoreMeta = LVQVecStoreMeta>; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: using SIMDFuncType = i32 (*)(const CompressType *, const CompressType *, SizeT); diff --git a/src/storage/knn_index/knn_hnsw/dist_func_l2.cppm b/src/storage/knn_index/knn_hnsw/dist_func_l2.cppm index 01aa4ecf6c..f4859b43e7 100644 --- a/src/storage/knn_index/knn_hnsw/dist_func_l2.cppm +++ b/src/storage/knn_index/knn_hnsw/dist_func_l2.cppm @@ -34,9 +34,10 @@ class PlainL2Dist { public: using VecStoreMeta = PlainVecStoreMeta; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: - using SIMDFuncType = DataType (*)(const DataType *, const DataType *, SizeT); + using SIMDFuncType = std::conditional_t, f32, i32> (*)(const DataType *, const DataType *, SizeT); SIMDFuncType SIMDFunc = nullptr; @@ -58,10 +59,30 @@ public: } else { SIMDFunc = GetSIMD_FUNCTIONS().HNSW_F32L2_ptr_; } + } else if constexpr (std::is_same()) { + if (dim % 64 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8L2_64_ptr_; + } else if (dim % 32 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8L2_32_ptr_; + } else if (dim % 16 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8L2_16_ptr_; + } else { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_I8L2_ptr_; + } + } else if constexpr (std::is_same()) { + if (dim % 64 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8L2_64_ptr_; + } else if (dim % 32 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8L2_32_ptr_; + } else if (dim % 16 == 0) { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8L2_16_ptr_; + } else { + SIMDFunc = GetSIMD_FUNCTIONS().HNSW_U8L2_ptr_; + } } } - DataType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { + DistanceType operator()(const StoreType &v1, const StoreType &v2, const VecStoreMeta &vec_store_meta) const { return SIMDFunc(v1, v2, vec_store_meta.dim()); } @@ -101,6 +122,7 @@ public: using This = LVQL2Dist; using VecStoreMeta = LVQVecStoreMeta>; using StoreType = typename VecStoreMeta::StoreType; + using DistanceType = typename VecStoreMeta::DistanceType; private: using SIMDFuncType = i32 (*)(const CompressType *, const CompressType *, SizeT); diff --git a/src/storage/knn_index/knn_hnsw/dist_func_sparse_ip.cppm b/src/storage/knn_index/knn_hnsw/dist_func_sparse_ip.cppm index e5267d5909..df4af4ef84 100644 --- a/src/storage/knn_index/knn_hnsw/dist_func_sparse_ip.cppm +++ b/src/storage/knn_index/knn_hnsw/dist_func_sparse_ip.cppm @@ -28,6 +28,7 @@ class SparseIPDist { public: using SparseVecRef = SparseVecRef; using VecStoreMeta = SparseVecStoreMeta; + using DistanceType = typename VecStoreMeta::DistanceType; public: SparseIPDist(SizeT dim) {} diff --git a/src/storage/knn_index/knn_hnsw/hnsw_alg.cppm b/src/storage/knn_index/knn_hnsw/hnsw_alg.cppm index ae4e0f7fb7..4c1a327248 100644 --- a/src/storage/knn_index/knn_hnsw/hnsw_alg.cppm +++ b/src/storage/knn_index/knn_hnsw/hnsw_alg.cppm @@ -48,10 +48,11 @@ public: using QueryType = typename VecStoreType::QueryType; using DataStore = DataStore; using Distance = typename VecStoreType::Distance; + using DistanceType = typename Distance::DistanceType; - using PDV = Pair; - using CMP = CompareByFirst; - using CMPReverse = CompareByFirstReverse; + using PDV = Pair; + using CMP = CompareByFirst; + using CMPReverse = CompareByFirstReverse; using DistHeap = Heap; constexpr static int prefetch_offset_ = 0; @@ -130,11 +131,11 @@ private: // return the nearest `ef_construction_` neighbors of `query` in layer `layer_idx` template Filter = NoneType> - Tuple, UniquePtr> + Tuple, UniquePtr> SearchLayer(VertexType enter_point, const StoreType &query, i32 layer_idx, SizeT result_n, const Filter &filter) const { - auto d_ptr = MakeUniqueForOverwrite(result_n); + auto d_ptr = MakeUniqueForOverwrite(result_n); auto i_ptr = MakeUniqueForOverwrite(result_n); - HeapResultHandler> result_handler(1, result_n, d_ptr.get(), i_ptr.get()); + HeapResultHandler> result_handler(1, result_n, d_ptr.get(), i_ptr.get()); result_handler.Begin(); DistHeap candidate; @@ -202,7 +203,7 @@ private: template VertexType SearchLayerNearest(VertexType enter_point, const StoreType &query, i32 layer_idx) const { VertexType cur_p = enter_point; - DataType cur_dist = distance_(query, data_store_.GetVec(cur_p), data_store_.vec_store_meta()); + auto cur_dist = distance_(query, data_store_.GetVec(cur_p), data_store_.vec_store_meta()); bool check = true; while (check) { check = false; @@ -215,7 +216,7 @@ private: const auto [neighbors_p, neighbor_size] = data_store_.GetNeighbors(cur_p, layer_idx); for (int i = neighbor_size - 1; i >= 0; --i) { VertexType n_idx = neighbors_p[i]; - DataType n_dist = distance_(query, data_store_.GetVec(n_idx), data_store_.vec_store_meta()); + auto n_dist = distance_(query, data_store_.GetVec(n_idx), data_store_.vec_store_meta()); if (n_dist < cur_dist) { cur_p = n_idx; cur_dist = n_dist; @@ -243,7 +244,7 @@ private: bool check = true; for (SizeT i = 0; i < SizeT(result_size); ++i) { VertexType r_idx = result_p[i]; - DataType cr_dist = distance_(c_data, data_store_.GetVec(r_idx), data_store_.vec_store_meta()); + auto cr_dist = distance_(c_data, data_store_.GetVec(r_idx), data_store_.vec_store_meta()); if (cr_dist < c_dist) { check = false; break; @@ -274,7 +275,7 @@ private: continue; } StoreType n_data = data_store_.GetVec(n_idx); - DataType n_dist = distance_(n_data, data_store_.GetVec(vertex_i), data_store_.vec_store_meta()); + auto n_dist = distance_(n_data, data_store_.GetVec(vertex_i), data_store_.vec_store_meta()); Vector candidates; candidates.reserve(n_neighbor_size + 1); @@ -290,7 +291,7 @@ private: LabelType GetLabel(VertexType vertex_i) const { return data_store_.GetLabel(vertex_i); } template Filter = NoneType> - Tuple, UniquePtr> KnnSearchInner(const QueryVecType &q, SizeT k, const Filter &filter) const { + Tuple, UniquePtr> KnnSearchInner(const QueryVecType &q, SizeT k, const Filter &filter) const { QueryType query = data_store_.MakeQuery(q); auto [max_layer, ep] = data_store_.GetEnterPoint(); if (ep == -1) { @@ -366,7 +367,7 @@ public: } template Filter = NoneType, bool WithLock = true> - Tuple, UniquePtr> KnnSearch(const QueryVecType &q, SizeT k, const Filter &filter) const { + Tuple, UniquePtr> KnnSearch(const QueryVecType &q, SizeT k, const Filter &filter) const { auto [result_n, d_ptr, v_ptr] = KnnSearchInner(q, k, filter); auto labels = MakeUniqueForOverwrite(result_n); for (SizeT i = 0; i < result_n; ++i) { @@ -376,15 +377,15 @@ public: } template - Tuple, UniquePtr> KnnSearch(const QueryVecType &q, SizeT k) const { + Tuple, UniquePtr> KnnSearch(const QueryVecType &q, SizeT k) const { return KnnSearch(q, k, None); } // function for test, add sort for convenience template Filter = NoneType, bool WithLock = true> - Vector> KnnSearchSorted(const QueryVecType &q, SizeT k, const Filter &filter) const { + Vector> KnnSearchSorted(const QueryVecType &q, SizeT k, const Filter &filter) const { auto [result_n, d_ptr, v_ptr] = KnnSearchInner(q, k, filter); - Vector> result(result_n); + Vector> result(result_n); for (SizeT i = 0; i < result_n; ++i) { result[i] = {d_ptr[i], GetLabel(v_ptr[i])}; } @@ -393,7 +394,7 @@ public: } // function for test - Vector> KnnSearchSorted(const QueryVecType &q, SizeT k) const { return KnnSearchSorted(q, k, None); } + Vector> KnnSearchSorted(const QueryVecType &q, SizeT k) const { return KnnSearchSorted(q, k, None); } void SetEf(SizeT ef) { ef_ = ef; } diff --git a/src/storage/knn_index/merge_knn.cppm b/src/storage/knn_index/merge_knn.cppm index 522c871288..d2fed5f71b 100644 --- a/src/storage/knn_index/merge_knn.cppm +++ b/src/storage/knn_index/merge_knn.cppm @@ -32,15 +32,15 @@ public: virtual ~MergeKnnBase() = default; }; -export template typename C> +export template typename C, typename DistType> class MergeKnn final : public MergeKnnBase { - using ResultHandler = ReservoirResultHandler>; - using DistFunc = DataType (*)(const DataType *, const DataType *, SizeT); + using ResultHandler = ReservoirResultHandler>; + using DistFunc = DistType (*)(const DataType *, const DataType *, SizeT); public: explicit MergeKnn(u64 query_count, u64 topk) : total_count_(0), query_count_(query_count), topk_(topk), idx_array_(MakeUniqueForOverwrite(topk * query_count)), - distance_array_(MakeUniqueForOverwrite(topk * query_count)) { + distance_array_(MakeUniqueForOverwrite(topk * query_count)) { result_handler_ = MakeUnique(query_count, topk, this->distance_array_.get(), this->idx_array_.get()); } @@ -53,9 +53,9 @@ public: void Search(const DataType *query, const DataType *data, u32 dim, DistFunc dist_f, u16 row_cnt, u32 segment_id, u16 block_id, Bitmask &bitmask); - void Search(const DataType *dist, const RowID *row_ids, u16 count); + void Search(const DistType *dist, const RowID *row_ids, u16 count); - void Search(SizeT query_id, const DataType *dist, const RowID *row_ids, u16 count); + void Search(SizeT query_id, const DistType *dist, const RowID *row_ids, u16 count); void Begin(); @@ -63,11 +63,11 @@ public: void EndWithoutSort(); - DataType *GetDistances() const; + DistType *GetDistances() const; RowID *GetIDs() const; - DataType *GetDistancesByIdx(u64 idx) const; + DistType *GetDistancesByIdx(u64 idx) const; RowID *GetIDsByIdx(u64 idx) const; @@ -79,14 +79,14 @@ private: u64 query_count_{}; i64 topk_{}; UniquePtr idx_array_{}; - UniquePtr distance_array_{}; + UniquePtr distance_array_{}; private: UniquePtr result_handler_{}; }; -template typename C> -void MergeKnn::Search(const DataType *query, const DataType *data, u32 dim, DistFunc dist_f, u16 row_cnt, u32 segment_id, u16 block_id) { +template typename C, typename DistType> +void MergeKnn::Search(const DataType *query, const DataType *data, u32 dim, DistFunc dist_f, u16 row_cnt, u32 segment_id, u16 block_id) { this->total_count_ += row_cnt; u32 segment_offset_start = block_id * DEFAULT_BLOCK_CAPACITY; for (u64 i = 0; i < this->query_count_; ++i) { @@ -99,8 +99,8 @@ void MergeKnn::Search(const DataType *query, const DataType *data, } } -template typename C> -void MergeKnn::Search(const DataType *query, const DataType *data, u32 dim, DistFunc dist_f, u32 segment_id, u32 segment_offset) { +template typename C, typename DistType> +void MergeKnn::Search(const DataType *query, const DataType *data, u32 dim, DistFunc dist_f, u32 segment_id, u32 segment_offset) { ++this->total_count_; for (u64 i = 0; i < this->query_count_; ++i) { const DataType *x_i = query + i * dim; @@ -109,15 +109,15 @@ void MergeKnn::Search(const DataType *query, const DataType *data, } } -template typename C> -void MergeKnn::Search(const DataType *query, - const DataType *data, - u32 dim, - DistFunc dist_f, - u16 row_cnt, - u32 segment_id, - u16 block_id, - Bitmask &bitmask) { +template typename C, typename DistType> +void MergeKnn::Search(const DataType *query, + const DataType *data, + u32 dim, + DistFunc dist_f, + u16 row_cnt, + u32 segment_id, + u16 block_id, + Bitmask &bitmask) { if (bitmask.IsAllTrue()) { Search(query, data, dim, dist_f, row_cnt, segment_id, block_id); return; @@ -138,11 +138,11 @@ void MergeKnn::Search(const DataType *query, } } -template typename C> -void MergeKnn::Search(const DataType *dist, const RowID *row_ids, u16 count) { +template typename C, typename DistType> +void MergeKnn::Search(const DistType *dist, const RowID *row_ids, u16 count) { this->total_count_ += count; for (u64 i = 0; i < this->query_count_; ++i) { - const DataType *d = dist + i * topk_; + const DistType *d = dist + i * topk_; const RowID *r = row_ids + i * topk_; for (u16 j = 0; j < count; j++) { result_handler_->AddResult(i, d[j], r[j]); @@ -150,8 +150,8 @@ void MergeKnn::Search(const DataType *dist, const RowID *row_ids, u } } -template typename C> -void MergeKnn::Search(SizeT query_id, const DataType *dist, const RowID *row_ids, u16 count) { +template typename C, typename DistType> +void MergeKnn::Search(SizeT query_id, const DistType *dist, const RowID *row_ids, u16 count) { if (query_id == 0) { this->total_count_ += count; } @@ -160,8 +160,8 @@ void MergeKnn::Search(SizeT query_id, const DataType *dist, const R } } -template typename C> -void MergeKnn::Begin() { +template typename C, typename DistType> +void MergeKnn::Begin() { if (this->begin_ || this->query_count_ == 0) { return; } @@ -169,8 +169,8 @@ void MergeKnn::Begin() { this->begin_ = true; } -template typename C> -void MergeKnn::End() { +template typename C, typename DistType> +void MergeKnn::End() { if (!this->begin_) return; @@ -179,8 +179,8 @@ void MergeKnn::End() { this->begin_ = false; } -template typename C> -void MergeKnn::EndWithoutSort() { +template typename C, typename DistType> +void MergeKnn::EndWithoutSort() { if (!this->begin_) return; @@ -189,33 +189,30 @@ void MergeKnn::EndWithoutSort() { this->begin_ = false; } -template typename C> -DataType *MergeKnn::GetDistances() const { +template typename C, typename DistType> +DistType *MergeKnn::GetDistances() const { return distance_array_.get(); } -template typename C> -RowID *MergeKnn::GetIDs() const { +template typename C, typename DistType> +RowID *MergeKnn::GetIDs() const { return idx_array_.get(); } -template typename C> -DataType *MergeKnn::GetDistancesByIdx(u64 idx) const { +template typename C, typename DistType> +DistType *MergeKnn::GetDistancesByIdx(u64 idx) const { if (idx >= this->query_count_) { UnrecoverableError("Query index exceeds the limit"); } return distance_array_.get() + idx * this->topk_; } -template typename C> -RowID *MergeKnn::GetIDsByIdx(u64 idx) const { +template typename C, typename DistType> +RowID *MergeKnn::GetIDsByIdx(u64 idx) const { if (idx >= this->query_count_) { UnrecoverableError("Query index exceeds the limit"); } return idx_array_.get() + idx * this->topk_; } -template class MergeKnn; -template class MergeKnn; - } // namespace infinity \ No newline at end of file diff --git a/src/storage/meta/entry/segment_index_entry.cpp b/src/storage/meta/entry/segment_index_entry.cpp index 1fc5d01284..f372111dbc 100644 --- a/src/storage/meta/entry/segment_index_entry.cpp +++ b/src/storage/meta/entry/segment_index_entry.cpp @@ -771,9 +771,14 @@ void SegmentIndexEntry::OptIndex(IndexBase *index_base, if constexpr (std::is_same_v) { UnrecoverableError("Invalid index type."); } else { - auto *p = std::move(*index).CompressToLVQ().release(); - delete index; - *abstract_hnsw = p; + using HnswIndexDataType = typename std::remove_pointer_t::DataType; + if constexpr (IsAnyOf) { + UnrecoverableError("Invalid index type."); + } else { + auto *p = std::move(*index).CompressToLVQ().release(); + delete index; + *abstract_hnsw = p; + } } }, *abstract_hnsw); diff --git a/src/unit_test/function/cast/bool_cast.cpp b/src/unit_test/function/cast/bool_cast.cpp index 13a6426648..90e385d5ee 100644 --- a/src/unit_test/function/cast/bool_cast.cpp +++ b/src/unit_test/function/cast/bool_cast.cpp @@ -68,7 +68,7 @@ TEST_F(BoolCastTest, bool_cast0) { { BooleanT source = true; BooleanT target; - EXPECT_THROW(TryCastBoolean::Run(source, target), UnrecoverableException); + EXPECT_THROW(TryCastBoolean::Run(source, target), RecoverableException); } // BooleanT to VarcharT // { @@ -138,6 +138,6 @@ TEST_F(BoolCastTest, bool_cast1) { { DataType source(LogicalType::kBoolean); DataType target(LogicalType::kBoolean); - EXPECT_THROW(BindBoolCast(source, target), UnrecoverableException); + EXPECT_THROW(BindBoolCast(source, target), RecoverableException); } } diff --git a/test/sql/dql/knn/embedding/test_knn_hnsw_i8.slt b/test/sql/dql/knn/embedding/test_knn_hnsw_i8.slt new file mode 100644 index 0000000000..f1f80e3dda --- /dev/null +++ b/test/sql/dql/knn/embedding/test_knn_hnsw_i8.slt @@ -0,0 +1,180 @@ +statement ok +DROP TABLE IF EXISTS test_knn_hnsw_i8; + +statement ok +CREATE TABLE test_knn_hnsw_i8(c1 INT, c2 EMBEDDING(TINYINT, 3)); + +# copy to create one block +# 1,"[2 3 4]" +# 5,"[6,7,8]" +# 9,"[10,11,12]" +statement ok +COPY test_knn_hnsw_i8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +statement ok +INSERT INTO test_knn_hnsw_i8 VALUES (11, [-3, -2, -1]), (111, [-126, -127, -128]), (1111, [125, 126, 127]); + +query I +SELECT * FROM test_knn_hnsw_i8; +---- +1 [2,3,4] +5 [6,7,8] +9 [10,11,12] +11 [-3,-2,-1] +111 [-126,-127,-128] +1111 [125,126,127] + +statement error +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'UNSIGNED TINYINT', 'l2', 10); + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'TINYINT', 'l2', 10); +---- +11 14.000000 +1 29.000000 +5 149.000000 +9 365.000000 +1111 47630.000000 +111 48389.000000 + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [6, 7, 9], 'TINYINT', 'l2', 10); +---- +5 1.000000 +9 41.000000 +1 57.000000 +11 262.000000 +1111 42246.000000 +111 54149.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [3, 2, 1], 'TINYINT', 'ip', 10); +---- +1111 754.000000 +9 64.000000 +5 40.000000 +1 16.000000 +11 -14.000000 +111 -760.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [-30, -20, -10], 'TINYINT', 'ip', 10); +---- +111 7600.000000 +11 140.000000 +1 -160.000000 +5 -400.000000 +9 -640.000000 +1111 -7540.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [-30, -20, -10], 'TINYINT', 'cosine', 10); +---- +11 1.000000 +111 0.923371 +1 -0.794067 +5 -0.875796 +9 -0.895302 +1111 -0.923351 + +statement ok +COPY test_knn_hnsw_i8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'TINYINT', 'l2', 10); +---- +11 14.000000 +1 29.000000 +1 29.000000 +5 149.000000 +5 149.000000 +9 365.000000 +9 365.000000 +1111 47630.000000 +111 48389.000000 + +# not allow lvq for i8 +statement error +CREATE INDEX idx1 ON test_knn_hnsw_i8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = l2, encode = "lvq"); + +# create hnsw index on existing 2 segments +statement ok +CREATE INDEX idx1 ON test_knn_hnsw_i8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = l2); + +# select with 2 index segment +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'TINYINT', 'l2', 10) WITH (ef = 4); +---- +11 14.000000 +1 29.000000 +1 29.000000 +5 149.000000 +5 149.000000 +9 365.000000 +9 365.000000 +1111 47630.000000 +111 48389.000000 + +statement ok +DROP INDEX idx1 ON test_knn_hnsw_i8; + +statement ok +CREATE INDEX idx2 ON test_knn_hnsw_i8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = ip); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [-30, -20, -10], 'TINYINT', 'ip', 10) WITH (ef = 4); +---- +111 7600.000000 +11 140.000000 +1 -160.000000 +1 -160.000000 +5 -400.000000 +5 -400.000000 +9 -640.000000 +9 -640.000000 +1111 -7540.000000 + +statement ok +DROP INDEX idx2 ON test_knn_hnsw_i8; + +statement ok +CREATE INDEX idx3 ON test_knn_hnsw_i8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = cos); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [-30, -20, -10], 'TINYINT', 'cosine', 10); +---- +11 1.000000 +111 0.923371 +1 -0.794067 +1 -0.794067 +5 -0.875796 +5 -0.875796 +9 -0.895302 +9 -0.895302 +1111 -0.923351 + +# copy to create another new block with no index +statement ok +COPY test_knn_hnsw_i8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [-30, -20, -10], 'TINYINT', 'cosine', 20); +---- +11 1.000000 +111 0.923371 +1 -0.794067 +1 -0.794067 +1 -0.794067 +5 -0.875796 +5 -0.875796 +5 -0.875796 +9 -0.895302 +9 -0.895302 +9 -0.895302 +1111 -0.923351 + +statement error +SELECT c1, DISTANCE() FROM test_knn_hnsw_i8 SEARCH MATCH VECTOR (c2, [1, 1, 1], 'UNSIGNED TINYINT', 'cosine', 10); + +statement ok +DROP TABLE test_knn_hnsw_i8; diff --git a/test/sql/dql/knn/embedding/test_knn_hnsw_u8.slt b/test/sql/dql/knn/embedding/test_knn_hnsw_u8.slt new file mode 100644 index 0000000000..71a997f3e6 --- /dev/null +++ b/test/sql/dql/knn/embedding/test_knn_hnsw_u8.slt @@ -0,0 +1,165 @@ +statement ok +DROP TABLE IF EXISTS test_knn_hnsw_u8; + +statement ok +CREATE TABLE test_knn_hnsw_u8(c1 INT, c2 EMBEDDING(UNSIGNED TINYINT, 3)); + +# copy to create one block +# 1,"[2 3 4]" +# 5,"[6,7,8]" +# 9,"[10,11,12]" +statement ok +COPY test_knn_hnsw_u8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +query I +SELECT * FROM test_knn_hnsw_u8; +---- +1 [2,3,4] +5 [6,7,8] +9 [10,11,12] + +statement ok +INSERT INTO test_knn_hnsw_u8 VALUES (11, [127, 128, 255]); + +query I +SELECT * FROM test_knn_hnsw_u8; +---- +1 [2,3,4] +5 [6,7,8] +9 [10,11,12] +11 [127,128,255] + +statement error +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [1, 1, 1], 'TINYINT', 'cosine', 10); + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'UNSIGNED TINYINT', 'l2', 10); +---- +1 29.000000 +5 149.000000 +9 365.000000 +11 97538.000000 + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [6, 7, 9], 'UNSIGNED TINYINT', 'l2', 10); +---- +5 1.000000 +9 41.000000 +1 57.000000 +11 89798.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [3, 2, 1], 'UNSIGNED TINYINT', 'ip', 10); +---- +11 892.000000 +9 64.000000 +5 40.000000 +1 16.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [30, 20, 10], 'UNSIGNED TINYINT', 'ip', 10); +---- +11 8920.000000 +9 640.000000 +5 400.000000 +1 160.000000 + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [30, 20, 10], 'UNSIGNED TINYINT', 'cosine', 10); +---- +9 0.895302 +5 0.875796 +1 0.794067 +11 0.763333 + +statement ok +COPY test_knn_hnsw_u8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'UNSIGNED TINYINT', 'l2', 10); +---- +1 29.000000 +1 29.000000 +5 149.000000 +5 149.000000 +9 365.000000 +9 365.000000 +11 97538.000000 + +# not allow lvq for u8 +statement error +CREATE INDEX idx1 ON test_knn_hnsw_u8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = l2, encode = "lvq"); + +# create hnsw index on existing 2 segments +statement ok +CREATE INDEX idx1 ON test_knn_hnsw_u8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = l2); + +# select with 2 index segment +query I +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [0, 0, 0], 'UNSIGNED TINYINT', 'l2', 10) WITH (ef = 4); +---- +1 29.000000 +1 29.000000 +5 149.000000 +5 149.000000 +9 365.000000 +9 365.000000 +11 97538.000000 + +statement ok +DROP INDEX idx1 ON test_knn_hnsw_u8; + +statement ok +CREATE INDEX idx2 ON test_knn_hnsw_u8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = ip); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [30, 20, 10], 'UNSIGNED TINYINT', 'ip', 10) WITH (ef = 4); +---- +11 8920.000000 +9 640.000000 +9 640.000000 +5 400.000000 +5 400.000000 +1 160.000000 +1 160.000000 + +statement ok +DROP INDEX idx2 ON test_knn_hnsw_u8; + +statement ok +CREATE INDEX idx3 ON test_knn_hnsw_u8 (c2) USING Hnsw WITH (M = 16, ef_construction = 200, metric = cos); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [30, 20, 10], 'UNSIGNED TINYINT', 'cosine', 10); +---- +9 0.895302 +9 0.895302 +5 0.875796 +5 0.875796 +1 0.794067 +1 0.794067 +11 0.763333 + +# copy to create another new block with no index +statement ok +COPY test_knn_hnsw_u8 FROM '/var/infinity/test_data/embedding_int_dim3.csv' WITH (DELIMITER ',', FORMAT CSV); + +query I +SELECT c1, SIMILARITY() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [30, 20, 10], 'UNSIGNED TINYINT', 'cosine', 10); +---- +9 0.895302 +9 0.895302 +9 0.895302 +5 0.875796 +5 0.875796 +5 0.875796 +1 0.794067 +1 0.794067 +1 0.794067 +11 0.763333 + +statement error +SELECT c1, DISTANCE() FROM test_knn_hnsw_u8 SEARCH MATCH VECTOR (c2, [1, 1, 1], 'TINYINT', 'cosine', 10); + +statement ok +DROP TABLE test_knn_hnsw_u8; diff --git a/thrift/infinity.thrift b/thrift/infinity.thrift index 22034ae389..7d6a925375 100644 --- a/thrift/infinity.thrift +++ b/thrift/infinity.thrift @@ -13,6 +13,8 @@ HugeInt, Decimal, Float, Double, +Float16, +BFloat16, Varchar, Embedding, Tensor, @@ -52,6 +54,7 @@ struct VarcharType {} enum ElementType { ElementBit, +ElementUInt8, ElementInt8, ElementInt16, ElementInt32, @@ -136,12 +139,13 @@ Hamming, union EmbeddingData { 1: list bool_array_value, -2: list i8_array_value, -3: list i16_array_value, -4: list i32_array_value, -5: list i64_array_value, -6: list f32_array_value, -7: list f64_array_value, +2: list u8_array_value, +3: list i8_array_value, +4: list i16_array_value, +5: list i32_array_value, +6: list i64_array_value, +7: list f32_array_value, +8: list f64_array_value, } struct InitParameter { @@ -263,6 +267,8 @@ ColumnInt32, ColumnInt64, ColumnFloat32, ColumnFloat64, +ColumnFloat16, +ColumnBFloat16, ColumnVarchar, ColumnEmbedding, ColumnTensor, @@ -389,7 +395,6 @@ struct GetTableRequest { enum IndexType { IVFFlat, -HnswLVQ, Hnsw, FullText, BMP,