db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DERBY-5246) Simplify bytecode generation for concatenation operator
Date Thu, 26 May 2011 12:25:48 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen resolved DERBY-5246.

          Resolution: Fixed
       Fix Version/s:
    Issue & fix info:   (was: [Patch Available])

Committed revision 1127886.

> Simplify bytecode generation for concatenation operator
> -------------------------------------------------------
>                 Key: DERBY-5246
>                 URL: https://issues.apache.org/jira/browse/DERBY-5246
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For:
>         Attachments: concat.diff
> ConcatenationOperatorNode generates bytecode that ensures the result object is not null
before calling the method that implements the operator. This breaks the pattern used by other
operators (which ensures that the result object is not null inside the method that implements
the operator, not in the generated bytecode), and it unnecessarily complicates the code in
> The comments indicate that the current approach was chosen to prevent the null check
from happening at execution time, but the generated bytecode does perform the null check at
execution time, so generating byte code for it shouldn't have any real benefit over writing
Java code for it. In general, implementing as much as possible of the execution time code
as Java code is preferred to implementing it directly as bytecode because it's easier to read
and debug Java code, and because the generated bytecode cannot be shared between execution
plans and take more memory.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message