Search in sources :

Example 21 with SqlTypeName

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

the class SqlTypeNameTest method testArray.

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

Example 22 with SqlTypeName

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

the class SqlTypeNameTest method testDecimal.

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

Example 23 with SqlTypeName

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

the class SqlTypeNameTest method testTinyint.

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

Example 24 with SqlTypeName

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

the class SqlTypeNameTest method testDatalink.

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

Example 25 with SqlTypeName

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

the class SqlTypeNameTest method testSqlxml.

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

Aggregations

SqlTypeName (org.apache.calcite.sql.type.SqlTypeName)116 Test (org.junit.Test)38 RelDataType (org.apache.calcite.rel.type.RelDataType)28 RexNode (org.apache.calcite.rex.RexNode)18 BigDecimal (java.math.BigDecimal)13 ArrayList (java.util.ArrayList)12 List (java.util.List)11 RelDataTypeFactory (org.apache.calcite.rel.type.RelDataTypeFactory)8 RelDataTypeField (org.apache.calcite.rel.type.RelDataTypeField)8 ImmutableList (com.google.common.collect.ImmutableList)7 Map (java.util.Map)7 DateString (org.apache.calcite.util.DateString)7 TimeString (org.apache.calcite.util.TimeString)7 TimestampString (org.apache.calcite.util.TimestampString)7 ISE (io.druid.java.util.common.ISE)6 SqlKind (org.apache.calcite.sql.SqlKind)6 NlsString (org.apache.calcite.util.NlsString)6 Calendar (java.util.Calendar)5 Nullable (javax.annotation.Nullable)5 RexBuilder (org.apache.calcite.rex.RexBuilder)5