use of com.axibase.tsd.api.model.sql.StringTable in project atsd-api-test by axibase.
the class SqlSelectAllTagsOrderTest method testSelectAllTagsAndColumnBefore.
@Issue("3166")
@Test
public void testSelectAllTagsAndColumnBefore() {
String sqlQuery = String.format("SELECT entity, tags.* FROM \"%s\"", TEST_METRIC_NAME);
StringTable resultTable = queryResponse(sqlQuery).readEntity(StringTable.class);
List<String> expectedColumnNames = sortedColumnNames(sortedTagsKeys(tags), "tags", false);
expectedColumnNames.add(0, "entity");
assertTableColumnsNames(expectedColumnNames, resultTable, true);
}
use of com.axibase.tsd.api.model.sql.StringTable in project atsd-api-test by axibase.
the class SqlSelectAllTagsOrderTest method testSelectAllMetricTagsAndColumnBefore.
@Issue("3166")
@Test
public void testSelectAllMetricTagsAndColumnBefore() {
String sqlQuery = String.format("SELECT entity, metric.tags.* FROM \"%s\"", TEST_METRIC_NAME);
StringTable resultTable = queryResponse(sqlQuery).readEntity(StringTable.class);
List<String> expectedColumnNames = sortedColumnNames(sortedTagsKeys(tags), "metric.tags", false);
expectedColumnNames.add(0, "entity");
assertTableColumnsNames(expectedColumnNames, resultTable, true);
}
use of com.axibase.tsd.api.model.sql.StringTable in project atsd-api-test by axibase.
the class SqlSelectAllTagsOrderTest method testSelectAllSeriesMetricTags.
@Issue("3166")
@Test
public void testSelectAllSeriesMetricTags() {
String sqlQuery = String.format("SELECT metric.tags.* FROM \"%s\"", TEST_METRIC_NAME);
StringTable resultTable = queryResponse(sqlQuery).readEntity(StringTable.class);
List<String> expectedColumnNames = sortedColumnNames(sortedTagsKeys(tags), "metric.tags", false);
assertTableColumnsNames(expectedColumnNames, resultTable, true);
}
use of com.axibase.tsd.api.model.sql.StringTable in project atsd-api-test by axibase.
the class SqlSelectLiteralTest method testSelectLiteral.
@Issue("3837")
@Test(dataProvider = "literalAndResultProvider")
public void testSelectLiteral(String literal, String result) {
String sqlQuery = String.format("SELECT %s FROM \"%s\"", literal, metricName);
StringTable resultTable = queryTable(sqlQuery);
List<List<String>> res = resultTable.filterRows(literal);
assertFalse(String.format("No column with name %s", literal), res.get(0).isEmpty());
assertEquals("Column value is not as expected", res.get(0).get(0), result);
}
use of com.axibase.tsd.api.model.sql.StringTable in project atsd-api-test by axibase.
the class SqlSelectMetricTagsTest method testSelectMetricTags.
@Issue("3056")
@Test
public void testSelectMetricTags() {
String sqlQuery = String.format("SELECT metric.tags %nFROM \"%s\" %nWHERE datetime = '2016-06-29T08:00:00.000Z'AND entity='%s' %n", TEST_METRIC_NAME, TEST_ENTITY_NAME);
StringTable resultTable = queryResponse(sqlQuery).readEntity(StringTable.class);
assertTableColumnsNames(Collections.singletonList("metric.tags"), resultTable);
List<List<String>> expectedRows = Collections.singletonList(Collections.singletonList("a=b;a-b=b-c;b=c;tag=V"));
assertTableRowsExist(expectedRows, resultTable);
}
Aggregations