Re: banging my head against SelectQueryTst

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Feb 17 2003 - 00:28:24 EST

  • Next message: Dirk Olmes: "Re: banging my head against SelectQueryTst"

    Dirk Olmes wrote:
    > Apart from the fact that the test doesn't test queries using ORDER BY as
    > its name would suggest,

    You are right, this is dumb :-). This is a simple LIKE test, has nothing
    to do with ordering. I just committed a fix for that.

    my current assumption is that the test runs on
    > oracle only through the existence of the OracleQualifierTranslator.

    > It seems that Oracle and Postgres share the same behaviour of CHAR(xx)
    > columns: padding the column to its specified length with blanks.
    > OracleQualifierTranslator seems to generate queries with RTRIM(column)
    > so that the test will finally find something. Since I don't have such a
    > QualifierTranslator installed for postgres, things go wrong.

    I suspect this is the case. BTW, I just did some research with McKoi
    database, and out of all SelectQuery tests, "testOrderByIgnoreCase" was
    the only one that failed, and for the same reason - space padding.

    > Can someone please explain the design goal behind the whole trimming of
    > CHAR columns, please? I remember that in the past CHAR columns were
    > handled more efficiently by DBMSs than VARCHAR but I remember having
    > read in the Oracle docs that this is no longer true.

    That's what I heard in the past too. Not sure what is the current
    situation. In any event I suspect it to be database-dependent. Also
    since there is a CHAR type in JDBC, we must support it correctly. It is
    up to the users to avoid using it in the design.

    I guess for now we may need a PostgresQualifierTranslator, just like
    Oracle's. Later we may refactor it into an adapter-independent subclass
    of QualifierTranslator.

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Feb 17 2003 - 00:29:09 EST