You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change processing order of parameters and escape sequences
Previously, the driver processed ODBC escape sequences before replacing
ODBC parameter markers (?) with ClickHouse positional parameters. This
caused incorrect parameter ordering for functions whose argument order
differs between the ODBC standard and ClickHouse (for example, LOCATE →
position).
Example (old behavior):
{FN LOCATE(?, ?)}
→ position(?, ?)
→ position({odbc_parameter_1:String}, {odbc_parameter_2:String})
At this point, the original parameter order is lost, making it
impossible to reorder arguments correctly. For LOCATE, the correct
mapping requires the second parameter to come first.
New behavior:
{FN LOCATE(?, ?)}
→ {FN LOCATE({odbc_parameter_1:String}, {odbc_parameter_2:String})}
→ position({odbc_parameter_2:String}, {odbc_parameter_1:String})
This change fixes the issue by replacing ODBC parameter markers before
processing ODBC escape sequences. The parser and lexer were also
extended to support ClickHouse positional parameter syntax.
0 commit comments