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

feat: pg_catalog.version(), standard_conforming_strings session var #2448

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

scsmithr
Copy link
Member

Adds the pg_catalog.version() function (which provides more info that the server_version session var). The format provides compatibility with sqlalchemy/great expectations.

Also adds the standard_conforming_strings session var since great expectations was looking for this too.

I included the python script I was running against to get great expectations working, and it seems to connect without issue. But I haven't tried anything more than that.

cc @talagluck

Comment on lines +502 to +506
fn as_expr(&self, _: Vec<Expr>) -> Expr {
Expr::Literal(ScalarValue::Utf8(Some(
server_version_with_build_info().to_string(),
)))
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@universalmind303 I was originally trying to use session_var("server_version") here, but was getting a "Unknown variable: server_version" error.

Using server_version here would be incorrect anyways, but where would I look to enable using it with session_var?

Copy link
Contributor

@tychoish tychoish left a comment

Choose a reason for hiding this comment

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

I would not put the great expectations dependency or example in the python bindings (it's all via the pg protocol and so is orthogonal. otherwise seems legit.

@scsmithr
Copy link
Member Author

I would not put the great expectations dependency or example in the python bindings (it's all via the pg protocol and so is orthogonal. otherwise seems legit.

I believe this is just needed for the examples, and the actual requirements for the glaredb library is defined in pyproject.toml

@scsmithr
Copy link
Member Author

I would not put the great expectations dependency or example in the python bindings (it's all via the pg protocol and so is orthogonal. otherwise seems legit.

I believe this is just needed for the examples, and the actual requirements for the glaredb library is defined in pyproject.toml

I just confirmed on pypi, requirements.txt doesn't impact any of the metadata for the bindings that get uploaded. Going to merge so this gets into qa soon so we can start testing more tools.

@scsmithr scsmithr merged commit a15e891 into main Jan 19, 2024
20 checks passed
@scsmithr scsmithr deleted the sean/good-expectations branch January 19, 2024 13:30
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.

3 participants