You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Vivek Ratan (JIRA)" <ji...@apache.org> on 2007/10/04 12:33:51 UTC

[jira] Commented: (HADOOP-1994) Variable names generated by Record I/O should not clash with user fields

    [ https://issues.apache.org/jira/browse/HADOOP-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532379 ] 

Vivek Ratan commented on HADOOP-1994:
-------------------------------------

One simple and effective solution is to prefix generated variable names with a special string which users are unlikely to use. I've made changes (which show up in the patch for HADOOP-1883), where we prefix variables with "__rio__". As long as DDL users do not define field names that begin with "__rio__" (which is unlikely), our code's fine. This string can easily be changed if required (it's a const setting).

> Variable names generated by Record I/O should not clash with user fields
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-1994
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1994
>             Project: Hadoop
>          Issue Type: Bug
>            Reporter: Vivek Ratan
>            Assignee: Vivek Ratan
>
> The code (Java and C++) spit out by the Record I/O compiler contains variables. We need to make sure these variable names don't clash with names used by users in the DDL, otherwise the generated code will not compile. Variable names such as 'a', 'peer', etc, are used. We need better names. For example, if I have a DDL of the form
> {code}
> class s1 {
>   int a;
>   boolean peer;
>   int a_;
> }
> {code}
> Both the Java and C++ code will not compile. 

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