You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/02/25 07:40:24 UTC

[GitHub] [hive] dh20 opened a new pull request #3054: [HIVE-25983] CONCAT_ The error thrown by WS function when the array passed in is a non string array is a problem

dh20 opened a new pull request #3054:
URL: https://github.com/apache/hive/pull/3054


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   CONCAT_ The error thrown by WS function when the array passed in is a non string array is a problem。
   This error still prompts the user to pass in an array, but the real error is not to pass in an array. It should prompt the user to pass in an array of string type
   
   
   ### Why are the changes needed?
   
   fix bug,Improve user experience
   
   
   ### Does this PR introduce _any_ user-facing change?
   not
   
   
   ### How was this patch tested?
   not
   


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] kasakrisz commented on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
kasakrisz commented on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1054399429


   @dh20 
   Thanks, for contributing to Hive.
   Could you please add a test case. IIUC the error message is not referring the real error so it can be a negative test case like:
   https://github.com/apache/hive/blob/master/ql/src/test/queries/clientnegative/udf_in.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.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] dh20 edited a comment on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
dh20 edited a comment on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1054926825


   @kasakrisz  I submitted a test case that will throw this error [argument 2 of function concat_ws must be "string or array", but "array" was found.] However, this error is wrong, because what the user passes in is indeed an array. The real error is that it prompts the user that the element in this tenant is not a string type, for example [array 2 of function concat_ws must be "string or array < string >", but the element in this array is int was found]


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] kasakrisz commented on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
kasakrisz commented on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1055193248


   @dh20 
   I run the following query using apache master
   ```
   SELECT concat_ws(',', array(1, 2, 3));
   ```
   and got
   ```
   Argument 2 of function CONCAT_WS must be "string or array<string>", but "array<int>" was found.
   ```
   This seems to be ok since it clearly indicates that an `array of int` was passed but an `array of string` is expected.


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] dh20 commented on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
dh20 commented on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1053942150


   @kasakrisz Hi, Can you review this PR
   thanks!!!


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] dh20 commented on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
dh20 commented on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1055316709


   @kasakrisz Oh, yes. I see that this part of the code is the same as the lower version of the code, and there is no record of modification. Therefore, it is considered that the master branch has the same problem.
   Now it seems that this problem does not exist in the master branch. Thank you for reviewing PR for me!!!


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] dh20 commented on pull request #3054: HIVE-25983 The error thrown by CONCAT_WS function when the array passed in is a non string array is a problem

Posted by GitBox <gi...@apache.org>.
dh20 commented on pull request #3054:
URL: https://github.com/apache/hive/pull/3054#issuecomment-1054926825


   I submitted a test case that will throw this error [argument 2 of function concat_ws must be "string or array", but "array" was found.] However, this error is wrong, because what the user passes in is indeed an array. The real error is that it prompts the user that the element in this tenant is not a string type, for example [array 2 of function concat_ws must be "string or array < string >", but the element in this array is int was found]


-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org