hongzhi-gao commented on PR #18878:
URL: https://github.com/apache/iotdb/pull/18878#issuecomment-6186966145

   @Caideyipi Addressed the nine items from [your 
review](https://github.com/apache/iotdb/pull/18878#pullrequestreview-5529423754)
 in d22756239f9:
   
   1. **Optional `SQLDescribeCol` type pointer:** resolve the type into a local 
whenever either type or column size is requested. A size-only request now works 
with `DataTypePtr == nullptr`, including the Unicode wrapper.
   2. **`SQLColAttribute` type width/sign:** obtain an `SQLSMALLINT` local and 
assign it to the full `SQLLEN` output. Regression cases include `SQL_WVARCHAR`, 
`SQL_BIT`, and `SQL_BIGINT`.
   3. **FLOAT/DOUBLE to `SQL_C_NUMERIC`:** removed the integer-part conversion. 
This conversion now explicitly returns `SQL_ERROR`/`07006` and leaves the 
output untouched, including when an ARD scale is requested. Approximate values 
remain available through `SQL_C_FLOAT`/`SQL_C_DOUBLE`. Integer-to-numeric 
conversion honors bound-column and `SQLGetData(SQL_ARD_TYPE)` precision/scale, 
reports `22003` for overflow, and `SQL_SUCCESS_WITH_INFO`/`01S07` when a 
negative scale discards digits. Direct `SQLGetData(SQL_C_NUMERIC)` uses the 
documented driver defaults (precision 38, scale 0).
   4. **`INT64_MIN`:** calculate its magnitude using unsigned subtraction, then 
populate the little-endian numeric bytes. Tests verify both 64-bit extrema and 
`INT32_MIN` without a floating-point intermediate.
   5. **Child handle lifetime:** centrally release statements/result sets and 
all implicit/explicit descriptors before closing the Session or destroying the 
DBC. Track live handle addresses so subsequent `SQLFreeHandle` cleanup calls 
return `SQL_INVALID_HANDLE` without reading freed memory. Tests cover shared 
explicit descriptors, implicit descriptors, 
disconnect-then-free-parent-then-free-child, and direct parent destruction.
   6. **Label length probes:** call `getColName` for `SQL_DESC_LABEL` even with 
a null output buffer; A/W length-only calls are covered.
   7. **Negative buffer lengths:** validate before clearing/copying output, 
return `HY090`, and preserve the caller's sentinel buffer.
   8. **Column-name truncation:** return `SQL_SUCCESS_WITH_INFO` and `01004`; 
`SQLDescribeCol` still fills its other requested outputs before returning the 
warning. A/W paths and zero/short buffers are covered.
   9. **Tree identifier quoting:** return a backtick for tree-model 
`SQL_IDENTIFIER_QUOTE_CHAR`; table-model double quotes remain covered.
   
   Validation completed locally: Windows and manylinux CTest **4/4 each**, 
including new unit regressions and direct exported-ABI probes against the built 
DLL/shared library; Windows/Linux CPack; Linux GLIBC <= 2.28/dependency checks; 
Spotless and RAT. A real disposable server also passed the plain-mode Session 
checks plus Windows **System.Data.Odbc and MSDASQL/ADO** consumers. This is not 
a claim of an Excel/Power Query UI run.
   
   The [new package/TLS/application 
CI](https://github.com/hongzhi-gao/iotdb/actions/runs/38699496371) has been 
triggered for this commit; its remote results are still pending.
   


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

Reply via email to