[Bug] [Task] HiveCli SQL execution failed, but the task node shows success.
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
In the shell node, multiple SQL files are called using hive -f, and each file contains multiple SQL statements. When one of the SQL statements fails, the subsequent SQL statements continue to execute, and the status of the shell node is marked as successful.
What you expected to happen
In the shell node, after invoking SQL via hive -f, if there are failures in the SQL execution, the subsequent SQLs should not continue to execute, and the status of the shell node should be marked as failed.
How to reproduce
If there are 5 SQL commands in a Hive SQL file and the second command fails, the third, fourth, and fifth commands will still be executed. If these commands are executed successfully, the node will be marked as having executed successfully.
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
In the shell node, multiple SQL files are called using hive -f, and each file contains multiple SQL statements. When one of the SQL statements fails, the subsequent SQL statements continue to execute, and the status of the shell node is marked as successful.
What you expected to happen
In the shell node, after invoking SQL via hive -f, if there are failures in the SQL execution, the subsequent SQLs should not continue to execute, and the status of the shell node should be marked as failed.
How to reproduce
If there are 5 SQL commands in a Hive SQL file and the second command fails, the third, fourth, and fifth commands will still be executed. If these commands are executed successfully, the node will be marked as having executed successfully.
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.
Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.
The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?
Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.
The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?
I have not test this, but it might not fix this due to the multiple SQLS are been executed by one command, rather than multiple commands.
Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.
The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?
I have not test this, but it might not fix this due to the multiple SQLS are been executed by one command, rather than multiple commands.
Oh,This doesn't look like a very good solution for one command .I will check it .
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.
use multi shell command also need check each command status,we produced bugs in prod env
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.