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
I'm experimenting with the Trino.Data.ADO package by plugging it into where we are running a custom Trino ADO client. It seems to be very drop-in-replace, though there's currently an issue.
We are using Dapper to run the queries, and Dapper automatically passes in a CommandBehavior of
This value of CommandBehavior causes TrinoCommand::ExecuteDbDataReaderAsync to throw with a NotSupportedException.
Proposed Solution
It seems the CommandBehavior should be treated as a flags type, and care must be given to parse it out that way when implementing TrinoCommand::ExecuteDbDataReaderAsync. (ADO docs reference)
Issue
I'm experimenting with the
Trino.Data.ADO
package by plugging it into where we are running a custom Trino ADO client. It seems to be very drop-in-replace, though there's currently an issue.We are using Dapper to run the queries, and Dapper automatically passes in a
CommandBehavior
ofThis value of
CommandBehavior
causesTrinoCommand::ExecuteDbDataReaderAsync
to throw with aNotSupportedException
.Proposed Solution
It seems the
CommandBehavior
should be treated as a flags type, and care must be given to parse it out that way when implementingTrinoCommand::ExecuteDbDataReaderAsync
. (ADO docs reference)trino-csharp-client/trino-csharp/Trino.Data.ADO/Server/TrinoCommand.cs
Lines 211 to 230 in 30718ef
Instead of a switch, the individual bits should be extracted using bitwise
AND
test.The text was updated successfully, but these errors were encountered: