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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
renderComparisonEmulateDecode( lhs, operator, rhs );
|
renderComparisonEmulateDecode( lhs, operator, rhs, SqlAstNodeRenderingMode.NO_UNTYPED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -862,7 +862,7 @@ public class DB2Dialect extends Dialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsIsTrue() {
|
public boolean supportsIsTrue() {
|
||||||
return true;
|
return getDB2Version().isSameOrAfter( 11 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -444,7 +444,7 @@ public class DB2SqlAstTranslator<T extends JdbcOperation> extends AbstractSqlAst
|
||||||
break;
|
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) {
|
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 ) {
|
switch ( operator ) {
|
||||||
case DISTINCT_FROM:
|
case DISTINCT_FROM:
|
||||||
appendSql( "decode(" );
|
appendSql( "decode(" );
|
||||||
lhs.accept( this );
|
render( lhs, firstArgRenderingMode );
|
||||||
appendSql( ',' );
|
appendSql( ',' );
|
||||||
rhs.accept( this );
|
rhs.accept( this );
|
||||||
appendSql( ",0,1)=1" );
|
appendSql( ",0,1)=1" );
|
||||||
break;
|
break;
|
||||||
case NOT_DISTINCT_FROM:
|
case NOT_DISTINCT_FROM:
|
||||||
appendSql( "decode(" );
|
appendSql( "decode(" );
|
||||||
lhs.accept( this );
|
render( lhs, firstArgRenderingMode );
|
||||||
appendSql( ',' );
|
appendSql( ',' );
|
||||||
rhs.accept( this );
|
rhs.accept( this );
|
||||||
appendSql( ",0,1)=0" );
|
appendSql( ",0,1)=0" );
|
||||||
|
|
Loading…
Reference in New Issue