[ 
https://issues.apache.org/jira/browse/HIVE-26355?focusedWorklogId=784810&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-784810
 ]

ASF GitHub Bot logged work on HIVE-26355:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jun/22 16:14
            Start Date: 25/Jun/22 16:14
    Worklog Time Spent: 10m 
      Work Description: wecharyu opened a new pull request, #3406:
URL: https://github.com/apache/hive/pull/3406

   
   ### What changes were proposed in this pull request?
   Fix a bug in comparing column fields between old table and new table.
   
   
   ### Why are the changes needed?
   Hive is case-insensitive in field name, but some engines are case-sensitive, 
so when calling `alter_table` the existing column name may not be equal because 
of the case.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   We add two unit tests, can be run with command:
   ```bash
   $ mvn test 
-Dtest=org.apache.hadoop.hive.metastore.utils.TestMetaStoreServerUtils -pl 
:hive-standalone-metastore-server
   ```
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 784810)
    Remaining Estimate: 0h
            Time Spent: 10m

> Column compare should be case insensitive for name
> --------------------------------------------------
>
>                 Key: HIVE-26355
>                 URL: https://issues.apache.org/jira/browse/HIVE-26355
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Wechar
>            Assignee: Wechar
>            Priority: Major
>             Fix For: 4.0.0-alpha-2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hive stores all name related value as lower case, such as db_name, tbl_name, 
> col_name etc. But the compare of {{FieldSchema}} does not ignore the case of 
> name, which may cause incorrect result of compare.
> *Bug Description:*
> Some computing engines are case sensitive for column name. For example, Spark 
> will add a table property to save the column fields when creating a table, 
> and will replace column fields with this property when fetching table fields.
> When calling {{*ALTER TABLE ... ADD COLUMNS*}}, the compare of fields between 
> old table and new table will be not expected, and the ADD COLUMNS operation 
> will be cascaded to PARTITIONS, which is unnecessary and time consuming if 
> the table has many partitions.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to