-
Notifications
You must be signed in to change notification settings - Fork 313
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: Support printing postgresql's bytea
data type in its "hex" and "escape" format
#3567
Conversation
@MichaelScofield I would like to add some related integration test, but didn't find a way. Would you please tell me how to do this? |
bytea
data type in its "hex" and "escape" formatbytea
data type in its "hex" and "escape" format
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3567 +/- ##
==========================================
- Coverage 85.20% 84.79% -0.42%
==========================================
Files 926 928 +2
Lines 153645 153851 +206
==========================================
- Hits 130919 130461 -458
- Misses 22726 23390 +664 |
rename 'set_configuration_parameter' in statement_.rs to 'set_session_config'
49e5acc
to
5d1880e
Compare
I'd suggest putting the tests in file "/tests-integration/tests/sql.rs". But I see you've already done this. |
refactor: use Arc<DashMap> instead of DashMap in QueryContext refactor: use Arc<DashMap> instead of DashMap in QueryContext Avoid expensive clone refactor: use unreachable!() instead of unimplemented!() refactor: move the encode bytea by format type logic into encoder test: add binary format integration test case
b009cff
to
f1defe9
Compare
@sunng87 Thanks for your advice, helps simplifying the implementation a lot. |
Signed-off-by: tison <wander4096@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you @J0HN50N133 for your patient and fast response!
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
close #3438
What's changed and what's your intention?
Support printing postgresql's
bytea
data type in its "hex" and "escape" format.Please explain IN DETAIL what the changes are in this PR and why they are needed:
Support printing postgresql's
bytea
data type in its "hex" and "escape" format. And add a general way to set session config value, which make it easier to support Support outputting various date styles for postgresql #3442 .Add a new field
configuration_variables
inSession
andQueryContext
. The values inQueryContext
may be changed byset
statement and will be finally pass toSession
. And the config value will affect the output.Different output of
bytea
is implemented by wrapper:HexOutputBytea
andEscapeOutputBytea
which reimplementToSqlText
and delegateToSql
to inner data.SessionConfigValue
is coupled withsql::ast::Value
. And configuration parameters is not well-organized.Checklist