Mandukhai-Alimaa opened a new pull request, #3821:
URL: https://github.com/apache/arrow-adbc/pull/3821

   This PR contains:
   - Setup validataion suite for the postgresql driver. (128 tests pass. 0 
failing. Decimal ingest test, and decimal bind tests were skipped due to bug 
and the fix has not been merged yet.  
https://github.com/apache/arrow-adbc/pull/3787)
   - PostgreSQL specific test overrides
   - Update postgresql integration test in CI workflow to run validation tests
   - Update RAT license exlusions file to ignore the .lock files and test sql 
files.
   
   There was a small change made in the c/driver/postgresql/result_helper.cc 
due to the segfault when the number of query parameters doesn't match the 
number of result columns. The test that triggered the bug was calling 
get_parameter_schema() on `SELECT 1 + $1 + $2` . 
   
   This query has 2 parameters but returns only 1 result column (the computed 
sum). The code was incorrectly using PQfname(result_, i) to retrieve parameter 
names, but PQfname() actually retrieves result column names from the result 
set. When iterating through parameters, the first iteration (i=0) would work 
fine accessing column 0, but the second iteration (i=1) would access an 
out-of-range column. PQfname() returns NULL for out-of-range column numbers, 
and passing this NULL pointer to AppendChild() as a C string causes the 
segfault.
   
   
   


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