Search in sources :

Example 1 with MonetDbDialect

use of mondrian.spi.impl.MonetDbDialect in project mondrian by pentaho.

the class DialectTest method testMonetBooleanColumn.

public void testMonetBooleanColumn() throws SQLException {
    ResultSetMetaData resultSet = new MockResultSetMetadata().withColumnType(Types.BOOLEAN).build();
    MonetDbDialect monetDbDialect = new MonetDbDialect();
    SqlStatement.Type type = monetDbDialect.getType(resultSet, 0);
    assertEquals(SqlStatement.Type.OBJECT, type);
}
Also used : ResultSetMetaData(java.sql.ResultSetMetaData) SqlStatement(mondrian.rolap.SqlStatement) MonetDbDialect(mondrian.spi.impl.MonetDbDialect)

Example 2 with MonetDbDialect

use of mondrian.spi.impl.MonetDbDialect in project mondrian by pentaho.

the class DialectTest method testMonetDBTypeMapQuirks.

public void testMonetDBTypeMapQuirks() throws SQLException {
    MockResultSetMetadata mockResultSetMeta = new MockResultSetMetadata();
    Dialect monetDbDialect = TestContext.getFakeDialect(Dialect.DatabaseProduct.MONETDB);
    assertTrue("MonetDB dialect NUMERIC with precision =0, scale = 0" + " may be an aggregated decimal, should assume DOUBLE", monetDbDialect.getType(mockResultSetMeta.withColumnType(Types.NUMERIC).withPrecision(0).withScale(0).build(), 0) == SqlStatement.Type.DOUBLE);
}
Also used : GoogleBigQueryDialect(mondrian.spi.impl.GoogleBigQueryDialect) MicrosoftSqlServerDialect(mondrian.spi.impl.MicrosoftSqlServerDialect) MonetDbDialect(mondrian.spi.impl.MonetDbDialect) HiveDialect(mondrian.spi.impl.HiveDialect) InfobrightDialect(mondrian.spi.impl.InfobrightDialect) Dialect(mondrian.spi.Dialect) PostgreSqlDialect(mondrian.spi.impl.PostgreSqlDialect) NetezzaDialect(mondrian.spi.impl.NetezzaDialect) MariaDBDialect(mondrian.spi.impl.MariaDBDialect) OracleDialect(mondrian.spi.impl.OracleDialect) MySqlDialect(mondrian.spi.impl.MySqlDialect) VectorwiseDialect(mondrian.spi.impl.VectorwiseDialect) NuoDbDialect(mondrian.spi.impl.NuoDbDialect)

Aggregations

MonetDbDialect (mondrian.spi.impl.MonetDbDialect)2 ResultSetMetaData (java.sql.ResultSetMetaData)1 SqlStatement (mondrian.rolap.SqlStatement)1 Dialect (mondrian.spi.Dialect)1 GoogleBigQueryDialect (mondrian.spi.impl.GoogleBigQueryDialect)1 HiveDialect (mondrian.spi.impl.HiveDialect)1 InfobrightDialect (mondrian.spi.impl.InfobrightDialect)1 MariaDBDialect (mondrian.spi.impl.MariaDBDialect)1 MicrosoftSqlServerDialect (mondrian.spi.impl.MicrosoftSqlServerDialect)1 MySqlDialect (mondrian.spi.impl.MySqlDialect)1 NetezzaDialect (mondrian.spi.impl.NetezzaDialect)1 NuoDbDialect (mondrian.spi.impl.NuoDbDialect)1 OracleDialect (mondrian.spi.impl.OracleDialect)1 PostgreSqlDialect (mondrian.spi.impl.PostgreSqlDialect)1 VectorwiseDialect (mondrian.spi.impl.VectorwiseDialect)1