diff --git a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/InformixSqlAstTranslator.java b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/InformixSqlAstTranslator.java index 744b32fa08..ee21520f52 100644 --- a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/InformixSqlAstTranslator.java +++ b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/InformixSqlAstTranslator.java @@ -15,7 +15,6 @@ import org.hibernate.sql.ast.SqlAstNodeRenderingMode; import org.hibernate.sql.ast.spi.AbstractSqlAstTranslator; import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.Statement; -import org.hibernate.sql.ast.tree.expression.CaseSearchedExpression; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.ast.tree.expression.Literal; import org.hibernate.sql.ast.tree.expression.SqlTuple; @@ -66,22 +65,8 @@ public class InformixSqlAstTranslator extends AbstractS super.visitSqlSelections( selectClause ); } - @Override - protected void visitCaseSearchedExpression(CaseSearchedExpression caseSearchedExpression, boolean inSelect) { - if ( inSelect ) { - withParameterRenderingMode( - SqlAstNodeRenderingMode.INLINE_ALL_PARAMETERS, - () -> super.visitCaseSearchedExpression( caseSearchedExpression, inSelect ) - ); - } - else { - super.visitCaseSearchedExpression( caseSearchedExpression, inSelect ); - } - } - - @Override - protected void renderSelectExpression(Expression expression) { - renderSelectExpressionWithCastedOrInlinedPlainParameters( expression ); + protected SqlAstNodeRenderingMode getSqlSelectionsDefaultParameterRenderingMode(){ + return SqlAstNodeRenderingMode.INLINE_ALL_PARAMETERS; } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java index be12bfe271..dd84ae949d 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java @@ -5319,7 +5319,7 @@ public abstract class AbstractSqlAstTranslator implemen defaultRenderingMode = SqlAstNodeRenderingMode.DEFAULT; } else { - defaultRenderingMode = SqlAstNodeRenderingMode.NO_PLAIN_PARAMETER; + defaultRenderingMode = getSqlSelectionsDefaultParameterRenderingMode(); } if ( needsSelectAliases || referenceStrategy == SelectItemReferenceStrategy.ALIAS && hasSelectAliasInGroupByClause() ) { String separator = NO_SEPARATOR; @@ -5396,6 +5396,10 @@ public abstract class AbstractSqlAstTranslator implemen } } + protected SqlAstNodeRenderingMode getSqlSelectionsDefaultParameterRenderingMode() { + return SqlAstNodeRenderingMode.NO_PLAIN_PARAMETER; + } + protected void renderVirtualSelections(SelectClause selectClause) { renderRecursiveCteVirtualSelections( selectClause ); }