Skip to content

Commit

Permalink
SNOW-726742 Remove queryID from snowflakeConn
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pfus committed Aug 23, 2023
1 parent cd116cf commit 380ef07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ type snowflakeConn struct {
cfg *Config
rest *snowflakeRestful
SequenceCounter uint64
QueryID string
SQLState string
telemetry *snowflakeTelemetry
internal InternalClient
Expand Down Expand Up @@ -158,7 +157,6 @@ func (sc *snowflakeConn) exec(
sc.cfg.Schema = data.Data.FinalSchemaName
sc.cfg.Role = data.Data.FinalRoleName
sc.cfg.Warehouse = data.Data.FinalWarehouseName
sc.QueryID = data.Data.QueryID
sc.SQLState = data.Data.SQLState
sc.populateSessionParameters(data.Data.Parameters)
return data, err
Expand Down Expand Up @@ -282,7 +280,7 @@ func (sc *snowflakeConn) ExecContext(
return &snowflakeResult{
affectedRows: updatedRows,
insertID: -1,
queryID: sc.QueryID,
queryID: data.Data.QueryID,
}, nil // last insert id is not supported by Snowflake
} else if isMultiStmt(&data.Data) {
return sc.handleMultiExec(ctx, data.Data)
Expand Down Expand Up @@ -353,7 +351,7 @@ func (sc *snowflakeConn) queryContextInternal(

rows := new(snowflakeRows)
rows.sc = sc
rows.queryID = sc.QueryID
rows.queryID = data.Data.QueryID

if isMultiStmt(&data.Data) {
// handleMultiQuery is responsible to fill rows with childResults
Expand Down
2 changes: 1 addition & 1 deletion multistatement.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (sc *snowflakeConn) handleMultiExec(
return &snowflakeResult{
affectedRows: updatedRows,
insertID: -1,
queryID: sc.QueryID,
queryID: data.QueryID,
}, nil
}

Expand Down

0 comments on commit 380ef07

Please sign in to comment.