@@ -191,18 +191,6 @@ else if ( expression instanceof Summarization ) {
191191 }
192192 }
193193
194- // @Override
195- // protected void renderNull(Literal literal) {
196- // if ( getParameterRenderingMode() == SqlAstNodeRenderingMode.NO_UNTYPED ) {
197- // renderCasted( literal );
198- // }
199- // else {
200- // int sqlType = literal.getExpressionType().getSingleJdbcMapping().getJdbcType().getJdbcTypeCode();
201- // String nullString = getDialect().getSelectClauseNullString( sqlType, getSessionFactory().getTypeConfiguration() );
202- // appendSql( nullString );
203- // }
204- // }
205-
206194 @ Override
207195 protected void renderInsertIntoNoColumns (TableInsertStandard tableInsert ) {
208196 renderIntoIntoAndTable ( tableInsert );
@@ -245,7 +233,7 @@ public void visitValuesTableReference(ValuesTableReference tableReference) {
245233 protected boolean shouldEmulateFetchClause (QueryPart queryPart ) {
246234 // Check if current query part is already row numbering to avoid infinite recursion
247235 return useOffsetFetchClause ( queryPart ) && getQueryPartForRowNumbering () != queryPart
248- && getDialect ().supportsWindowFunctions () && !isRowsOnlyFetchClauseType ( queryPart );
236+ && getDialect ().supportsWindowFunctions () && !isRowsOnlyFetchClauseType ( queryPart );
249237 }
250238
251239 @ Override
@@ -295,26 +283,6 @@ protected void visitArithmeticOperand(Expression expression) {
295283 }
296284 }
297285
298- private static boolean isStringFunctionWithParameterArg (SelfRenderingExpression expression ) {
299- return expression instanceof FunctionExpression fn
300- && expression .getExpressionType () != null
301- && expression .getExpressionType ().getJdbcTypeCount () == 1
302- && expression .getExpressionType ().getSingleJdbcMapping ().getJdbcType ().isString ()
303- && fn .getArguments ().stream ().anyMatch ( arg -> arg instanceof SqmParameterInterpretation );
304- }
305-
306- @ Override
307- public void visitSelfRenderingExpression (SelfRenderingExpression expression ) {
308- if ( isStringFunctionWithParameterArg ( expression ) ) {
309- append ( "cast(" );
310- super .visitSelfRenderingExpression ( expression );
311- append ( " as lvarchar)" );
312- }
313- else {
314- super .visitSelfRenderingExpression ( expression );
315- }
316- }
317-
318286 private static boolean isConcatFunction (Expression expression ) {
319287 return expression instanceof FunctionExpression fn
320288 && fn .getFunctionName ().equals ( "concat" );
0 commit comments