db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1448002 [1/6] - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/iapi/reference/ engine/org/apache/derby/iapi/types/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTest...
Date Wed, 20 Feb 2013 04:42:58 GMT
Author: dag
Date: Wed Feb 20 04:42:57 2013
New Revision: 1448002

URL: http://svn.apache.org/r1448002
Log:
DERBY-3398 Support min/max values for Java types float/double in real/double columns

Patch derby-3398-8.

Removes the legacy DB limits on floating point numbers.

This lets the application use Derby for all Java float and double
values with the exception of NaN (not a number), -0.0 (normalized to
+0.0) and +/- infinity as defined in the IEEE-754 1985 floating-point
standard.

After this change, on soft upgrade, instead of throwing on the DB2
limits when calling ResultSet#updateXXX or PreparedStatement#setXXX,
the check throws on ResultSet#updateRow, or #insertRow, and similarly
on PreparedStatement#execute.

Upgrade tests test this behavior. But don't run floating ResultSet#updateXXX on old
releases prior to 10.2 (they don't support forward updatable result
sets).

The patch also fixes max display width for real and double numbers
since some values's printed representation were truncated by ij (even
before the DB2 limits change). This accounts for the all the canons
changes.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Limits.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/backupRestore.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/desc_index.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml029.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml034.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml035.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml057.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml076.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml091.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml099.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml106.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml119.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml148.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml165.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/insert.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/orderby.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/positionedDelUpd.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/select.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerRefClause.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/union.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PrepStmtMetaDataTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_10.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java Wed Feb 20 04:42:57 2013
@@ -291,10 +291,10 @@ public class ColumnMetaData implements j
             case Types.BIGINT:
                 return 20;
             case Types.REAL:
-                return 13;
+                return 15;
             case Types.DOUBLE:
             case java.sql.Types.FLOAT:
-                return 22;
+                return 24;
             case Types.DECIMAL:
             case java.sql.Types.NUMERIC:
         // There are 3 possible cases with respect to finding the correct max width for DECIMAL type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Limits.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Limits.java?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Limits.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Limits.java Wed Feb 20 04:42:57 2013
@@ -82,7 +82,8 @@ public interface Limits
 	public static final int DB2_DEFAULT_DECIMAL_SCALE       = 0;
 
     /**
-     * REAL/DOUBLE range limits
+     * REAL/DOUBLE range limits pre DERBY-3398. After that fix, they are
+     * only used in soft-upgrade scenarios with older databases.
      */
 
     static final float DB2_SMALLEST_REAL = -3.402E+38f;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java Wed Feb 20 04:42:57 2013
@@ -172,10 +172,10 @@ public abstract class DataTypeUtilities 
 				break;
 			case Types.REAL :
 			case Types.FLOAT :
-				size = 13;
+				size = 15;
 				break;
 			case Types.DOUBLE:
-				size = 22;
+				size = 24;
 				break;
 			case Types.TINYINT :
 				size = 15;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java Wed Feb 20 04:42:57 2013
@@ -24,16 +24,14 @@ package org.apache.derby.iapi.types;
 import java.math.BigDecimal;
 
 import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.types.NumberDataValue;
+import org.apache.derby.iapi.services.context.ContextService;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.io.Storable;
-import org.apache.derby.iapi.types.Orderable;
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.Limits;
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 
-import org.apache.derby.iapi.types.*;
 
 /**
  * NumberDataType is the superclass for all exact and approximate 
@@ -55,6 +53,7 @@ public abstract class NumberDataType ext
 	static final BigDecimal MAXLONG_PLUS_ONE = BigDecimal.valueOf(Long.MAX_VALUE).add(ONE);
 	static final BigDecimal MINLONG_MINUS_ONE = BigDecimal.valueOf(Long.MIN_VALUE).subtract(ONE);
 
+
     /**
      * Numbers check for isNegative first and negate it if negative.
      * 
@@ -477,19 +476,30 @@ public abstract class NumberDataType ext
 	}
 
 	/**
-       normalizeREAL checks the validity of the given java float that
-       it fits within the range of DB2 REALs. In addition it
-       normalizes the value, so that negative zero (-0.0) becomes positive.
-	*/
+      * normalizeREAL normalizes the value, so that negative zero (-0.0) becomes
+      * positive.
+      * @throws StandardException if the value is not a number (NaN) or is
+      * infinite.
+      */
     public static float normalizeREAL(float v) throws StandardException
 	{
-        if ( (Float.isNaN(v) || Float.isInfinite(v)) ||
-             ((v < Limits.DB2_SMALLEST_REAL) || (v > Limits.DB2_LARGEST_REAL)) ||
-             ((v > 0) && (v < Limits.DB2_SMALLEST_POSITIVE_REAL)) ||
-             ((v < 0) && (v > Limits.DB2_LARGEST_NEGATIVE_REAL)) )
-        {
-			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
+        boolean invalid = Float.isNaN(v) || Float.isInfinite(v);
+
+        if (v < Limits.DB2_SMALLEST_REAL ||
+            v > Limits.DB2_LARGEST_REAL ||
+            (v > 0 && v < Limits.DB2_SMALLEST_POSITIVE_REAL) ||
+            (v < 0 && v > Limits.DB2_LARGEST_NEGATIVE_REAL)) {
+
+            if (useDB2Limits()) {
+                invalid = true;
+            }
+        }
+
+        if (invalid) {
+            throw StandardException.newException(
+                SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
         }
+
         // Normalize negative floats to be "positive" (can't detect easily without using Float object because -0.0f = 0.0f)
         // DERBY-2447: It shouldn't matter whether we compare to 0.0f or -0.0f,
         // both should match negative zero, but comparing to 0.0f triggered
@@ -500,47 +510,76 @@ public abstract class NumberDataType ext
 	}
 
 	/**
-       normalizeREAL checks the validity of the given java double that
-       it fits within the range of DB2 REALs. In addition it
-       normalizes the value, so that negative zero (-0.0) becomes positive.
-
-       The reason for having normalizeREAL with two signatures is to
-       avoid that normalizeREAL is called with a casted (float)doublevalue,
-       since this invokes an unwanted rounding (of underflow values to 0.0),
-       in contradiction to DB2s casting semantics.
-	*/
-    public static float normalizeREAL(double v) throws StandardException
+     * normalizeREAL normalizes the value, so that negative zero (-0.0)
+     * becomes positive.
+     * <p>
+     * The reason for having normalizeREAL with two signatures is to
+     * avoid that normalizeREAL is accidentally called with a casted
+     * {@code (float)<double value>} since this can introduce an undetected
+     * underflow values to 0.0f.
+     * @throws StandardException if the value is not a number (NaN) or is
+     * infinite or on underflow
+     * (the value has magnitude too small to be represented as a float).
+     */
+    public static float normalizeREAL(final double v) throws StandardException
     {
-        // can't just cast it to float and call normalizeFloat(float) since casting can round down to 0.0
-        if ( (Double.isNaN(v) || Double.isInfinite(v)) ||
-             ((v < Limits.DB2_SMALLEST_REAL) || (v > Limits.DB2_LARGEST_REAL)) ||
-             ((v > 0) && (v < Limits.DB2_SMALLEST_POSITIVE_REAL)) ||
-             ((v < 0) && (v > Limits.DB2_LARGEST_NEGATIVE_REAL)) )
-        {
-			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
+        // Can't just cast it to float and call normalizeFloat(float) since
+        // casting can round down to 0.0
+        float fv = (float)v;
+
+        boolean invalid =
+            Double.isNaN(v) ||
+            Double.isInfinite(v) ||
+            (fv == 0.0f && v != 0.0d); // too small to represent as REAL
+
+        if (v < Limits.DB2_SMALLEST_REAL ||
+            v > Limits.DB2_LARGEST_REAL ||
+            (v > 0 && v < Limits.DB2_SMALLEST_POSITIVE_REAL) ||
+            (v < 0 && v > Limits.DB2_LARGEST_NEGATIVE_REAL)) {
+
+            if (useDB2Limits()) {
+                invalid = true;
+            }
         }
+
+        if (invalid) {
+            throw StandardException.newException(
+                SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
+        }
+
         // Normalize negative floats to be "positive" (can't detect easily without using Float object because -0.0f = 0.0f)
         // DERBY-2447: It shouldn't matter whether we compare to 0.0d or -0.0d,
         // both should match negative zero, but comparing to 0.0d triggered
         // this JVM bug: http://bugs.sun.com/view_bug.do?bug_id=6833879
-        if (v == -0.0d) v = 0.0d;
+        if (fv == -0.0f) {
+            fv = 0.0f;
+        }
 
-        return (float)v;
+        return fv;
     }
 
 	/**
-       normalizeDOUBLE checks the validity of the given java double that
-       it fits within the range of DB2 DOUBLEs. In addition it
-       normalizes the value, so that negative zero (-0.0) becomes positive.
-	*/
+     * normalizeDOUBLE normalizes the value, so that negative zero (-0.0)
+     * becomes positive.
+     * @throws StandardException if v is not a number (NaN) or is infinite.
+     */
     public static double normalizeDOUBLE(double v) throws StandardException
 	{
-        if ( (Double.isNaN(v) || Double.isInfinite(v)) ||
-             ((v < Limits.DB2_SMALLEST_DOUBLE) || (v > Limits.DB2_LARGEST_DOUBLE)) ||
-             ((v > 0) && (v < Limits.DB2_SMALLEST_POSITIVE_DOUBLE)) ||
-             ((v < 0) && (v > Limits.DB2_LARGEST_NEGATIVE_DOUBLE)) )
-        {
-			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.DOUBLE_NAME);
+        boolean invalid = Double.isNaN(v) || Double.isInfinite(v);
+
+        if (v < Limits.DB2_SMALLEST_DOUBLE ||
+            v > Limits.DB2_LARGEST_DOUBLE ||
+            (v > 0 && v < Limits.DB2_SMALLEST_POSITIVE_DOUBLE) ||
+            (v < 0 && v > Limits.DB2_LARGEST_NEGATIVE_DOUBLE)) {
+
+            if (useDB2Limits()) {
+                invalid = true;
+            }
+        }
+
+        if (invalid) {
+            throw StandardException.newException(
+                SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.DOUBLE_NAME);
         }
         // Normalize negative doubles to be "positive" (can't detect easily without using Double object because -0.0f = 0.0f)
         // DERBY-2447: It shouldn't matter whether we compare to 0.0d or -0.0d,
@@ -552,5 +591,24 @@ public abstract class NumberDataType ext
 	}
 
 
+   /**
+     * Controls use of old DB2 limits (DERBY-3398).
+     * @returns false if dictionary is new enough, see DD_Version.
+     */
+     private static boolean useDB2Limits() throws StandardException {
+         LanguageConnectionContext lcc =
+             (LanguageConnectionContext)ContextService.getContextOrNull(
+                 LanguageConnectionContext.CONTEXT_ID);
+         if (lcc != null) {
+             return !lcc.getDataDictionary().checkVersion(
+                     DataDictionary.DD_VERSION_DERBY_10_10, null);
+         } else {
+             // In PreparedStatement#setXXX and ResultSet#updateXXX contexts we
+             // do not have LanguageConnectionContext so check is deferred to
+             // the PreparedStatement execute time or ResultSet#updateRow time
+             // as the case may be.
+             return false;
+         }
+    }
 }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out Wed Feb 20 04:42:57 2013
@@ -201,26 +201,26 @@ ij> select avg(s) from empty;
 ------
 NULL  
 ij> select avg(d) from empty;
-1                     
-----------------------
-NULL                  
+1                       
+------------------------
+NULL                    
 ij> select avg(l) from empty;
 1                   
 --------------------
 NULL                
 ij> select avg(r) from empty;
-1            
--------------
-NULL         
+1              
+---------------
+NULL           
 ij> select avg(dc) from empty;
 1          
 -----------
 NULL       
 ij> -- variations
 select avg(i), avg(s), avg(r), avg(l) from empty;
-1          |2     |3            |4                   
------------------------------------------------------
-NULL       |NULL  |NULL         |NULL                
+1          |2     |3              |4                   
+-------------------------------------------------------
+NULL       |NULL  |NULL           |NULL                
 ij> select avg(i+1) from empty;
 1          
 -----------
@@ -233,14 +233,14 @@ ij> select avg(s) from empty group by s;
 1     
 ------
 ij> select avg(d) from empty group by d;
-1                     
-----------------------
+1                       
+------------------------
 ij> select avg(l) from empty group by l;
 1                   
 --------------------
 ij> select avg(r) from empty group by r;
-1            
--------------
+1              
+---------------
 ij> select avg(dc) from empty group by dc;
 1          
 -----------
@@ -258,9 +258,9 @@ ij> select avg(s) from t;
 107   
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(d) from t;
-1                     
-----------------------
-192.85714285714286    
+1                       
+------------------------
+192.85714285714286      
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(l) from t;
 1                   
@@ -268,9 +268,9 @@ ij> select avg(l) from t;
 1000000             
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(r) from t;
-1            
--------------
-192.85715    
+1              
+---------------
+192.85715      
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(dc) from t;
 1          
@@ -292,11 +292,11 @@ ij> select avg(s) from t group by s;
 NULL  
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(d) from t group by d;
-1                     
-----------------------
-100.0                 
-200.0                 
-NULL                  
+1                       
+------------------------
+100.0                   
+200.0                   
+NULL                    
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(l) from t group by l;
 1                   
@@ -305,11 +305,11 @@ ij> select avg(l) from t group by l;
 NULL                
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(r) from t group by r;
-1            
--------------
-100.0        
-200.0        
-NULL         
+1              
+---------------
+100.0          
+200.0          
+NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select avg(dc), sum(dc), count(dc) from t group by dc;
 1          |2          |3          
@@ -328,9 +328,9 @@ ij> select avg(1.1) from t;
 ---------
 1.1000   
 ij> select avg(1e1) from t;
-1                     
-----------------------
-10.0                  
+1                       
+------------------------
+10.0                    
 ij> select avg(1) from t group by i;
 1          
 -----------
@@ -344,39 +344,39 @@ ij> select avg(1.1) from t group by r;
 1.1000   
 1.1000   
 ij> select avg(1e1) from t group by r;
-1                     
-----------------------
-10.0                  
-10.0                  
-10.0                  
+1                       
+------------------------
+10.0                    
+10.0                    
+10.0                    
 ij> -- multicolumn grouping
 select avg(i), avg(l), avg(r) from t group by i, dt, b;
-1          |2                   |3            
-----------------------------------------------
-0          |1000000             |190.90909    
-0          |1000000             |200.0        
-0          |1000000             |200.0        
-1          |1000000             |200.0        
-NULL       |NULL                |NULL         
+1          |2                   |3              
+------------------------------------------------
+0          |1000000             |190.90909      
+0          |1000000             |200.0          
+0          |1000000             |200.0          
+1          |1000000             |200.0          
+NULL       |NULL                |NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select i, dt, avg(i), avg(r), avg(l), l from t group by i, dt, b, l;
-I          |DT        |3          |4            |5                   |L                   
-------------------------------------------------------------------------------------------
-0          |1992-01-01|0          |190.90909    |1000000             |1000000             
-0          |1992-01-01|0          |200.0        |1000000             |1000000             
-0          |1992-09-09|0          |200.0        |1000000             |1000000             
-1          |1992-01-01|1          |200.0        |1000000             |1000000             
-NULL       |NULL      |NULL       |NULL         |NULL                |NULL                
+I          |DT        |3          |4              |5                   |L                   
+--------------------------------------------------------------------------------------------
+0          |1992-01-01|0          |190.90909      |1000000             |1000000             
+0          |1992-01-01|0          |200.0          |1000000             |1000000             
+0          |1992-09-09|0          |200.0          |1000000             |1000000             
+1          |1992-01-01|1          |200.0          |1000000             |1000000             
+NULL       |NULL      |NULL       |NULL           |NULL                |NULL                
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- group by expression
 select avg(expr1), avg(expr2)
 from (select i * s, r * 2 from t) t (expr1, expr2) group by expr2, expr1;
-1          |2            
--------------------------
-0          |200.0        
-0          |400.0        
-100        |400.0        
-NULL       |NULL         
+1          |2              
+---------------------------
+0          |200.0          
+0          |400.0          
+100        |400.0          
+NULL       |NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- distinct and group by
 select distinct avg(i) from t group by i, dt;
@@ -465,83 +465,83 @@ ij> prepare vector as 'select avg(x) fro
 ij> insert into tmp values (1,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-1.0                   
+1                       
+------------------------
+1.0                     
 ij> execute vector;
-1                     
-----------------------
-1.0                   
+1                       
+------------------------
+1.0                     
 ij> insert into tmp values (2,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-1.5                   
+1                       
+------------------------
+1.5                     
 ij> execute vector;
-1                     
-----------------------
-1.5                   
+1                       
+------------------------
+1.5                     
 ij> insert into tmp values (3,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-2.0                   
+1                       
+------------------------
+2.0                     
 ij> execute vector;
-1                     
-----------------------
-2.0                   
+1                       
+------------------------
+2.0                     
 ij> insert into tmp values (4,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-2.5                   
+1                       
+------------------------
+2.5                     
 ij> execute vector;
-1                     
-----------------------
-2.5                   
+1                       
+------------------------
+2.5                     
 ij> insert into tmp values (5,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-3.0                   
+1                       
+------------------------
+3.0                     
 ij> execute vector;
-1                     
-----------------------
-3.0                   
+1                       
+------------------------
+3.0                     
 ij> insert into tmp values (6,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-3.5                   
+1                       
+------------------------
+3.5                     
 ij> execute vector;
-1                     
-----------------------
-3.5                   
+1                       
+------------------------
+3.5                     
 ij> insert into tmp values (7,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-4.0                   
+1                       
+------------------------
+4.0                     
 ij> execute vector;
-1                     
-----------------------
-4.0                   
+1                       
+------------------------
+4.0                     
 ij> insert into tmp values (10000,1);
 1 row inserted/updated/deleted
 ij> execute scalar;
-1                     
-----------------------
-1253.5                
+1                       
+------------------------
+1253.5                  
 ij> execute vector;
-1                     
-----------------------
-1253.5                
+1                       
+------------------------
+1253.5                  
 ij> remove vector;
 ij> remove scalar;
 ij> drop table tmp;
@@ -1496,26 +1496,26 @@ ij> select sum(s) from empty;
 ------
 NULL  
 ij> select sum(d) from empty;
-1                     
-----------------------
-NULL                  
+1                       
+------------------------
+NULL                    
 ij> select sum(l) from empty;
 1                   
 --------------------
 NULL                
 ij> select sum(r) from empty;
-1            
--------------
-NULL         
+1              
+---------------
+NULL           
 ij> select sum(dc) from empty;
 1          
 -----------
 NULL       
 ij> -- variations
 select sum(i), sum(s), sum(r), sum(l) from empty;
-1          |2     |3            |4                   
------------------------------------------------------
-NULL       |NULL  |NULL         |NULL                
+1          |2     |3              |4                   
+-------------------------------------------------------
+NULL       |NULL  |NULL           |NULL                
 ij> select sum(i+1) from empty;
 1          
 -----------
@@ -1528,14 +1528,14 @@ ij> select sum(s) from empty group by s;
 1     
 ------
 ij> select sum(d) from empty group by d;
-1                     
-----------------------
+1                       
+------------------------
 ij> select sum(l) from empty group by l;
 1                   
 --------------------
 ij> select sum(r) from empty group by r;
-1            
--------------
+1              
+---------------
 ij> select sum(dc) from empty group by dc;
 1          
 -----------
@@ -1553,9 +1553,9 @@ ij> select sum(s) from t;
 1600  
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(d) from t;
-1                     
-----------------------
-2900.0                
+1                       
+------------------------
+2900.0                  
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(l) from t;
 1                   
@@ -1563,9 +1563,9 @@ ij> select sum(l) from t;
 16000000            
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(r) from t;
-1            
--------------
-2900.0       
+1              
+---------------
+2900.0         
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(dc) from t;
 1          
@@ -1587,11 +1587,11 @@ ij> select sum(s) from t group by s;
 NULL  
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(d) from t group by d;
-1                     
-----------------------
-100.0                 
-2800.0                
-NULL                  
+1                       
+------------------------
+100.0                   
+2800.0                  
+NULL                    
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(l) from t group by l;
 1                   
@@ -1601,11 +1601,11 @@ ij> select sum(l) from t group by l;
 NULL                
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(r) from t group by r;
-1            
--------------
-100.0        
-2800.0       
-NULL         
+1              
+---------------
+100.0          
+2800.0         
+NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select sum(dc) from t group by dc;
 1          
@@ -1624,9 +1624,9 @@ ij> select sum(1.1) from t;
 ------
 18.7  
 ij> select sum(1e1) from t;
-1                     
-----------------------
-170.0                 
+1                       
+------------------------
+170.0                   
 ij> select sum(1) from t group by i;
 1          
 -----------
@@ -1640,40 +1640,40 @@ ij> select sum(1.1) from t group by r;
 15.4  
 2.2   
 ij> select sum(1e1) from t group by r;
-1                     
-----------------------
-10.0                  
-140.0                 
-20.0                  
+1                       
+------------------------
+10.0                    
+140.0                   
+20.0                    
 ij> -- multicolumn grouping
 select sum(i), sum(l), sum(r) from t group by i, dt, b;
-1          |2                   |3            
-----------------------------------------------
-0          |13000000            |2300.0       
-0          |1000000             |200.0        
-0          |1000000             |200.0        
-1          |1000000             |200.0        
-NULL       |NULL                |NULL         
+1          |2                   |3              
+------------------------------------------------
+0          |13000000            |2300.0         
+0          |1000000             |200.0          
+0          |1000000             |200.0          
+1          |1000000             |200.0          
+NULL       |NULL                |NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select i, dt, sum(i), sum(r), sum(l), l from t group by i, dt, b, l;
-I          |DT        |3          |4            |5                   |L                   
-------------------------------------------------------------------------------------------
-0          |1992-01-01|0          |2100.0       |11000000            |1000000             
-0          |1992-01-01|0          |200.0        |2000000             |2000000             
-0          |1992-01-01|0          |200.0        |1000000             |1000000             
-0          |1992-09-09|0          |200.0        |1000000             |1000000             
-1          |1992-01-01|1          |200.0        |1000000             |1000000             
-NULL       |NULL      |NULL       |NULL         |NULL                |NULL                
+I          |DT        |3          |4              |5                   |L                   
+--------------------------------------------------------------------------------------------
+0          |1992-01-01|0          |2100.0         |11000000            |1000000             
+0          |1992-01-01|0          |200.0          |2000000             |2000000             
+0          |1992-01-01|0          |200.0          |1000000             |1000000             
+0          |1992-09-09|0          |200.0          |1000000             |1000000             
+1          |1992-01-01|1          |200.0          |1000000             |1000000             
+NULL       |NULL      |NULL       |NULL           |NULL                |NULL                
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- group by expression
 select sum(expr1), sum(expr2)
 from (select i * s, r * 2 from t) t (expr1, expr2) group by expr2, expr1;
-1          |2            
--------------------------
-0          |200.0        
-0          |5200.0       
-100        |400.0        
-NULL       |NULL         
+1          |2              
+---------------------------
+0          |200.0          
+0          |5200.0         
+100        |400.0          
+NULL       |NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- distinct and group by
 select distinct sum(i) from t group by i, dt;
@@ -1730,9 +1730,9 @@ ij> insert into tmp values (2147483647),
                      (2147483647);
 9 rows inserted/updated/deleted
 ij> select sum(x) from tmp;
-1                     
-----------------------
-1.9327352823E10       
+1                       
+------------------------
+1.9327352823E10         
 ij> drop table tmp;
 0 rows inserted/updated/deleted
 ij> -- drop tables
@@ -1889,13 +1889,13 @@ ij> select max(v) from empty;
 --------------------------------------------------
 NULL                                              
 ij> select max(d) from empty;
-1                     
-----------------------
-NULL                  
+1                       
+------------------------
+NULL                    
 ij> select max(r) from empty;
-1            
--------------
-NULL         
+1              
+---------------
+NULL           
 ij> select max(dt) from empty;
 1         
 ----------
@@ -1946,11 +1946,11 @@ ij> select max(v) from empty group by v;
 1                                                 
 --------------------------------------------------
 ij> select max(d) from empty group by d;
-1                     
-----------------------
+1                       
+------------------------
 ij> select max(r) from empty group by r;
-1            
--------------
+1              
+---------------
 ij> select max(dt) from empty group by dt;
 1         
 ----------
@@ -1998,14 +1998,14 @@ ij> select max(v) from t;
 this is duplicated                                
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(d) from t;
-1                     
-----------------------
-200.0                 
+1                       
+------------------------
+200.0                   
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(r) from t;
-1            
--------------
-200.0        
+1              
+---------------
+200.0          
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(dt) from t;
 1         
@@ -2073,18 +2073,18 @@ this is duplicated                      
 NULL                                              
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(d) from t group by d;
-1                     
-----------------------
-100.0                 
-200.0                 
-NULL                  
+1                       
+------------------------
+100.0                   
+200.0                   
+NULL                    
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(r) from t group by r;
-1            
--------------
-100.0        
-200.0        
-NULL         
+1              
+---------------
+100.0          
+200.0          
+NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select max(dt) from t group by dt;
 1         
@@ -2142,9 +2142,9 @@ ij> select max(1.1) from t;
 ----
 1.1 
 ij> select max(1e1) from t;
-1                     
-----------------------
-10.0                  
+1                       
+------------------------
+10.0                    
 ij> select max(X'11') from t;
 1   
 ----
@@ -2180,11 +2180,11 @@ ij> select max(1.1) from t group by dc;
 1.1 
 1.1 
 ij> select max(1e1) from t group by d;
-1                     
-----------------------
-10.0                  
-10.0                  
-10.0                  
+1                       
+------------------------
+10.0                    
+10.0                    
+10.0                    
 ij> select max(X'11') from t group by b;
 1   
 ----
@@ -2422,13 +2422,13 @@ ij> select min(v) from empty;
 --------------------------------------------------
 NULL                                              
 ij> select min(d) from empty;
-1                     
-----------------------
-NULL                  
+1                       
+------------------------
+NULL                    
 ij> select min(r) from empty;
-1            
--------------
-NULL         
+1              
+---------------
+NULL           
 ij> select min(dt) from empty;
 1         
 ----------
@@ -2479,11 +2479,11 @@ ij> select min(v) from empty group by v;
 1                                                 
 --------------------------------------------------
 ij> select min(d) from empty group by d;
-1                     
-----------------------
+1                       
+------------------------
 ij> select min(r) from empty group by r;
-1            
--------------
+1              
+---------------
 ij> select min(dt) from empty group by dt;
 1         
 ----------
@@ -2531,14 +2531,14 @@ ij> select min(v) from t;
 noone is here                                     
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(d) from t;
-1                     
-----------------------
-100.0                 
+1                       
+------------------------
+100.0                   
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(r) from t;
-1            
--------------
-100.0        
+1              
+---------------
+100.0          
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(dt) from t;
 1         
@@ -2606,18 +2606,18 @@ this is duplicated                      
 NULL                                              
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(d) from t group by d;
-1                     
-----------------------
-100.0                 
-200.0                 
-NULL                  
+1                       
+------------------------
+100.0                   
+200.0                   
+NULL                    
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(r) from t group by r;
-1            
--------------
-100.0        
-200.0        
-NULL         
+1              
+---------------
+100.0          
+200.0          
+NULL           
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select min(dt) from t group by dt;
 1         
@@ -2675,9 +2675,9 @@ ij> select min(1.1) from t;
 ----
 1.1 
 ij> select min(1e1) from t;
-1                     
-----------------------
-10.0                  
+1                       
+------------------------
+10.0                    
 ij> select min(X'11') from t;
 1   
 ----
@@ -2713,11 +2713,11 @@ ij> select min(1.1) from t group by dc;
 1.1 
 1.1 
 ij> select min(1e1) from t group by d;
-1                     
-----------------------
-10.0                  
-10.0                  
-10.0                  
+1                       
+------------------------
+10.0                    
+10.0                    
+10.0                    
 ij> select min(X'11') from t group by b;
 1   
 ----

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out Wed Feb 20 04:42:57 2013
@@ -769,9 +769,9 @@ ij> insert into ovf_real values (+3.402E
 ij> insert into ovf_real values (+3.402E+38 - 2);
 1 row inserted/updated/deleted
 ij> select avg(i) from ovf_real;
-1            
--------------
-3.402E38     
+1              
+---------------
+3.402E38       
 ij> drop table ovf_real;
 0 rows inserted/updated/deleted
 ij> -- Test that AVG is not limited by columns type precision
@@ -785,9 +785,9 @@ ij> insert into ovf_double values (+1.79
 ij> insert into ovf_double values (+1.79769E+308 - 2);
 1 row inserted/updated/deleted
 ij> select avg(i) from ovf_double;
-1                     
-----------------------
-1.79769E308           
+1                       
+------------------------
+1.79769E308             
 ij> drop table ovf_double;
 0 rows inserted/updated/deleted
 ij> --------------------------------------
@@ -917,4 +917,4 @@ ij> select i from tmax where substr('abc
 ERROR 42903: Invalid use of an aggregate function.
 ij> drop table tmax;
 0 rows inserted/updated/deleted
-ij> 
+ij> 
\ No newline at end of file

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/backupRestore.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/backupRestore.out?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/backupRestore.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/backupRestore.out Wed Feb 20 04:42:57 2013
@@ -100,23 +100,23 @@ ij> disconnect;
 ij> ---perform a rollforward recovery
 connect 'wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';
 ij> select * from x;
-X                     |Y          
-----------------------------------
-1.0                   |1          
-10.0                  |1          
-20.0                  |1          
-1.0                   |1          
-10.0                  |1          
-20.0                  |1          
-1.0                   |1          
-10.0                  |1          
-20.0                  |1          
-1.0                   |1          
-10.0                  |1          
-20.0                  |1          
-1.0                   |1          
-10.0                  |1          
-20.0                  |1          
+X                       |Y          
+------------------------------------
+1.0                     |1          
+10.0                    |1          
+20.0                    |1          
+1.0                     |1          
+10.0                    |1          
+20.0                    |1          
+1.0                     |1          
+10.0                    |1          
+20.0                    |1          
+1.0                     |1          
+10.0                    |1          
+20.0                    |1          
+1.0                     |1          
+10.0                    |1          
+20.0                    |1          
 ij> select cast (dv(x) as dec(5,2)) from x;
 1      
 -------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out?rev=1448002&r1=1448001&r2=1448002&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out Wed Feb 20 04:42:57 2013
@@ -287,9 +287,9 @@ ij> values (cast (1.1 as bigint));
 --------------------
 1                   
 ij> values (cast (1.1 as double precision));
-1                     
-----------------------
-1.1                   
+1                       
+------------------------
+1.1                     
 ij> values (cast (1.1 as numeric(2,1)));
 1   
 ----
@@ -307,13 +307,13 @@ ij> values (cast (1.1 as decimal(2,0)));
 ---
 1  
 ij> values (cast (1.1 as float));
-1                     
-----------------------
-1.1                   
+1                       
+------------------------
+1.1                     
 ij> values (cast (1.1 as real));
-1            
--------------
-1.1          
+1              
+---------------
+1.1            
 ij> values (cast (1.9 as int));
 1          
 -----------
@@ -327,9 +327,9 @@ ij> values (cast (1.9 as bigint));
 --------------------
 1                   
 ij> values (cast (1.9 as double precision));
-1                     
-----------------------
-1.9                   
+1                       
+------------------------
+1.9                     
 ij> values (cast (1.9 as numeric(2,1)));
 1   
 ----
@@ -347,13 +347,13 @@ ij> values (cast (1.9 as decimal(2,0)));
 ---
 1  
 ij> values (cast (1.9 as float));
-1                     
-----------------------
-1.9                   
+1                       
+------------------------
+1.9                     
 ij> values (cast (1.9 as real));
-1            
--------------
-1.9          
+1              
+---------------
+1.9            
 ij> -- bug 4352,4358 loss of precision on casts
 --   9223372036854775807 is Long::MAX_VALUE
 values (
@@ -883,15 +883,15 @@ ij> select cast(v as char varying(10)) f
 varchar   
 NULL      
 ij> select cast(d as double precision) from tab1;
-1                     
-----------------------
-1.1                   
-NULL                  
+1                       
+------------------------
+1.1                     
+NULL                    
 ij> select cast(r as float) from tab1;
-1                     
-----------------------
-1.100000023841858     
-NULL                  
+1                       
+------------------------
+1.100000023841858       
+NULL                    
 ij> select cast(dt as date) from tab1;
 1         
 ----------
@@ -936,15 +936,15 @@ NULL      
 ij> select cast(i as char varying(10)) from tab1;
 ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
 ij> select cast(i as double precision) from tab1;
-1                     
-----------------------
-1.0                   
-NULL                  
+1                       
+------------------------
+1.0                     
+NULL                    
 ij> select cast(i as float) from tab1;
-1                     
-----------------------
-1.0                   
-NULL                  
+1                       
+------------------------
+1.0                     
+NULL                    
 ij> select cast(i as date) from tab1;
 ERROR 42846: Cannot convert types 'INTEGER' to 'DATE'.
 ij> select cast(i as time) from tab1;
@@ -1095,22 +1095,22 @@ ij> insert into t1 (lvc) values cast(nul
 1 row inserted/updated/deleted
 ij> -- expect 10 rows of nulls
 select * from t1;
-BT  |BTV |C                             |D                     |I          |R            |S     |DC                 |NUM                |DT        |T       |TS                           |V                             |LVC                                                                                                                             
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+BT  |BTV |C                             |D                       |I          |R              |S     |DC                 |NUM                |DT        |T       |TS                           |V                             |LVC                                                                                                                             
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
 ij> -- make sure casting works correctly on nulls
 select cast (bt as char(1) for bit data) from t1;
 1   
@@ -1164,39 +1164,39 @@ NULL                          
 NULL                          
 NULL                          
 ij> select cast (d as double precision) from t1;
-1                     
-----------------------
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
-NULL                  
+1                       
+------------------------
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
+NULL                    
 ij> select cast (r as real) from t1;
-1            
--------------
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
-NULL         
+1              
+---------------
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
+NULL           
 ij> select cast (s as smallint) from t1;
 1     
 ------
@@ -1381,21 +1381,21 @@ ij> execute q15 using 'values char(65432
 ij> execute q16 using 'values char(987654)';
 1 row inserted/updated/deleted
 ij> select * from t1;
-BT  |BTV |C                             |D                     |I          |R            |S     |DC                 |NUM                |DT        |T       |TS                           |V                             |LVC                                                                                                                             
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-aa  |NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|aa  |NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|123456                        |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |123456.78             |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |4321       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |12321 |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |123456             |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |123456             |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |9876-05-04|NULL    |NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |01:02:34|NULL                         |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |9876-05-04 01:02:34.0        |NULL                          |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |654321                        |NULL                                                                                                                            
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL         |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |987654                                                                                                                          
+BT  |BTV |C                             |D                       |I          |R              |S     |DC                 |NUM                |DT        |T       |TS                           |V                             |LVC                                                                                                                             
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+aa  |NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|aa  |NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|123456                        |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |123456.78               |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |4321       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |12321 |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |123456             |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |123456             |NULL               |NULL      |NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |9876-05-04|NULL    |NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |01:02:34|NULL                         |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |9876-05-04 01:02:34.0        |NULL                          |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |654321                        |NULL                                                                                                                            
+NULL|NULL|NULL                          |NULL                    |NULL       |NULL           |NULL  |NULL               |NULL               |NULL      |NULL    |NULL                         |NULL                          |987654                                                                                                                          
 ij> -- clean up t1
 delete from t1;
 13 rows inserted/updated/deleted
@@ -1685,12 +1685,12 @@ ij> select cast (aliasinfo as BIGINT) fr
 --------------------
 ERROR XCL12: An attempt was made to put a data value of type 'org.apache.derby.catalog.types.RoutineAliasInfo' into a data value of type 'BIGINT'.
 ij> select cast (aliasinfo as REAL) from sys.sysaliases;
-1            
--------------
+1              
+---------------
 ERROR XCL12: An attempt was made to put a data value of type 'org.apache.derby.catalog.types.RoutineAliasInfo' into a data value of type 'REAL'.
 ij> select cast (aliasinfo as DOUBLE) from sys.sysaliases;
-1                     
-----------------------
+1                       
+------------------------
 ERROR XCL12: An attempt was made to put a data value of type 'org.apache.derby.catalog.types.RoutineAliasInfo' into a data value of type 'DOUBLE'.
 ij> select cast (aliasinfo as DECIMAL(5,4)) from sys.sysaliases;
 1      
@@ -1729,4 +1729,4 @@ ij> select cast (aliasinfo as LONG VARCH
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 INSTALL_JAR(IN "URL" VARCHAR(256),IN "JAR" VARCHAR(128),IN "DEPLOY" INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA MODIFIES SQL DA&
-ij> 
+ij> 
\ No newline at end of file



Mime
View raw message