dynamobi/dynamobi — Issue #723: [FRG-149] SqlPrettyWriter.setSelectListItemsOnSeparateLines is false advertising
Author: dynamobi-build
Created: 2011-12-30 03:45:15+00:00
State: open
Labels: FRG, SQL Parser

[reporter="jvs", created="Thu, 8 Jun 2006 18:08:13 -0500 (GMT-05:00)"]
You can verify this by looking at SqlPrettyWriterTest.ref.xml, which is currently checked in with incorrect results.

The bug is due to the fact that SqlNodeList.unparse creates a new Frame, ignoring the correctly configured Frame which SqlSelectOperator set up for it.

I don't want to disturb SqlNodeList, which is used many place, so I'll probably put the fix in SqlSelectOperator, making it call a newly public version of SqlNodeList.commaList directly.

What about the ORDER BY and GROUP BY lists? They have the same issue. I'm not sure if they're actually supposed to be following this setting or not because setSelectListItemsOnSeparateLines doesn't sound like it should affect them. But the code inside of SqlPrettyWriter seems to want them to follow the select list behavior.