[CORE-272] Unable to run breakdown queries due to casting error Created: 02/Aug/17  Updated: 25/Apr/18  Resolved: 06/Feb/18

Status: Resolved
Project: i2b2 Core Software
Component/s: CRC Cell
Affects Version/s: 1.7.07
Fix Version/s: 1.7.10

Type: Bug Priority: Major
Reporter: Snehil Gupta Assignee: Mike Mendis
Resolution: Fixed Votes: 0
Labels: wikirelease
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Linux

Attachments: Text File breakdown_query_error_core-272.txt    
Rank: 0|hzzzzg:s6
Sprint: v1710.2
i2b2 Feature/s:
Patient Breakdowns
Affects Database/s:
PostgreSQL
Affects Web Browser/s:
Firefox, Internet Explorer, Safari
Testing Notes: Tested in the QA environment and it appears to be working correctly. Tested against Oracle, PostgreSQL and SQL Server. Verified the standard breakdowns will now run without an error.
Participant/s:

 Description   
Steps to reproduce issue:
1. Log into i2b2 webclient with access to at least project.
2. Create a new query and choose one of the breakdown output options for query result type: Age patient breakdown, Vital status breakdown, Gender patient breakdown, Race patient breakdown.
3. Run the query.

Expected result: The query should run successfully, generating the breakdown results and displaying them in the UI.

Observed result: The query fails with message "ERROR:ERROR" in the UI. Server log shows the following error (see detailed log in attachment):
{code}
Aug 1 15:16:00 jbspnnm1.cbmi.wucon.wustl.edu jboss-as7[29575]: ERR 15:16:00,434 ERROR [stderr] (http--0.0.0.0-8080-43) org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [update i2b2demodata.qt_query_master set delete_flag =?,delete_date=? where query_master_id = ? and delete_flag = ?]; nested exception is org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying
Aug 1 15:16:00 jbspnnm1.cbmi.wucon.wustl.edu jboss-as7[29575]: ERR 15:16:00,436 ERROR [stderr] (http--0.0.0.0-8080-43) Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Aug 1 15:16:00 jbspnnm1.cbmi.wucon.wustl.edu jboss-as7[29575]: ERR 15:16:00,437 ERROR [stderr] (http--0.0.0.0-8080-43) Position: 94
{code}

This looks like a type casting issue with the application code specifically affecting PostgreSQL environment.

Similar error with other operations in I2B2 have been encountered, see WEBCLIENT-202.
Generated at Fri Mar 29 12:24:40 UTC 2024 using Jira 8.20.11#820011-sha1:0629dd8d260e3954ece49053e565d01dabe11609.