Search in sources :

Example 56 with SqlTypeName

use of org.apache.calcite.sql.type.SqlTypeName in project calcite by apache.

the class SqlTypeNameTest method testDouble.

@Test
void testDouble() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(Types.DOUBLE);
    assertEquals(DOUBLE, tn, "DOUBLE did not map to DOUBLE");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.jupiter.api.Test)

Example 57 with SqlTypeName

use of org.apache.calcite.sql.type.SqlTypeName in project calcite by apache.

the class SqlTypeNameTest method testVarchar.

@Test
void testVarchar() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(Types.VARCHAR);
    assertEquals(VARCHAR, tn, "VARCHAR did not map to VARCHAR");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.jupiter.api.Test)

Example 58 with SqlTypeName

use of org.apache.calcite.sql.type.SqlTypeName in project calcite by apache.

the class SqlTypeNameTest method testClob.

@Test
void testClob() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(Types.CLOB);
    assertEquals(null, tn, "CLOB did not map to null");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.jupiter.api.Test)

Example 59 with SqlTypeName

use of org.apache.calcite.sql.type.SqlTypeName in project calcite by apache.

the class SqlTypeNameTest method testJavaobject.

@Test
void testJavaobject() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(Types.JAVA_OBJECT);
    assertEquals(null, tn, "JAVA_OBJECT did not map to null");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.jupiter.api.Test)

Example 60 with SqlTypeName

use of org.apache.calcite.sql.type.SqlTypeName in project calcite by apache.

the class SqlTypeNameTest method testLongnvarchar.

@Test
void testLongnvarchar() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(ExtraSqlTypes.LONGNVARCHAR);
    // LONGNVARCHAR not supported yet
    assertEquals(null, tn, "LONGNVARCHAR maps to non-null type");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.jupiter.api.Test)

Aggregations

SqlTypeName (org.apache.calcite.sql.type.SqlTypeName)184 RelDataType (org.apache.calcite.rel.type.RelDataType)62 Test (org.junit.jupiter.api.Test)39 List (java.util.List)31 BigDecimal (java.math.BigDecimal)30 ArrayList (java.util.ArrayList)30 ImmutableList (com.google.common.collect.ImmutableList)26 RelDataTypeField (org.apache.calcite.rel.type.RelDataTypeField)26 Map (java.util.Map)25 RexNode (org.apache.calcite.rex.RexNode)25 NlsString (org.apache.calcite.util.NlsString)21 DateString (org.apache.calcite.util.DateString)18 TimeString (org.apache.calcite.util.TimeString)18 TimestampString (org.apache.calcite.util.TimestampString)18 ByteString (org.apache.calcite.avatica.util.ByteString)17 RelDataTypeFactory (org.apache.calcite.rel.type.RelDataTypeFactory)16 SqlKind (org.apache.calcite.sql.SqlKind)15 Calendar (java.util.Calendar)14 Objects (java.util.Objects)13 Util (org.apache.calcite.util.Util)13