Search in sources :

Example 86 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 testVarbinary.

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

Example 87 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 testDate.

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

Example 88 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 testChar.

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

Example 89 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 testTime.

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

Example 90 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 testRef.

@Test
public void testRef() {
    SqlTypeName tn = SqlTypeName.getNameForJdbcType(Types.REF);
    assertEquals("REF did not map to null", null, 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