Search in sources :

Example 11 with SqlColumnMetadata

use of com.hazelcast.sql.SqlColumnMetadata in project hazelcast by hazelcast.

the class SqlNullableColumnTest method testSelectWithNonNullSupport.

@Test
public void testSelectWithNonNullSupport() {
    createMapping("map", String.class, int.class);
    instance().getMap("map").put("key", 1);
    SqlResult result = instance().getSql().execute("SELECT __key, 1 FROM map");
    List<SqlColumnMetadata> columns = result.getRowMetadata().getColumns();
    assertEquals(columns.size(), 2);
    assertTrue(columns.get(0).isNullable());
    assertFalse(columns.get(1).isNullable());
}
Also used : SqlResult(com.hazelcast.sql.SqlResult) SqlColumnMetadata(com.hazelcast.sql.SqlColumnMetadata) Test(org.junit.Test)

Aggregations

SqlColumnMetadata (com.hazelcast.sql.SqlColumnMetadata)11 SqlRowMetadata (com.hazelcast.sql.SqlRowMetadata)5 ArrayList (java.util.ArrayList)5 SqlColumnType (com.hazelcast.sql.SqlColumnType)4 BitmapIndexOptions (com.hazelcast.config.BitmapIndexOptions)2 UniqueKeyTransformation (com.hazelcast.config.BitmapIndexOptions.UniqueKeyTransformation)2 IndexConfig (com.hazelcast.config.IndexConfig)2 IndexType (com.hazelcast.config.IndexType)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 InternalSerializationService (com.hazelcast.internal.serialization.InternalSerializationService)2 Job (com.hazelcast.jet.Job)2 JobStateSnapshot (com.hazelcast.jet.JobStateSnapshot)2 JobConfig (com.hazelcast.jet.config.JobConfig)2 KEY_SQL_QUERY_TEXT (com.hazelcast.jet.config.JobConfigArguments.KEY_SQL_QUERY_TEXT)2 KEY_SQL_UNBOUNDED (com.hazelcast.jet.config.JobConfigArguments.KEY_SQL_UNBOUNDED)2 AbstractJetInstance (com.hazelcast.jet.impl.AbstractJetInstance)2 JetServiceBackend (com.hazelcast.jet.impl.JetServiceBackend)2 Util (com.hazelcast.jet.impl.util.Util)2 Util.getNodeEngine (com.hazelcast.jet.impl.util.Util.getNodeEngine)2 AlterJobPlan (com.hazelcast.jet.sql.impl.SqlPlanImpl.AlterJobPlan)2