ashniku commented on code in PR #6412:
URL: https://github.com/apache/hive/pull/6412#discussion_r3045779366


##########
service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:
##########
@@ -179,6 +179,11 @@ private void prepare(QueryState queryState) throws 
HiveSQLException {
           try {
             final String queryId = queryState.getQueryId();
             log.info("Query timed out after: {} seconds. Cancelling the 
execution now: {}", queryTimeout, queryId);
+            setOperationException(new HiveSQLException(
+                "Query timed out after " + queryTimeout + " seconds",
+                "HYT00",

Review Comment:
   HYT00 is not a SQL Server–only code. It comes from the ODBC SQLSTATE list. 
In ODBC 3.x, HYT00 means “Timeout expired” (generic timeout, not specifically 
“login timeout”). SQL Server’s docs often show up in web search because they 
map ODBC states, but the same state is used for query / statement timeouts and 
other “timeout expired” situations when products follow ODBC-style SQLSTATEs.
   
   References:
   
   ==> Microsoft’s ODBC appendix lists ODBC error / SQLSTATE codes; HYT00 is 
documented there in the “Timeout expired” family (see [Appendix A: ODBC Error 
Codes](https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-ver16)
 — search the page for HYT00).
   ==> Broader context: HY = CLI/driver advisory category; T00 = timeout 
expired in that ODBC mapping (ODBC 2.x S1T00 was aligned to HYT00 in ODBC 3.x 
per [SQLSTATE 
Mappings](https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/sqlstate-mappings?view=sql-server-ver17)).
   So Hive reusing HYT00 for query timeout is consistent with “timeout expired” 
in ODBC/JDBC-style SQLSTATE usage, not an odd SQL Server login-only choice. The 
Learn article they found is one example of HYT00, not the definition of the 
code.



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