use of io.trino.tempto.query.QueryResult in project trino by trinodb.
the class TestSelect method testSelectWithFilterOnPartitioningKey.
@Test(groups = { CASSANDRA, PROFILE_SPECIFIC_TESTS })
public void testSelectWithFilterOnPartitioningKey() {
String sql = format("SELECT n_nationkey FROM %s.%s.%s WHERE n_nationkey > 23", CONNECTOR_NAME, KEY_SPACE, CASSANDRA_NATION.getName());
QueryResult queryResult = onTrino().executeQuery(sql);
assertThat(queryResult).containsOnly(row(24));
}
use of io.trino.tempto.query.QueryResult in project trino by trinodb.
the class TestSelect method testSelectWithMorePartitioningKeysThanLimitNonPK.
@Test(groups = { CASSANDRA, PROFILE_SPECIFIC_TESTS })
public void testSelectWithMorePartitioningKeysThanLimitNonPK() {
String sql = format("SELECT s_suppkey FROM %s.%s.%s WHERE s_name = 'Supplier#000000010'", CONNECTOR_NAME, KEY_SPACE, CASSANDRA_SUPPLIER.getName());
QueryResult queryResult = onTrino().executeQuery(sql);
assertThat(queryResult).containsOnly(row(10));
}
use of io.trino.tempto.query.QueryResult in project trino by trinodb.
the class TestSelect method testSelectNation.
@Test(groups = { CASSANDRA, PROFILE_SPECIFIC_TESTS })
public void testSelectNation() {
String sql = format("SELECT n_nationkey, n_name, n_regionkey, n_comment FROM %s.%s.%s", CONNECTOR_NAME, KEY_SPACE, CASSANDRA_NATION.getName());
QueryResult queryResult = onTrino().executeQuery(sql);
assertThat(queryResult).matches(PRESTO_NATION_RESULT);
}
use of io.trino.tempto.query.QueryResult in project trino by trinodb.
the class TestSelectMultiColumnKey method testSelectWithMixedFilterOnPrimaryAndClusteringKeys.
@Test(groups = { CASSANDRA, PROFILE_SPECIFIC_TESTS })
public void testSelectWithMixedFilterOnPrimaryAndClusteringKeys() {
String sql = format("SELECT value FROM %s.%s.%s WHERE user_id = 'Alice' and key < 'b' and updated_at >= TIMESTAMP '2015-01-01 01:01:01Z'", CONNECTOR_NAME, KEY_SPACE, CASSANDRA_MULTI_COLUMN_KEY.getName());
QueryResult queryResult = onTrino().executeQuery(sql);
assertThat(queryResult).containsOnly(row("Test value 1"));
}
use of io.trino.tempto.query.QueryResult in project trino by trinodb.
the class TestSelectMultiColumnKey method testSelectWithFilterOnPrefixOfClusteringKey.
@Test(groups = { CASSANDRA, PROFILE_SPECIFIC_TESTS })
public void testSelectWithFilterOnPrefixOfClusteringKey() {
String sql = format("SELECT value FROM %s.%s.%s WHERE user_id = 'Bob' and key = 'b1'", CONNECTOR_NAME, KEY_SPACE, CASSANDRA_MULTI_COLUMN_KEY.getName());
QueryResult queryResult = onTrino().executeQuery(sql);
assertThat(queryResult).containsOnly(row("Test value 2"));
}
Aggregations