use of io.crate.expression.reference.StaticTableReferenceResolver in project crate by crate.
the class SysClusterTableInfoTest method test_license_data_can_be_selected.
@Test
public void test_license_data_can_be_selected() {
var clusterTable = SysClusterTableInfo.of(clusterService, new CrateSettings(clusterService, clusterService.getSettings()));
StaticTableReferenceResolver<Void> refResolver = new StaticTableReferenceResolver<>(clusterTable.expressions());
NestableCollectExpression<Void, ?> expiryDate = refResolver.getImplementation(clusterTable.getReference(new ColumnIdent("license", "expiry_date")));
expiryDate.setNextRow(null);
assertThat(expiryDate.value(), Matchers.nullValue());
NestableCollectExpression<Void, ?> issuedTo = refResolver.getImplementation(clusterTable.getReference(new ColumnIdent("license", "issued_to")));
issuedTo.setNextRow(null);
assertThat(issuedTo.value(), Matchers.nullValue());
NestableCollectExpression<Void, ?> maxNodes = refResolver.getImplementation(clusterTable.getReference(new ColumnIdent("license", "max_nodes")));
maxNodes.setNextRow(null);
assertThat(maxNodes.value(), Matchers.nullValue());
}
Aggregations