@@ -101,6 +101,10 @@ func (c *conn) ExecContext(ctx context.Context, query string, args []driver.Name
101101
102102 ctx = driverctx .NewContextWithConnId (ctx , c .id )
103103
104+ if len (args ) > 0 && c .session .ServerProtocolVersion < cli_service .TProtocolVersion_SPARK_CLI_SERVICE_PROTOCOL_V8 {
105+ return nil , dbsqlerrint .NewDriverError (ctx , dbsqlerr .ErrParametersNotSupported , nil )
106+ }
107+
104108 exStmtResp , opStatusResp , err := c .runQuery (ctx , query , args )
105109
106110 if exStmtResp != nil && exStmtResp .OperationHandle != nil {
@@ -141,6 +145,10 @@ func (c *conn) QueryContext(ctx context.Context, query string, args []driver.Nam
141145
142146 ctx = driverctx .NewContextWithConnId (ctx , c .id )
143147
148+ if len (args ) > 0 && c .session .ServerProtocolVersion < cli_service .TProtocolVersion_SPARK_CLI_SERVICE_PROTOCOL_V8 {
149+ return nil , dbsqlerrint .NewDriverError (ctx , dbsqlerr .ErrParametersNotSupported , nil )
150+ }
151+
144152 // first we try to get the results synchronously.
145153 // at any point in time that the context is done we must cancel and return
146154 exStmtResp , opStatusResp , err := c .runQuery (ctx , query , args )
@@ -274,7 +282,7 @@ func (c *conn) executeStatement(ctx context.Context, query string, args []driver
274282 req := cli_service.TExecuteStatementReq {
275283 SessionHandle : c .session .SessionHandle ,
276284 Statement : query ,
277- RunAsync : c . cfg . RunAsync ,
285+ RunAsync : true ,
278286 QueryTimeout : int64 (c .cfg .QueryTimeout / time .Second ),
279287 GetDirectResults : & cli_service.TSparkGetDirectResults {
280288 MaxRows : int64 (c .cfg .MaxRows ),
0 commit comments