@@ -307,10 +307,12 @@ public void visit(UnPivot unpivot) {
307307 boolean showOptions = unpivot .getIncludeNullsSpecified ();
308308 boolean includeNulls = unpivot .getIncludeNulls ();
309309 List <Column > unpivotForClause = unpivot .getUnPivotForClause ();
310- buffer .append (" UNPIVOT" ).append (showOptions && includeNulls ? " INCLUDE NULLS" : "" )
311- .append (showOptions && !includeNulls ? " EXCULDE NULLS" : "" ).append (" (" )
312- .append (unpivot .getUnPivotClause ()).append (" FOR " )
313- .append (PlainSelect .getStringList (unpivotForClause , true ,
310+ buffer
311+ .append (" UNPIVOT" )
312+ .append (showOptions && includeNulls ? " INCLUDE NULLS" : "" )
313+ .append (showOptions && !includeNulls ? " EXCLUDE NULLS" : "" )
314+ .append (" (" ).append (unpivot .getUnPivotClause ())
315+ .append (" FOR " ).append (PlainSelect .getStringList (unpivotForClause , true ,
314316 unpivotForClause != null && unpivotForClause .size () > 1 ))
315317 .append (" IN " ).append (PlainSelect .getStringList (unpivot .getUnPivotInClause (), true , true )).append (")" );
316318 if (unpivot .getAlias () != null ) {
@@ -533,20 +535,6 @@ public void visit(ParenthesisFromItem parenthesis) {
533535 buffer .append ("(" );
534536 parenthesis .getFromItem ().accept (this );
535537
536- //@todo: investigate, why the Pivot is handled already
537- // while the UnPivot is NOT handled.
538- // Something here is wrong and the code below is just a work around
539-
540- /* handled already somehow somewhere, see Special Oracle Test "pivot07_Parenthesis.sql"
541- if (parenthesis.getFromItem().getPivot()!=null) {
542- parenthesis.getFromItem().getPivot().accept(this);
543- }
544- */
545-
546- if (parenthesis .getFromItem ().getUnPivot ()!=null ) {
547- parenthesis .getFromItem ().getUnPivot ().accept (this );
548- }
549-
550538 buffer .append (")" );
551539 if (parenthesis .getAlias () != null ) {
552540 buffer .append (parenthesis .getAlias ().toString ());
0 commit comments