Files
impala/tests/query_test/test_insert.py
Lenni Kuff f8953ee8e6 Run end-to-end tests before planner tests
This is needed because the planner test expected results depend on some tables
being populated by running tests that do inserts (TPC-H, etc).
2014-01-08 10:46:58 -08:00

45 lines
1.5 KiB
Python

#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala insert tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestInsertQueries(ImpalaTestSuite):
@classmethod
def get_dataset(self):
return 'functional-query'
@classmethod
def add_test_dimensions(cls):
super(TestInsertQueries, cls).add_test_dimensions()
# Insert is currently only supported for text and trevni
cls.TestMatrix.add_constraint(lambda v:\
v.get_value('table_format').file_format == 'text' or\
v.get_value('table_format').file_format == 'trevni')
cls.TestMatrix.add_constraint(lambda v:\
v.get_value('table_format').compression_codec == 'none')
@pytest.mark.execute_serially
def test_insert(self, vector):
self.run_test_case('QueryTest/insert', vector)
@pytest.mark.execute_serially
def test_insert_overwrite(self, vector):
self.run_test_case('QueryTest/insert_overwrite', vector)
# Disabled until IMP-577 is fixed (NULL conversion to boolean)
@pytest.mark.execute_serially
@pytest.mark.xfail(run=False)
def test_insert_null(self, vector):
# TODO: Disable this test on Trevni due to IMP-613
if vector.get_value('table_format').file_format == 'trevni':
return
self.run_test_case('QueryTest/insert_null', vector)
@pytest.mark.execute_serially
def test_insert_overflow(self, vector):
self.run_test_case('QueryTest/overflow', vector)