rzo1 opened a new pull request, #264:
URL: https://github.com/apache/openjpa/pull/264

   https://issues.apache.org/jira/browse/OPENJPA-3063
   
   **Stacked on #263** (OPENJPA-3062): it uses `DBDictionary.isUnsizedDecimal` 
from there. Only the last commit belongs to this PR.
   
   Fixes the 17 failures and 4 errors of the suite on HSQLDB (`-Dtest-hsqldb`):
   
   - **LOB types** (`TestLobConverted*`): `HSQLDictionary.getPreferredType` 
used the HSQLDB 1.x types (VARCHAR/VARBINARY instead of CLOB/BLOB) whenever the 
database version was not known yet, i.e. when the mapping is resolved before 
the first connection. Now only on version 1.
   - **Decimals** (`TestDecimalScale`, `TestUnarySign`, 
`TestArithmeticResultType`): an unsized NUMERIC is NUMERIC(128,0) on HSQLDB 2. 
A decimal column of a non-integral type without a precision is created as 
`NUMERIC(128,32)`, the size the decimal casts of this dictionary already use. 
Migration note added.
   - **CASE padding** (`TestSelectionParameters`): HSQLDB types a string 
literal as CHAR(n), so a CASE result was padded to the longest branch. New flag 
`requiresCastForCaseStringResult` (set for HSQLDB only) casts string literals 
and string parameters in CASE results to VARCHAR. String parameters as CASE 
results now also work on HSQLDB.
   - **EXTRACT of a parameter** (`TestEJBQLFunction`, 
`TestExtractDateTimeField`): HSQLDB needs a typed parameter. It now sets 
`requiresCastForExtractOperand`, and the operand is cast to 
`TIME(9)`/`TIMESTAMP(9)` (new `getExtractOperandCastType`) so the fraction is 
kept. Other casts are unchanged. `LocalTime` is bound with `setObject` on 
HSQLDB 2.4+ so its fraction is not dropped.
   
   New `TestHSQLDictionary` and `TestCaseStringResult`. Full suite passes on 
HSQLDB, Derby and H2.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to