okumin opened a new pull request, #4896:
URL: https://github.com/apache/hive/pull/4896

   ### What changes were proposed in this pull request?
   
   This PR would add explicit type validations for the SPLIT UDF.
   
   ### Why are the changes needed?
   
   Because we'd like to show better error messages. It should be helpful for 
users, and administrators who are monitoring errors. The original message is 
too primitive.
   
   ```
   0: jdbc:hive2://hive-hiveserver2:10000/defaul> select split(array('a,b,c'), 
',');
   Error: Error while compiling statement: FAILED: ClassCastException 
org.apache.hadoop.hive.serde2.objectinspector.StandardConstantListObjectInspector
 cannot be cast to 
org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector 
(state=42000,code=40000)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Error messages can change.
   
   ### Is the change a dependency upgrade?
   
   No.
   
   ### How was this patch tested?
   
   I added integration tests.


-- 
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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to