db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r553735 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
Date Fri, 06 Jul 2007 05:13:13 GMT
Author: mamta
Date: Thu Jul  5 22:13:13 2007
New Revision: 553735

URL: http://svn.apache.org/viewvc?view=rev&rev=553735
Log:
DERBY-2777

TernaryOperatorNode was incorrectly setting up collation for non-character string type. Collation
only applies to character
string types. Also, fixed a comment to be more meaningful.



Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java?view=diff&rev=553735&r1=553734&r2=553735
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
Thu Jul  5 22:13:13 2007
@@ -599,9 +599,9 @@
 		** The result type of trim is varchar.
 		*/
 		setResultType(resultType);
-		//Result of TRIM should pick up the collation of the 1st argument
-		//to TRIM. The 1st argument to TRIM is represented by the variable
-		//receiver in this class.
+		//Result of TRIM should pick up the collation of the character string
+		//that is getting trimmed (which is variable receiver) because it has
+		//correct collation set on it.
 		getTypeServices().setCollationDerivation(
 				receiver.getTypeServices().getCollationDerivation());
 		getTypeServices().setCollationType(
@@ -687,9 +687,6 @@
 		{
 			rightOperand.setType(
 				new DataTypeDescriptor(TypeId.INTEGER_ID, true)); 
-			//collation of ? operand should be same as the compilation schema
-			rightOperand.setCollationUsingCompilationSchema(
-					StringDataValue.COLLATION_DERIVATION_IMPLICIT);
 		}
 
 		bindToBuiltIn();



Mime
View raw message