From c91a1feff55aab7dc6c87fd2b38b8a27d9516dbb Mon Sep 17 00:00:00 2001 From: Jiashen Cao Date: Mon, 2 Oct 2023 11:07:40 -0400 Subject: [PATCH] feat: create index from projection (#1244) The first step to do automatic index updates on insertions. Replace the old version of creating an index, which directly reads data from the storage engine. It now reads data from the children's plans: SeqScan and Storage. --- evadb/binder/create_index_statement_binder.py | 81 +++++++++++++++++++ evadb/binder/statement_binder.py | 12 +++ evadb/executor/create_index_executor.py | 26 ++++++ evadb/parser/create_index_statement.py | 27 +++++++ .../parser/lark_visitor/_create_statements.py | 30 +++++++ .../test_statement_to_opr_converter.py | 21 +++++ test/unit_tests/parser/test_parser.py | 10 +++ 7 files changed, 207 insertions(+) diff --git a/evadb/binder/create_index_statement_binder.py b/evadb/binder/create_index_statement_binder.py index f85c42011b..aadc21619f 100644 --- a/evadb/binder/create_index_statement_binder.py +++ b/evadb/binder/create_index_statement_binder.py @@ -16,8 +16,11 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.binder.binder_utils import BinderError, create_row_num_tv_expr from evadb.binder.statement_binder import StatementBinder from evadb.catalog.catalog_type import NdArrayType, VectorStoreType @@ -25,6 +28,7 @@ ======= <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= <<<<<<< HEAD @@ -33,6 +37,11 @@ <<<<<<< HEAD ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +======= +<<<<<<< HEAD +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.binder.binder_utils import BinderError from evadb.binder.statement_binder import StatementBinder from evadb.catalog.catalog_type import NdArrayType, VectorStoreType @@ -81,13 +90,26 @@ ======= ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 8da6decc (Bump v0.3.4+ dev) >>>>>>> 22e78346 (Bump v0.3.4+ dev) ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +======= +>>>>>>> eva-master +======= +from evadb.binder.binder_utils import BinderError, create_row_num_tv_expr +from evadb.binder.statement_binder import StatementBinder +from evadb.catalog.catalog_type import NdArrayType, VectorStoreType +from evadb.expression.function_expression import FunctionExpression +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.parser.create_index_statement import CreateIndexStatement from evadb.third_party.databases.interface import get_database_handler @@ -98,11 +120,14 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 8da6decc (Bump v0.3.4+ dev) ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= <<<<<<< HEAD if node.function: binder.bind(node.function) @@ -110,12 +135,16 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= >>>>>>> eva-master ======= >>>>>>> 277161e7 (feat: create index from projection (#1244)) >>>>>>> a6ef863c (feat: create index from projection (#1244)) +<<<<<<< HEAD ======= >>>>>>> eva-master ======= @@ -127,6 +156,8 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) # Bind all projection expressions. func_project_expr = None @@ -141,6 +172,7 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) <<<<<<< HEAD @@ -154,8 +186,12 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): ======= ======= ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 8da6decc (Bump v0.3.4+ dev) >>>>>>> 22e78346 (Bump v0.3.4+ dev) ======= @@ -163,6 +199,13 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +======= +>>>>>>> eva-master +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) # TODO: create index currently only supports single numpy column. assert len(node.col_list) == 1, "Index cannot be created on more than 1 column" @@ -198,8 +241,11 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) # Index can be only created on single column. assert ( len(node.col_list) == 1 @@ -211,6 +257,7 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): ======= <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= <<<<<<< HEAD @@ -219,6 +266,11 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +======= +<<<<<<< HEAD +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) if not node.function: # Feature table type needs to be float32 numpy array. assert ( @@ -283,13 +335,30 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): ======= ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 8da6decc (Bump v0.3.4+ dev) >>>>>>> 22e78346 (Bump v0.3.4+ dev) ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +======= +>>>>>>> eva-master +======= + # Index can be only created on single column. + assert ( + len(node.col_list) == 1 + ), f"Index can be only created on one column, but instead {len(node.col_list)} are provided" + col_def = node.col_list[0] + + if func_project_expr is None: + # Feature table type needs to be float32 numpy array. +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) table_ref_obj = node.table_ref.table.table_obj col_list = [col for col in table_ref_obj.columns if col.name == col_def.name] assert ( @@ -311,10 +380,13 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 8da6decc (Bump v0.3.4+ dev) ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) func_project_expr.name ======= <<<<<<< HEAD @@ -325,15 +397,21 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= ======= >>>>>>> 22e78346 (Bump v0.3.4+ dev) +======= +>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> eva-master ======= func_project_expr.name >>>>>>> 277161e7 (feat: create index from projection (#1244)) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= ======= @@ -343,6 +421,9 @@ def bind_create_index(binder: StatementBinder, node: CreateIndexStatement): ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ) for output in function_obj.outputs: assert ( diff --git a/evadb/binder/statement_binder.py b/evadb/binder/statement_binder.py index dfe6ea3fe3..ac419d37e2 100644 --- a/evadb/binder/statement_binder.py +++ b/evadb/binder/statement_binder.py @@ -31,8 +31,11 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 8da6decc (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.catalog.catalog_type import ColumnType, TableType <<<<<<< HEAD from evadb.catalog.catalog_utils import is_document_table @@ -50,15 +53,21 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= ======= >>>>>>> 22e78346 (Bump v0.3.4+ dev) +======= +>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> eva-master ======= from evadb.catalog.catalog_type import ColumnType, TableType >>>>>>> 277161e7 (feat: create index from projection (#1244)) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= ======= @@ -68,6 +77,9 @@ ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.catalog.catalog_utils import get_metadata_properties, is_document_table from evadb.catalog.sql_config import RESTRICTED_COL_NAMES from evadb.configuration.constants import EvaDB_INSTALLATION_DIR diff --git a/evadb/executor/create_index_executor.py b/evadb/executor/create_index_executor.py index c98eb19986..bd0ed11f26 100644 --- a/evadb/executor/create_index_executor.py +++ b/evadb/executor/create_index_executor.py @@ -28,11 +28,14 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 8da6decc (Bump v0.3.4+ dev) ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= <<<<<<< HEAD from evadb.storage.storage_engine import StorageEngine ======= @@ -40,12 +43,16 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= >>>>>>> eva-master ======= >>>>>>> 277161e7 (feat: create index from projection (#1244)) >>>>>>> a6ef863c (feat: create index from projection (#1244)) +<<<<<<< HEAD ======= >>>>>>> eva-master ======= @@ -57,6 +64,8 @@ ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) from evadb.third_party.databases.interface import get_database_handler from evadb.third_party.vector_stores.types import FeaturePayload from evadb.third_party.vector_stores.utils import VectorStoreFactory @@ -486,8 +495,16 @@ def _create_evadb_index(self): # Add features to index. # TODO: batch size is hardcoded for now. input_dim = -1 +<<<<<<< HEAD >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> c5f43c65 (Bump v0.3.4+ dev) +======= +======= +<<<<<<< HEAD +<<<<<<< HEAD +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) for input_batch in self.children[0].exec(): input_batch.drop_column_alias() feat = input_batch.column_as_numpy_array(feat_col_name) @@ -505,10 +522,15 @@ def _create_evadb_index(self): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= ======= >>>>>>> 22e78346 (Bump v0.3.4+ dev) +======= +>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> eva-master ======= for input_batch in self.children[0].exec(): @@ -516,6 +538,7 @@ def _create_evadb_index(self): feat = input_batch.column_as_numpy_array(feat_col_name) >>>>>>> 277161e7 (feat: create index from projection (#1244)) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= ======= @@ -525,6 +548,9 @@ def _create_evadb_index(self): ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) row_num = input_batch.column_as_numpy_array(ROW_NUM_COLUMN) for i in range(len(input_batch)): diff --git a/evadb/parser/create_index_statement.py b/evadb/parser/create_index_statement.py index bafbaad77e..34c187dfa4 100644 --- a/evadb/parser/create_index_statement.py +++ b/evadb/parser/create_index_statement.py @@ -197,6 +197,12 @@ def __str__(self) -> str: def __str__(self) -> str: <<<<<<< HEAD +<<<<<<< HEAD +======= +<<<<<<< HEAD +======= +<<<<<<< HEAD +>>>>>>> a6ef863c (feat: create index from projection (#1244)) print_str = "CREATE INDEX {} {} ON {} ({}{}) ".format( >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) @@ -287,12 +293,14 @@ def __str__(self) -> str: ======= ======= ======= +<<<<<<< HEAD def __str__(self) -> str: ======= ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= +<<<<<<< HEAD def __str__(self) -> str: >>>>>>> c5f43c65 (Bump v0.3.4+ dev) @@ -301,6 +309,12 @@ def __str__(self) -> str: ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> eva-master +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) function_expr = None for project_expr in self._project_expr_list: if isinstance(project_expr, FunctionExpression): @@ -317,8 +331,10 @@ def __str__(self) -> str: else: print_str += f" ({function_expr.name}({self.col_list[0].name}))" print_str += f" USING {self._vector_store_type};" +<<<<<<< HEAD >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 7cac771f (Bump v0.3.4+ dev) >>>>>>> 2170a7a9 (Bump v0.3.4+ dev) ======= @@ -326,6 +342,17 @@ def __str__(self) -> str: >>>>>>> b87af508 (feat: sync master staging (#1050)) ======= >>>>>>> c5f43c65 (Bump v0.3.4+ dev) +======= +======= +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +>>>>>>> eva-master +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) return print_str @property diff --git a/evadb/parser/lark_visitor/_create_statements.py b/evadb/parser/lark_visitor/_create_statements.py index eb6745e406..3110e33504 100644 --- a/evadb/parser/lark_visitor/_create_statements.py +++ b/evadb/parser/lark_visitor/_create_statements.py @@ -376,6 +376,11 @@ def create_index(self, tree): return CreateIndexStatement( <<<<<<< HEAD <<<<<<< HEAD +======= +<<<<<<< HEAD +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD @@ -419,7 +424,9 @@ def create_index(self, tree): ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) ======= +<<<<<<< HEAD >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 7cac771f (Bump v0.3.4+ dev) >>>>>>> 2170a7a9 (Bump v0.3.4+ dev) ======= @@ -428,6 +435,16 @@ def create_index(self, tree): ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> c5f43c65 (Bump v0.3.4+ dev) +======= +======= + index_name, table_ref, col_list, vector_store_type, function +>>>>>>> 2dacff69 (feat: sync master staging (#1050)) +======= +>>>>>>> eva-master +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) index_name, if_not_exists, table_ref, @@ -440,8 +457,11 @@ def create_index(self, tree): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c5f43c65 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ======= index_name, table_ref, col_list, vector_store_type, function >>>>>>> 2dacff69 (feat: sync master staging (#1050)) @@ -450,6 +470,9 @@ def create_index(self, tree): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ======= ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) @@ -480,11 +503,15 @@ def create_index(self, tree): >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ======= >>>>>>> eva-master ======= >>>>>>> 277161e7 (feat: create index from projection (#1244)) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> a6ef863c (feat: create index from projection (#1244)) ======= ======= @@ -546,6 +573,9 @@ def create_index(self, tree): >>>>>>> 03a6c555 (feat: sync master staging (#1050)) ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ) def vector_store_type(self, tree): diff --git a/test/unit_tests/optimizer/test_statement_to_opr_converter.py b/test/unit_tests/optimizer/test_statement_to_opr_converter.py index 7bb1cc4427..4a674b9305 100644 --- a/test/unit_tests/optimizer/test_statement_to_opr_converter.py +++ b/test/unit_tests/optimizer/test_statement_to_opr_converter.py @@ -478,23 +478,30 @@ def test_check_plan_equality(self): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 8da6decc (Bump v0.3.4+ dev) ======= >>>>>>> ae08f806 (Bump v0.3.4+ dev) ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= <<<<<<< HEAD MagicMock(), MagicMock(), MagicMock(), MagicMock(), MagicMock(), MagicMock() ======= <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) ======= >>>>>>> eva-master ======= >>>>>>> 277161e7 (feat: create index from projection (#1244)) >>>>>>> a6ef863c (feat: create index from projection (#1244)) +<<<<<<< HEAD ======= >>>>>>> eva-master ======= @@ -506,6 +513,8 @@ def test_check_plan_equality(self): ======= >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) MagicMock(), MagicMock(), MagicMock(), @@ -517,6 +526,7 @@ def test_check_plan_equality(self): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) <<<<<<< HEAD @@ -530,8 +540,12 @@ def test_check_plan_equality(self): ======= ======= ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) +<<<<<<< HEAD >>>>>>> 8da6decc (Bump v0.3.4+ dev) >>>>>>> 22e78346 (Bump v0.3.4+ dev) ======= @@ -539,6 +553,13 @@ def test_check_plan_equality(self): >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) >>>>>>> ae08f806 (Bump v0.3.4+ dev) +======= +======= +>>>>>>> eva-master +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) ) delete_plan = LogicalDelete(MagicMock()) insert_plan = LogicalInsert( diff --git a/test/unit_tests/parser/test_parser.py b/test/unit_tests/parser/test_parser.py index 3e6f078744..7c918fdb96 100644 --- a/test/unit_tests/parser/test_parser.py +++ b/test/unit_tests/parser/test_parser.py @@ -171,6 +171,7 @@ def test_create_index_statement(self): VectorStoreType.FAISS, [TupleValueExpression(name="featCol")], ) +<<<<<<< HEAD create_index_query = ( "CREATE INDEX IF NOT EXISTS testindex ON MyVideo (featCol) USING FAISS;" ) @@ -183,6 +184,7 @@ def test_create_index_statement(self): <<<<<<< HEAD # create if_not_exists +<<<<<<< HEAD expected_stmt = CreateIndexStatement( "testindex", True, @@ -193,6 +195,10 @@ def test_create_index_statement(self): VectorStoreType.FAISS, [TupleValueExpression(name="featCol")], ) +======= +======= +>>>>>>> 277161e7 (feat: create index from projection (#1244)) +>>>>>>> a6ef863c (feat: create index from projection (#1244)) create_index_query = ( "CREATE INDEX IF NOT EXISTS testindex ON MyVideo (featCol) USING FAISS;" ) @@ -201,6 +207,7 @@ def test_create_index_statement(self): expected_stmt._if_not_exists = True self.assertEqual(actual_stmt, expected_stmt) self.assertEqual(actual_stmt.index_def, create_index_query) +<<<<<<< HEAD >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) >>>>>>> c5f43c65 (Bump v0.3.4+ dev) @@ -225,6 +232,7 @@ def test_create_index_statement(self): expected_stmt._if_not_exists = True self.assertEqual(actual_stmt, expected_stmt) self.assertEqual(actual_stmt.index_def, create_index_query) +<<<<<<< HEAD >>>>>>> 6d6a14c8 (Bump v0.3.4+ dev) <<<<<<< HEAD @@ -331,6 +339,8 @@ def test_create_index_statement(self): self.assertEqual(actual_stmt, expected_stmt) self.assertEqual(actual_stmt.index_def, create_index_query) ======= +>>>>>>> a747c7e3 (feat: create index from projection (#1244)) +======= >>>>>>> a6ef863c (feat: create index from projection (#1244)) =======