Skip to content

Commit

Permalink
ray fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav274 committed Apr 6, 2023
1 parent b9f2b7e commit 59258a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
18 changes: 2 additions & 16 deletions test/integration_tests/test_explain_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
from test.util import (
create_sample_video,
create_table,
file_remove,
load_udfs_for_testing,
)
from test.util import create_sample_video, file_remove, load_udfs_for_testing

import pytest

Expand All @@ -45,27 +40,18 @@ def setUpClass(cls):
load_query = f"LOAD VIDEO '{video_file_path}' INTO MyVideo;"
execute_query_fetch_all(load_query)
load_udfs_for_testing(mode="minimal")
cls.table1 = create_table("table1", 100, 3)
cls.table2 = create_table("table2", 500, 3)
cls.table3 = create_table("table3", 1000, 3)

@classmethod
def tearDownClass(cls):
file_remove("dummy.avi")
drop_query = """DROP TABLE table1;"""
execute_query_fetch_all(drop_query)
drop_query = """DROP TABLE table2;"""
execute_query_fetch_all(drop_query)
drop_query = """DROP TABLE table3;"""
execute_query_fetch_all(drop_query)
execute_query_fetch_all("DROP TABLE IF EXISTS MyVideo;")

def test_explain_simple_select(self):
ray_enabled = ConfigurationManager().get_value("experimental", "ray")
select_query = "EXPLAIN SELECT id, data FROM MyVideo"
batch = execute_query_fetch_all(select_query)
expected_output = (
"""|__ ProjectPlan\n |__ SeqScanPlan\n |__ ExchangePlan\n |__ StoragePlan\n"""
"""|__ ExchangePlan\n |__ ProjectPlan\n |__ SeqScanPlan\n |__ ExchangePlan\n |__ StoragePlan\n"""
if ray_enabled
else """|__ ProjectPlan\n |__ SeqScanPlan\n |__ StoragePlan\n"""
)
Expand Down
1 change: 1 addition & 0 deletions test/optimizer/test_optimizer_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def test_nested_implementation(self):
ProjectPlan,
PredicatePlan,
SeqScanPlan,
ExchangePlan,
ProjectPlan,
SeqScanPlan,
]
Expand Down

0 comments on commit 59258a2

Please sign in to comment.