You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2021/02/25 14:48:00 UTC

[jira] [Assigned] (HIVE-24830) Revise RowSchema mutability usage

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

Zoltan Haindrich reassigned HIVE-24830:
---------------------------------------


> Revise RowSchema mutability usage
> ---------------------------------
>
>                 Key: HIVE-24830
>                 URL: https://issues.apache.org/jira/browse/HIVE-24830
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>
> RowSchema is essentially a container class for a list of fields.
> * it can be constructed from a "list"
> * the list can be set
> * the list can be accessed
> none of the above methods try to protect the data inside; hence the following could easily  happen:
> {code}
> s=o1.getSchema();
> col=s.getCol("favourite")
> col.setInternalName("asd"); // will modify o1 schema
> newSchema.add(col);
> o2.setSchema(newSchema);
> o2.getSchema().get("asd").setInternalName("xxx"); // will modify o1 and o2 schema
> [...]
> {code}
> not sure how much of this is actually cruical; exploratory testrun revealed some cases
> https://github.com/apache/hive/pull/2019



--
This message was sent by Atlassian Jira
(v8.3.4#803005)