You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Thomas Fischer <tf...@apache.org> on 2005/09/13 07:19:07 UTC

Re: Torqe 3.2 rc1 Bug

Hi,

Thank you for submitting a patch to Torque. Please use the issue tracker 
next time, so things do not get forgotten and otrher developers are also 
informed.

I am sorry I do not think your patch is ripe to be included in current 
svn. it has the following problems
- Without any need, it removes support for things that work already, for 
example order by nested functions.
- Also without any need, it removes plausibility checks
- What weighs heaviest in my eyes, is that the substring from the start to 
the position of the first space looks completely arbitrary to me. Why not 
using the part from the last space to the end ? Something like this 
would be needed to support

ORDER BY 100 > table.column

I have always wondered whether we need to extract the column name from the 
order by at all, but 1) nobody has looked into it in detail and 2) this is 
not something which should be changed in release candidates.

I am happy to reconsider a patch which does not have the first two 
problems, and has a concept of avoiding the last problem.

     Regards,

       Thomas


On Wed, 31 Aug 2005, Jacob Champlin wrote:

> Thomas Fischer,
>
> Hello, I just converted our website to use Torque 3.2 rc1 and have discovered 
> a bug.  I realise submitting a bug to you is the way things should work. 
> However I can't seem to figure out how to submit issues to the Torque 
> project.  All I can find is a link to some Maven bug repository.
>
> Anyways the issue at hand.  It appears like you added support for SQL 
> functions in ORDER BY statements.  For example:  ORDER BY MAX(table.column)
>
> However the order by statement doesn't work with other clauses:
> ORDER BY table.column < 100
> ORDER BY table.column IN (1, 2, 3)
>
> In particular the IN statement really gets messed up because of parentheses.
>
> I tracked down the issue to the SQLBuilder.removeSQLFunction() .  The comment 
> on this function
> says it removes clauses and functions.  But it looks to me like it only 
> removes functions.
>
> So I changed it to also remove clauses... and here you go.  Hope you can get 
> this in before the final release.
>
> Thank you,
> Jacob Champlin
> EMO Corporation
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org