You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2007/05/22 08:29:16 UTC

[jira] Created: (DERBY-2678) Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE

Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE
--------------------------------------------------------------------------------------------------------------

                 Key: DERBY-2678
                 URL: https://issues.apache.org/jira/browse/DERBY-2678
             Project: Derby
          Issue Type: New Feature
          Components: SQL
    Affects Versions: 10.3.0.0
            Reporter: Mamta A. Satoor


The collation methods in Derby should follow the rules defined by SQL spec in Section 9.13 Collation determination Syntax Rules 2 and 3e. 

According to those rules, 
1)at least one operand shall have a declared type collation (that means if the comparison is sysChar1|userChar1 > sysChar2|userChar2, then such a comparison will fail because both sides of > operator have collation derivation of NONE. But if the comparison is sysChar|userChar1 > sysChar2, then it shouldn't fail because although the left hand operand has collation derivation of NONE, the right hand operand has collation derivation of IMPLICIT and hence the comparison is possible). 
2)every operand whose collation derivation is IMPLICIT shall have the same declared type collation (that means if the comparison is sysChar1 > userChar1WithTerritoryBasedCollation, then such a comparison will fail because left operand has collation derivation as IMPLICIT and collation type as UCS_BASIC and the right operand has collation derivation IMPLICIT and collation type as TERRITORY_BASED. But if the comparison is sysChar1 > sysChar2, then comparison won't fail because both the operands have same collation derivation and type.) 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2678) Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497731 ] 

Mamta A. Satoor commented on DERBY-2678:
----------------------------------------

Derby 10.3 implements the item number 2) above but item number 1) has not been tackled yet.

> Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2678
>                 URL: https://issues.apache.org/jira/browse/DERBY-2678
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>
> The collation methods in Derby should follow the rules defined by SQL spec in Section 9.13 Collation determination Syntax Rules 2 and 3e. 
> According to those rules, 
> 1)at least one operand shall have a declared type collation (that means if the comparison is sysChar1|userChar1 > sysChar2|userChar2, then such a comparison will fail because both sides of > operator have collation derivation of NONE. But if the comparison is sysChar|userChar1 > sysChar2, then it shouldn't fail because although the left hand operand has collation derivation of NONE, the right hand operand has collation derivation of IMPLICIT and hence the comparison is possible). 
> 2)every operand whose collation derivation is IMPLICIT shall have the same declared type collation (that means if the comparison is sysChar1 > userChar1WithTerritoryBasedCollation, then such a comparison will fail because left operand has collation derivation as IMPLICIT and collation type as UCS_BASIC and the right operand has collation derivation IMPLICIT and collation type as TERRITORY_BASED. But if the comparison is sysChar1 > sysChar2, then comparison won't fail because both the operands have same collation derivation and type.) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2678) Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499914 ] 

Mamta A. Satoor commented on DERBY-2678:
----------------------------------------

The rule 1 above really has 2 rules into it. 
1a)One is to make sure that atleast one operand has non-NONE collation derivation. If not, then Derby should throw an exception. I have added DERBY-2725 for this work.
1b)Second rule is as long as there is one operand with non-NONE collation, we should be able to do the collation operation using that non-NONE collation. Derby does not yet implement that. When we get to this rule, the work can go in either as part of this current Jira entry or we can create a new Jira entry as we did for Rule 1a)

> Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2678
>                 URL: https://issues.apache.org/jira/browse/DERBY-2678
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>
> The collation methods in Derby should follow the rules defined by SQL spec in Section 9.13 Collation determination Syntax Rules 2 and 3e. 
> According to those rules, 
> 1)at least one operand shall have a declared type collation (that means if the comparison is sysChar1|userChar1 > sysChar2|userChar2, then such a comparison will fail because both sides of > operator have collation derivation of NONE. But if the comparison is sysChar|userChar1 > sysChar2, then it shouldn't fail because although the left hand operand has collation derivation of NONE, the right hand operand has collation derivation of IMPLICIT and hence the comparison is possible). 
> 2)every operand whose collation derivation is IMPLICIT shall have the same declared type collation (that means if the comparison is sysChar1 > userChar1WithTerritoryBasedCollation, then such a comparison will fail because left operand has collation derivation as IMPLICIT and collation type as UCS_BASIC and the right operand has collation derivation IMPLICIT and collation type as TERRITORY_BASED. But if the comparison is sysChar1 > sysChar2, then comparison won't fail because both the operands have same collation derivation and type.) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2678) Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502623 ] 

Mamta A. Satoor commented on DERBY-2678:
----------------------------------------

There are some test cases for 1b) above in CollationTest.java They should all pass but they do not because we just check if the 2 sides of the collation operation have same derivation or not and if not, then we throw an exception. But for the case where one side has collation derivation of NONE and the other side has IMPLICIT, we should do the collation using the collation type of the side that has collation derivation of NONE. Once we fix this, the CollationTest will fail and will need to be fixed. I have added comments in that test wherever this bug applies. Please fix those comments in the test when you are fixing this bug. I committed the comments in that test case using revision 545381.

> Derby should follow SQL standards when operand(s) in the collation operation have collation derivation of NONE
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2678
>                 URL: https://issues.apache.org/jira/browse/DERBY-2678
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>
> The collation methods in Derby should follow the rules defined by SQL spec in Section 9.13 Collation determination Syntax Rules 2 and 3e. 
> According to those rules, 
> 1)at least one operand shall have a declared type collation (that means if the comparison is sysChar1|userChar1 > sysChar2|userChar2, then such a comparison will fail because both sides of > operator have collation derivation of NONE. But if the comparison is sysChar|userChar1 > sysChar2, then it shouldn't fail because although the left hand operand has collation derivation of NONE, the right hand operand has collation derivation of IMPLICIT and hence the comparison is possible). 
> 2)every operand whose collation derivation is IMPLICIT shall have the same declared type collation (that means if the comparison is sysChar1 > userChar1WithTerritoryBasedCollation, then such a comparison will fail because left operand has collation derivation as IMPLICIT and collation type as UCS_BASIC and the right operand has collation derivation IMPLICIT and collation type as TERRITORY_BASED. But if the comparison is sysChar1 > sysChar2, then comparison won't fail because both the operands have same collation derivation and type.) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.