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

dbeaver/dbeaver#26613 Fix json format for binary column exporting #34059

Merged
merged 4 commits into from
May 27, 2024

Conversation

HocKu7
Copy link
Contributor

@HocKu7 HocKu7 commented May 23, 2024

No description provided.

@HocKu7 HocKu7 linked an issue May 23, 2024 that may be closed by this pull request
Copy link
Member

@ShadelessFox ShadelessFox left a comment

Choose a reason for hiding this comment

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

I don't like the general approach. Let's discuss it tomorrow.

@@ -53,6 +53,8 @@ public interface IStreamDataExporterSite {

void writeBinaryData(@NotNull DBDContentStorage cs) throws IOException;

void writeBinaryData(@NotNull DBDContentStorage cs, String typeOfOutput) throws IOException;
Copy link
Member

Choose a reason for hiding this comment

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

Annotations 🙁

writer.write(binaryString);
break;
}
}
default: {
// Binary stream
try (Reader reader = new InputStreamReader(stream, cs.getCharset())) {
String string = IOUtils.readToString(reader);
Copy link
Member

Choose a reason for hiding this comment

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

This is a big no. It might be a really big blob (like several GBs in size) that we would otherwise just pipe to the output stream (writer).

@HocKu7 HocKu7 force-pushed the dbeaver/dbeaver#26613-binary-column-json-exporting branch 3 times, most recently from c2499e1 to 3327999 Compare May 24, 2024 08:40
@HocKu7 HocKu7 force-pushed the dbeaver/dbeaver#26613-binary-column-json-exporting branch from 3327999 to af53c81 Compare May 24, 2024 08:43
@HocKu7 HocKu7 force-pushed the dbeaver/dbeaver#26613-binary-column-json-exporting branch from e1f0f22 to ed89583 Compare May 24, 2024 10:50
@HocKu7 HocKu7 requested a review from ShadelessFox May 24, 2024 10:51
@DariaMarkaryan
Copy link
Member

verified

@serge-rider serge-rider merged commit c8f0ac1 into devel May 27, 2024
4 checks passed
@serge-rider serge-rider deleted the dbeaver/dbeaver#26613-binary-column-json-exporting branch June 18, 2024 16:46
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.

Binary columns cause JSON export to be invalid
5 participants