Re: Patch for DISTINCT, ORDER BY issue

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Oct 10 2003 - 13:55:56 EDT

  • Next message: Scott Finnerty: "RE: Patch for DISTINCT, ORDER BY issue"

    On Friday, October 10, 2003, at 01:24 PM, Scott Finnerty wrote:

    >
    > The patch I have included will accumulate the expressions added by the
    > specified orderings and then if the DISTINCT modifier is used, it will
    > add
    > those expressions to the column list in the generated SQL. This seems
    > like
    > it should be harmless even to databases that don't require this. It
    > will,
    > in some cases, cause the same column expression to appear twice in the
    > generated query. I suppose a more sophisticated approach would be to
    > accumulate all of the column expressions to include in the select and
    > then
    > only generate a unique set so no expression is duplicated. If you
    > agree, I
    > could revise and resubmit.

    Will have a look at it when I have time during the weekend. I think
    having a unique column set is the desired solution. Since otherwise
    JDBC driver will be bringing lots of unneeded data back to the client.

    Also one thing to watch for (maybe you addressed this already, or maybe
    this is simply a non-issue..?) is that these extra columns do not end
    up in the snapshot read by DefaultResultIterator.

    > The patches are against the 10/9 nightly snapshot.
    >
    > It would be nice if these were also applied to the stable release as a
    > maintenance release.

    +1. If we have to put 1.0.1 on hold for another week because of that, I
    don't see a big deal.

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Oct 10 2003 - 13:55:54 EDT