hongzhi-gao opened a new pull request, #18878:
URL: https://github.com/apache/iotdb/pull/18878

   ## Description
   
   Add a portable ODBC client for IoTDB's tree and table models, backed by the 
in-tree C++ Session SDK. The default transport is Session RPC, including 
verified TLS and mutual TLS; the existing HTTP REST transport remains available 
through `RESTFUL=1`.
   
   ### Driver behavior and application compatibility
   
   The driver provides the ODBC 3.8 ABI, forward-only/read-only cursors, column 
and rowset binding, explicit/implicit descriptors, prepared input parameters, 
parameter arrays, data-at-execution input, diagnostics, and capability 
discovery. Unsupported transactions, stored procedures, output parameters, 
bookmarks and asynchronous execution return explicit SQLSTATEs and are not 
advertised as supported.
   
   The implementation includes the following compatibility fixes:
   
   - Export Unicode `W` entry points for connection strings, SQL, catalog 
arguments, descriptions, descriptors and diagnostics. STRING/TEXT metadata uses 
`SQL_WVARCHAR`/`SQL_WLONGVARCHAR`, so .NET and MSDASQL/ADO request UTF-16 data 
instead of interpreting UTF-8 with the Windows ANSI code page.
   - Build fixed, correctly typed SQLTables/SQLColumns results from every 
source batch. Catalog/schema/type enumeration, empty results, wildcard/escape 
matching, per-table column ordinals, DATE/BOOLEAN metadata and synthetic 
tree-model time columns remain consistent across fetches. Pattern arguments are 
matched locally rather than inserted into metadata SQL.
   - Preserve explicit `time` projections and dotted aliases in table queries. 
Correct DATE sizes, legacy numeric C-type binding used by ADO, empty-string 
reads, type-info cursor reuse, and type descriptions for empty/all-NULL catalog 
results.
   - Parse REST metadata with empty `expressions`, retain declared REST types, 
convert DATE/BLOB values, and keep non-query responses separate from result 
sets.
   - Propagate Session batch-read failures as errors and close exhausted 
Session operations once.
   
   TLS configuration accepts `SSL`, `SSLCA`, `SSLCERT` and `SSLKEY` in 
connection strings, DSNs and Windows setup. CA verification and server identity 
checks are enabled; incomplete client credentials, certificate options with SSL 
disabled and TLS options combined with REST are rejected. Connection strings 
support braced values and escaped closing braces.
   
   ### Native build and packaging
   
   `with-odbc` enables the Maven module; CMake/CPack can also build it 
directly. Release scope is Windows x64 and Linux x86_64 with a glibc 2.28 
baseline. The driver links Session, Thrift, OpenSSL and curl statically, ships 
dependency licenses/NOTICE and build provenance, and does not require a 
separate C++ SDK, OpenSSL installation or VC redistributable. OS ODBC 
manager/installer libraries remain prerequisites.
   
   The shared C++ build adds scoped static-link/CRT options for ODBC while 
retaining standalone SDK defaults. Linux releases use the shared manylinux/GCC 
baseline and check imported libraries and maximum GLIBC symbol versions. 
Windows packages check the PE architecture and imported DLLs. Windows source 
builds use valid generated batch-file line endings and also reject negative 
process exit codes. SDK Windows packaging uses Boost source headers rather than 
toolchain-specific binary installers.
   
   ### Validation
   
   - Clean full distribution build on JDK 17: `mvn clean package -pl 
distribution -am -DskipTests`.
   - Maven ODBC package lifecycle, CMake Release build, all four CTest suites, 
Spotless, Windows dependency checks, CPack ZIP/SHA-512 generation, and local 
manylinux 2.28 packaging.
   - Extracted Windows release against a freshly built disposable 1C1D server: 
tree/table reads and writes, parameter arrays, small batch boundaries, REST, 
plain/TLS/mTLS connections, and negative certificate/identity cases.
   - Real Windows `System.Data.Odbc` and MSDASQL/ADO consumers: Unicode 
SQL/data, parameterized inserts, long text/emoji, NULL/empty strings, 
DATE/BOOLEAN, catalog browsing for both models, empty searches, and database 
changes. Tests use unique disposable databases and user DSNs, preserve normal 
registry-parent behavior, and stop only processes they launched.
   - Public-ABI HTTP-fixture regressions for catalog 
schemas/enumeration/patterns, Unicode lengths, REST types, empty strings and 
explicit time projection.
   - [ODBC package and integration 
CI](https://github.com/hongzhi-gao/iotdb/actions/runs/38604383431): all eight 
jobs passed, including extracted releases against real servers on Linux/Windows 
and clean Linux runtime loading on AlmaLinux 8, Ubuntu 22.04 and Ubuntu 24.04. 
[Final package provenance 
recheck](https://github.com/hongzhi-gao/iotdb/actions/runs/38606142295) is 
running for the final commit; the only change since the green run records the 
source commit correctly in container-built packages.
   - [C++ SDK package 
CI](https://github.com/hongzhi-gao/iotdb/actions/runs/38601397628): all eight 
package variants passed, covering Linux x86_64/aarch64, macOS x86_64/arm64, and 
VS2017/2019/2022/2026. This run uses commit ef42f10673f; the C++ SDK source and 
its packaging workflow/scripts are unchanged between that commit and the PR 
head.
   
   **Office verification scope:** .NET and Office's MSDASQL/ADO data path were 
exercised. A Microsoft Excel/Power Query UI run has not been performed: the 
local `Excel.Application` registration points to WPS, and hosted CI runners do 
not include Excel. The README includes 64-bit Excel installation/import/refresh 
instructions and records this distinction. TIMESTAMP query columns retain 
epoch-integer semantics; DATE uses `SQL_TYPE_DATE`.
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added documentation for new features, supported behavior and 
verification scope.
   - [x] included Apache headers and packaged dependency license/notice 
information.
   - [x] added comments explaining non-obvious compatibility/build decisions.
   - [x] added unit/public-ABI regression tests.
   - [x] added integration and application-consumer tests.
   - [x] been tested in disposable IoTDB 1C1D servers.
   
   Key packages: `iotdb-client/odbc`, shared native build configuration under 
`iotdb-client/client-cpp/cmake`, and native package workflows/scripts.


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