Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.9.3 #176

Merged
merged 6 commits into from Jan 25, 2021
Merged

Release/0.9.3 #176

merged 6 commits into from Jan 25, 2021

Conversation

adatzer
Copy link
Collaborator

@adatzer adatzer commented Jan 6, 2021

No description provided.

@coveralls
Copy link

coveralls commented Jan 6, 2021

Coverage Status

Coverage decreased (-0.2%) to 22.424% when pulling 528b2ac on release/0.9.3 into 59c56a5 on master.

)

// Specific for Snowflake db
const (
loginTimeout = 5 * time.Second // by default is 60
loginTimeout = 5 * time.Second // by default is 60
multiStmtName = "multiple statement execution" // https://github.com/snowflakedb/gosnowflake/blob/e909f00ff624a7e60d4f91718f6adc92cbd0d80f/connection.go#L57-L61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not following the relevance of this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just shows where this value comes from. This is what the driver also uses to determine whether it is a multi-statement query.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok I think I follow now. So that leads me to the follow-up - in that code it says:

// isMultiStmt returns true if the statement type code is of type multistatement

... so can we not just call isMultiStmt instead of matching strings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nicer indeed, but it is unexported name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok ok I follow. Grand so.

@@ -30,6 +31,7 @@ func (sft SnowFlakeTarget) IsConnectable() bool {
}

func NewSnowflakeTarget(target Target) *SnowFlakeTarget {
// Note: region connection parameter is deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Note: region connection parameter is deprecated

Does it still work? What is to be used in place of it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still works as it is.
The suggestion for the region connection parameter is to be included in :account: (https://godoc.org/github.com/snowflakedb/gosnowflake#hdr-Connection_Parameters). So it has to do with the target configuration in playbooks.

@@ -80,32 +81,42 @@ func (sft SnowFlakeTarget) RunQuery(query ReadyQuery, dryRun bool, showQueryOutp
return QueryStatus{query, query.Path, 0, nil}
}

scripts := strings.Split(query.Script, ";")
// The MULTI_STATEMENT_COUNT parameter (through WithMultiStatement)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment can be much shorter eg

// 0 allows arbitrary number of statements

Copy link
Contributor

@colmsnowplow colmsnowplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I ran some tests and behaves as I would expect.

A few nitpicks on comments, but otherwise all looks good. :)

@adatzer
Copy link
Collaborator Author

adatzer commented Jan 13, 2021

Just shortened the comment to // 0 allows arbitrary number of statements

@adatzer adatzer merged commit 528b2ac into master Jan 25, 2021
@paulboocock paulboocock deleted the release/0.9.3 branch March 14, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants