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 "Mike Matrigali (JIRA)" <ji...@apache.org> on 2007/05/27 22:36:16 UTC

[jira] Created: (DERBY-2710) disable dynamic like optimization for collated databases

disable dynamic like optimization for collated databases
--------------------------------------------------------

                 Key: DERBY-2710
                 URL: https://issues.apache.org/jira/browse/DERBY-2710
             Project: Derby
          Issue Type: Sub-task
            Reporter: Mike Matrigali




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


[jira] Updated: (DERBY-2710) disable dynamic like optimization for collated databases

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-2710:
----------------------------------


thanks, so I will throw an error is any of the 3 is a mismatch.   Can you give me a pointer to the code of an example where we throw the error for the = case, and I will make the change in the like code.

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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


[jira] Updated: (DERBY-2710) disable dynamic like optimization for collated databases

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-2710:
----------------------------------


what is the expected result of a LIKE clause with mismatched collations.  So example is wher c1 like c2.
case 1) c1 is BASIC collation, c2 TERRITORY collation
case 2) c1 is TERRITORY collation, c2 is BASIC collation

should this just behave the same as where c1 = c2 with different collation types, which I believe just throws an error.

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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


[jira] Resolved: (DERBY-2710) disable dynamic like optimization for collated databases

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali resolved DERBY-2710.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0

disabled < and >= like optimization for non default collated like clauses.  commit # 542553

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>             Fix For: 10.3.0.0
>
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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


[jira] Commented: (DERBY-2710) disable dynamic like optimization for collated databases

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

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

The collation rule for c1 like c2 should be same as c1 = c2 as per SQL specification. 

As per SQL spec, Section 8.5 <like predicate>, Syntax Rules 3d), 
"The collation used for <like predicate> is determined by applying Subclause 9.13, "Collation determination", with operands CVE, PC, and (if specified) EC."

As per SQL spec, Section 8.2 <comparison predicate>, General Rules 3a),
"Let CS be the collation as determined by Subclause 9.13, "Collation determination", for the declared types of the two character strings."

Please let me know if you have any further questions in this area.

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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


[jira] Commented: (DERBY-2710) disable dynamic like optimization for collated databases

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

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

The code for collation checking for = operator is in DataTypeDescriptor.comparable method.

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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


[jira] Updated: (DERBY-2710) disable dynamic like optimization for collated databases

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-2710:
----------------------------------

          Component/s: SQL
          Description: 
I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
optimization.
    Affects Version/s: 10.3.0.0
             Assignee: Mike Matrigali

> disable dynamic like optimization for collated databases
> --------------------------------------------------------
>
>                 Key: DERBY-2710
>                 URL: https://issues.apache.org/jira/browse/DERBY-2710
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mike Matrigali
>         Assigned To: Mike Matrigali
>
> I think Code needs to be added to opensource/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
> to disable like optimization for databases with non-default collation.  There is left over code in this routine that says it disables it for national char by adding a cast to one of the two sides which I assume then stops some other code from considering the 
> optimization.

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