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 "Laura Stewart (JIRA)" <ji...@apache.org> on 2007/10/31 16:40:51 UTC

[jira] Created: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

Update docs to address code improvments to LIKE (see Derby-2967)
----------------------------------------------------------------

                 Key: DERBY-3166
                 URL: https://issues.apache.org/jira/browse/DERBY-3166
             Project: Derby
          Issue Type: Bug
          Components: Documentation
            Reporter: Laura Stewart
            Assignee: Laura Stewart


Implement the required doc changes for collation to address the improvements to the LIKE operator.


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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Attachment: rrefsqlj23075.html
                cdevcollation.html

Mamta, I updated the attached files with the information about how Derby processes LIKE when using territory based collation.  Please check out the html files:
cdevcollation.html
rrefsqlj23075.html

In addition to these 2 files, there are two other files that I wasn't sure if they should be updated.
I'll add them to the JIRA issue. They are:
rrefattribupgrade.html
rtuntransform443.html

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, rrefsqlj23075.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

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

Thanks for working on the documentation part of DERBY-2967. I hope following information will be useful to you

**********************************************************
The following applies to territory based database
For LIKE, when comparing a pattern against a value string, we do the comparison of collation elements(s) for one character at a time for non-metacharacters. This is different than what is done for = operation. For =, we compare the collation elements for the entire string on left hand with the collation elements of the entire string on the right hand side.
For eg say we are working with a territory where character 'z' has same collation elements as 'xy'. For such a territory consider 2 clauses in WHERE clause
1)'zcb' = 'xycb' 
2)'zcb' LIKE 'xy_b'
For case 1), we will return TRUE because the collation elements for the entire string 'zcb' will match the collation elements of the entire string 'xycb'.
For case 2) though, we will return FALSE because collation element(s) for character 'z' does not match the collation element(s) for character 'x'. So, as can be seen, the LIKE operation is one character at a time whereas = operation is the entire string at a time. 
In addition,  the metacharacter _ in pattern for LIKE will consume *one* character in the string value. So for an eg clause 'xycb' LIKE '_cb' will return FALSE because metacharacter _ will consume 'x' and since 'c' does not match 'y', we will return FALSE.
**********************************************************

**********************************************************
The following applies to UCS_BASIC database
Also, just to be clear, in a UCS_BASIC database, for all of the 3 cases above, we will return FALSE because the comparison in UCS_BASIC is based on code point. So for test cases 1 and 2, since the code point for 'z' does not match the code point for 'x', we will return FALSE. And for test case 3, 'x' will be consumed by '_' but the code point for 'y' does not match the code point for 'c' and hence we will return FALSE.
**********************************************************

Hope this helps with your effort of documenting this.


> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Derby Info:   (was: [Patch Available])

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>             Fix For: 10.3.2.1
>
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Resolved: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart resolved DERBY-3166.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.2.1

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>             Fix For: 10.3.2.1
>
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

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

Laura, thanks for working on this doc item. Looks like the files impacted are cdevcollation.html, rrefsqli23075.html Let me know if rrefattribupgrade.html and rtuntransform443.html changed too.

As for cdevcollation.html, rrefsqli23075.html, the changes generally look pretty good. But I think the statement, "When LIKE comparisons are used with territory-based collation, Derby compares one character at a time for non-metacharacters. This is different than the way Derby processes = comparisons.", might sound like LIKE is handled differently for UCS_BASIC and terriotry based databases. For both kinds of databases, SQL specification requires us to do LIKE comparison one character at a time. This is not a biggie with UCS_BASIC because the unicode values for the entire string will be same as unicode value for individual characters in that string taken in the given sequence. But for territory based database, the collation elements returned for an entire string may not be same as individual collation element(s) one character at a time in that string in the given sequence. I hope this is not too confusing but what I am saying is one character at a time comparison for LIKE is not unique to territory based databases. May be rephrasing the sentence above as "When LIKE comparisons are used, Derby compares one character at a time for non-metacharacters. This is different than the way Derby processes = comparisons"

Another minor comment for cdevcollation.html, section Differences between LIKE and equal (=) comparisons. The first sentence should say When you use territory-based collation, the comparisons *can* return different results when you use the LIKE and equal (=) operators.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, derby3166._1.diff, rrefattribupgrade.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

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

I thought I would try to commit the patch attached to this jira entry but I keep getting 
$ patch -pO < Derby3166_2.diff
Hmm...  I can't seem to find a patch in there anywhere.

I didn't have a client for docs so I went through the following process. Maybe someone can tell me what I am doing wrong. In the mean time, if someone else has time, maybe they can commit the patch Derby3166_2.diff attched to this jira entry

mkdir opensourceDocs
cd opensourceDocs
svn co https://svn.apache.org/repos/asf/db/derby/docs/trunk/ .

Then I copied the patch into opensourceDocs directory and tried following
$ patch -pO < Derby3166_2.diff
Hmm...  I can't seem to find a patch in there anywhere.

Does anyone have an idea what am I doing wrong? Thanks

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

Posted by "Laura Stewart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539172 ] 

Laura Stewart commented on DERBY-3166:
--------------------------------------

This is very helpful Mamta. I will start working on updating the documentation.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549226 ] 

Myrna van Lunteren commented on DERBY-3166:
-------------------------------------------

Hm, I'm usually using patch -i <filename>. You do need to have the gnu version of patch.
Doing this the first time gave me some odd errors, but after I reverted,  opened the diff file and saved it again, I patch -i <new filename> worked.
Not sure what the difference is, if I svn diff now, and save the file, my diffing tools cannot see a difference between the original patch, and my svn diff result. 
Anyway, I'll build and if OK, I'll commit.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Derby Info: [Patch Available]

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549234 ] 

Myrna van Lunteren commented on DERBY-3166:
-------------------------------------------

committed to docs trunk with revision 601910

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Attachment: rrefsqlj23075.html
                cdevcollation.html
                Derby3166_2.diff

Thank you Mamta for reviewing this update. I changed the wording as you suggested.  I also moved the note
in the dev guide file up (out of the territory-based section) since the way LIKE is handled applies to both UCS_BASIC and territory-based). I have also added an updated patch file.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Attachment: derby3166._1.diff

This is the patch file that goes with the 2 updated html files.
cdevcollation.html
rrefsqli23075.html


> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, derby3166._1.diff, rrefattribupgrade.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Laura Stewart updated DERBY-3166:
---------------------------------

    Attachment: rtuntransform443.html
                rrefattribupgrade.html

These are files that could be updated for this JIRA issue.
But I'm not sure if it's appropriate:
rrefattribupgrade.html
rtuntransform443.html

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, rrefattribupgrade.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Updated: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

Myrna van Lunteren updated DERBY-3166:
--------------------------------------

    Fix Version/s:     (was: 10.3.2.1)
                   10.4.0.0

Adjusting fix version; this only went into trunk, not into the 10.3 branch.
If I need to backport this, please let me know.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>             Fix For: 10.4.0.0
>
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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


[jira] Commented: (DERBY-3166) Update docs to address code improvments to LIKE (see Derby-2967)

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

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

Laura, the changes look good. Thanks.

> Update docs to address code improvments to LIKE (see Derby-2967)
> ----------------------------------------------------------------
>
>                 Key: DERBY-3166
>                 URL: https://issues.apache.org/jira/browse/DERBY-3166
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Laura Stewart
>            Assignee: Laura Stewart
>         Attachments: cdevcollation.html, cdevcollation.html, derby3166._1.diff, Derby3166_2.diff, rrefattribupgrade.html, rrefsqlj23075.html, rrefsqlj23075.html, rtuntransform443.html
>
>
> Implement the required doc changes for collation to address the improvements to the LIKE operator.

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