mirror of
https://github.com/apache/impala.git
synced 2026-01-01 00:00:20 -05:00
41 lines
1.3 KiB
Python
41 lines
1.3 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_workload(self):
|
|
return 'functional-query'
|
|
|
|
@classmethod
|
|
def add_test_dimensions(cls):
|
|
super(TestInsertQueries, cls).add_test_dimensions()
|
|
# Insert is currently only supported for text
|
|
cls.TestMatrix.add_constraint(lambda v:\
|
|
v.get_value('table_format').file_format == 'text')
|
|
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, reason="IMP-613")
|
|
def test_insert_null(self, vector):
|
|
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)
|