Fix DB2 10.5 testsuite issues
This commit is contained in:
parent
b0ad374226
commit
e83008e75d
|
@ -420,7 +420,7 @@ public class DB2LegacySqlAstTranslator<T extends JdbcOperation> extends Abstract
|
|||
break;
|
||||
}
|
||||
}
|
||||
renderComparisonEmulateDecode( lhs, operator, rhs );
|
||||
renderComparisonEmulateDecode( lhs, operator, rhs, SqlAstNodeRenderingMode.NO_UNTYPED );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -862,7 +862,7 @@ public class DB2Dialect extends Dialect {
|
|||
|
||||
@Override
|
||||
public boolean supportsIsTrue() {
|
||||
return true;
|
||||
return getDB2Version().isSameOrAfter( 11 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -444,7 +444,7 @@ public class DB2SqlAstTranslator<T extends JdbcOperation> extends AbstractSqlAst
|
|||
break;
|
||||
}
|
||||
}
|
||||
renderComparisonEmulateDecode( lhs, operator, rhs );
|
||||
renderComparisonEmulateDecode( lhs, operator, rhs, SqlAstNodeRenderingMode.NO_UNTYPED );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3625,17 +3625,25 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
|
|||
}
|
||||
|
||||
protected void renderComparisonEmulateDecode(Expression lhs, ComparisonOperator operator, Expression rhs) {
|
||||
renderComparisonEmulateDecode( lhs, operator, rhs, SqlAstNodeRenderingMode.DEFAULT );
|
||||
}
|
||||
|
||||
protected void renderComparisonEmulateDecode(
|
||||
Expression lhs,
|
||||
ComparisonOperator operator,
|
||||
Expression rhs,
|
||||
SqlAstNodeRenderingMode firstArgRenderingMode) {
|
||||
switch ( operator ) {
|
||||
case DISTINCT_FROM:
|
||||
appendSql( "decode(" );
|
||||
lhs.accept( this );
|
||||
render( lhs, firstArgRenderingMode );
|
||||
appendSql( ',' );
|
||||
rhs.accept( this );
|
||||
appendSql( ",0,1)=1" );
|
||||
break;
|
||||
case NOT_DISTINCT_FROM:
|
||||
appendSql( "decode(" );
|
||||
lhs.accept( this );
|
||||
render( lhs, firstArgRenderingMode );
|
||||
appendSql( ',' );
|
||||
rhs.accept( this );
|
||||
appendSql( ",0,1)=0" );
|
||||
|
|
Loading…
Reference in New Issue