use of com.facebook.presto.cassandra.CassandraColumnHandle in project presto by prestodb.
the class TestCassandraClusteringPredicatesExtractor method setUp.
@BeforeTest
void setUp() throws Exception {
col1 = new CassandraColumnHandle("cassandra", "partitionKey1", 1, CassandraType.BIGINT, null, true, false, false, false);
col2 = new CassandraColumnHandle("cassandra", "clusteringKey1", 2, CassandraType.BIGINT, null, false, true, false, false);
col3 = new CassandraColumnHandle("cassandra", "clusteringKey2", 3, CassandraType.BIGINT, null, false, true, false, false);
col4 = new CassandraColumnHandle("cassandra", "clusteringKe3", 4, CassandraType.BIGINT, null, false, true, false, false);
cassandraTable = new CassandraTable(new CassandraTableHandle("cassandra", "test", "records"), ImmutableList.of(col1, col2, col3, col4));
}
use of com.facebook.presto.cassandra.CassandraColumnHandle in project presto by prestodb.
the class TestCassandraCqlUtils method testAppendSelectColumns.
@Test
public void testAppendSelectColumns() {
List<CassandraColumnHandle> columns = ImmutableList.of(new CassandraColumnHandle("", "foo", 0, CassandraType.VARCHAR, null, false, false, false, false), new CassandraColumnHandle("", "bar", 0, CassandraType.VARCHAR, null, false, false, false, false), new CassandraColumnHandle("", "table", 0, CassandraType.VARCHAR, null, false, false, false, false));
StringBuilder sb = new StringBuilder();
CassandraCqlUtils.appendSelectColumns(sb, columns);
String str = sb.toString();
assertEquals("foo,bar,\"table\"", str);
}
Aggregations