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

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

                Author: ASF GitHub Bot
            Created on: 23/Mar/21 15:02
            Start Date: 23/Mar/21 15:02
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request #2107:
URL: https://github.com/apache/hive/pull/2107


   ### What changes were proposed in this pull request?
   
   1. Refactor GenericUDFBaseCompare#initialize to allow equalities between
   MAP/LIST/STRUCT types and improve readability.
   2. Add positive and negative parameterized tests for GenericUDF#initialize
   method with various argument types.
   3. Re-work and unify messages in UDFArgumentException when types do not
   match.
   4. Add positive qtests for MAP, LIST, and, STRUCT types and different UDFs.
   
   ### Why are the changes needed?
   1. Allow simple comparisons between non primitive types.
   2. Avoid unexpected parse and runtime exceptions when performing comparisons 
involving MAP, LIST, STRUCT types.
   3. Extend test coverage of comparisons operators on STRUCT, LIST, MAP, and 
primitive types.
   
   ### Does this PR introduce _any_ user-facing change?
   Allows more SQL queries and provides proper failure information when 
comparisons are not supported.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest=TestGenericUDFInitializeOnCompareUDF
   mvn test -Dtest=TestMiniLlapLocalCliDriver 
-Dqfile="equals_map_types.q,equals_list_types.q,equals_struct_types.q" 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


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

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

> Support simple equality operations between MAP data types
> ---------------------------------------------------------
>
>                 Key: HIVE-24886
>                 URL: https://issues.apache.org/jira/browse/HIVE-24886
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Planning, Query Processor
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently equality operations between MAP data types work in some very 
> limited cases e.g:
> {code:sql}
> create table table_map_types (id int, c1 map<int,int>, c2 map<int,int>);
> select id from table_map_types where map(1,1) IN (map(1,1), map(1,2), 
> map(1,3)); 
> {code}
> but this feature was never introduced explicitly (zero tests & JIRAs around 
> the subject) and the vast majority of queries involving comparisons between 
> MAP types now fail at compile time.
> The goal of this issue is to support simple equality operations:
> * EQUALS(=)
> * NOT_EQUALS(<>),
> * IN,
> * IS DISTINCT FROM,
> * IS NOT DISTINCT FROM
> between MAP data types when the compared (MAP) types are identical.



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

Reply via email to