code: def test_should_do_vector_index_scan(self):
      ###########################################
      # Test case runs on feature vector table. #
      ###########################################
  
      # Execution without index scan.
      select_query = """SELECT feature_col FROM testSimilarityFeatureTable
                              ORDER BY Similarity(DummyFeatureExtractor(Open("{}")), feature_col)
                              LIMIT 3;""".format(
          self.img_path
      )
      expected_batch = execute_query_fetch_all(self.evadb, select_query)
  
      # Execution with index scan.
      create_index_query = """CREATE INDEX testFaissIndexScanRewrite1
                                      ON testSimilarityFeatureTable (feature_col)
                                      USING FAISS;"""
      execute_query_fetch_all(self.evadb, create_index_query)
      select_query = """SELECT feature_col FROM testSimilarityFeatureTable
                              ORDER BY Similarity(DummyFeatureExtractor(Open("{}")), feature_col)
                              LIMIT 3;""".format(
          self.img_path
      )
      explain_query = """EXPLAIN {}""".format(select_query)
      explain_batch = execute_query_fetch_all(self.evadb, explain_query)
      self.assertTrue("VectorIndexScan" in explain_batch.frames[0][0])
      actual_batch = execute_query_fetch_all(self.evadb, select_query)
  
      self.assertEqual(len(actual_batch), 3)
      for i in range(3):
          self.assertTrue(
              np.array_equal(
                  expected_batch.frames[
                      "testsimilarityfeaturetable.feature_col"
                  ].to_numpy()[i],
                  actual_batch.frames[
                      "testsimilarityfeaturetable.feature_col"
                  ].to_numpy()[i],
              )
          )
  
      ###############################################
      # Test case runs with Function on raw input table. #
      ###############################################
  
      # Execution without index scan.
      select_query = """SELECT data_col FROM testSimilarityTable
                              ORDER BY Similarity(DummyFeatureExtractor(Open("{}")), DummyFeatureExtractor(data_col))
                              LIMIT 3;""".format(
          self.img_path
      )
      expected_batch = execute_query_fetch_all(self.evadb, select_query)
  
      # Execution with index scan.
      create_index_query = """CREATE INDEX testFaissIndexScanRewrite2
                                      ON testSimilarityTable (DummyFeatureExtractor(data_col))
                                      USING FAISS;"""
      execute_query_fetch_all(self.evadb, create_index_query)
      select_query = """SELECT data_col FROM testSimilarityTable
                              ORDER BY Similarity(DummyFeatureExtractor(Open("{}")), DummyFeatureExtractor(data_col))
                              LIMIT 3;""".format(
          self.img_path
      )
      explain_query = """EXPLAIN {}""".format(select_query)
      explain_batch = execute_query_fetch_all(self.evadb, explain_query)
      self.assertTrue("VectorIndexScan" in explain_batch.frames[0][0])
      actual_batch = execute_query_fetch_all(self.evadb, select_query)
  
      self.assertEqual(len(actual_batch), 3)
      for i in range(3):
          self.assertTrue(
              np.array_equal(
                  expected_batch.frames[
                      "testsimilaritytable.data_col"
                  ].to_numpy()[i],
                  actual_batch.frames[
                      "testsimilaritytable.data_col"
                  ].to_numpy()[i],
              )
          )
  
      # Cleanup
      drop_query = "DROP INDEX testFaissIndexScanRewrite1"
      execute_query_fetch_all(self.evadb, drop_query)
      drop_query = "DROP INDEX testFaissIndexScanRewrite2"
      execute_query_fetch_all(self.evadb, drop_query)
  
imports: import os
  import time
  import unittest
  from test.markers import chromadb_skip_marker, milvus_skip_marker, pinecone_skip_marker, qdrant_skip_marker, weaviate_skip_marker
  from test.util import create_sample_image, get_evadb_for_testing, load_functions_for_testing, shutdown_ray
  import numpy
  import pandas
  import pytest
  from evadb.models.storage.batch import Batch
  from evadb.server.command_handler import execute_query_fetch_all
  from evadb.storage.storage_engine import StorageEngine
  from evadb.utils.generic_utils import try_to_import_cv2
label_desc: Use image node_id 4 for calling the SimilarityTests obj's underlying member method code with example usage: obj.test_should_do_vector_index_scan() without return types