Search in sources :

Example 81 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 testNvarchar.

@Test
public void testNvarchar() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(ExtraSqlTypes.NVARCHAR);
    // NVARCHAR not supported yet, currently maps to VARCHAR
    assertEquals("NVARCHAR did not map to VARCHAR", SqlTypeName.VARCHAR, tn);
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.Test)

Example 82 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 testBit.

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

Example 83 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 testNchar.

@Test
public void testNchar() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(ExtraSqlTypes.NCHAR);
    // NCHAR not supported yet, currently maps to CHAR
    assertEquals("NCHAR did not map to CHAR", SqlTypeName.CHAR, tn);
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) Test(org.junit.Test)

Example 84 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 testBigint.

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

Example 85 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 testSmallint.

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

Aggregations

SqlTypeName (org.apache.calcite.sql.type.SqlTypeName)117 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)13 List (java.util.List)11 RelDataTypeField (org.apache.calcite.rel.type.RelDataTypeField)9 RelDataTypeFactory (org.apache.calcite.rel.type.RelDataTypeFactory)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