From the below , it does looks like tez session itself not initialized. Validate configuration from set -v , make sure everything fine and try re-running the query.
org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. Application application_1726980746968_0077 failed 1 times (global limit =2; local limit is =1) due to AM Container for appattempt_1726980746968_0077_000001 exited with exitCode: -1000
Failing this attempt.Diagnostics: [2024-10-13 10:30:27.706]Application application_1726980746968_0077 initialization failed (exitCode=255) with output: main : command provided 0
If you can't able to identify the incorrect configuration , raise a support case for the same.