Add Markdown output format to the CLI#17697
Merged
wendigo merged 2 commits intotrinodb:masterfrom Aug 23, 2023
Merged
Conversation
Member
Author
|
I also tried using the CommonMark library, but its text renderer is lacking: master...nineinchnick:trino:cli-commonmark-output |
wendigo
reviewed
Jul 6, 2023
wendigo
reviewed
Jul 6, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jul 6, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
65572d1 to
43ca4c8
Compare
Member
Author
|
@wendigo ready for another round |
Contributor
|
I've tested rendering in various markdown editors and it looks good. |
wendigo
reviewed
Jul 17, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jul 17, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jul 17, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
wendigo
reviewed
Jul 17, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
da89953 to
7b42f2d
Compare
wendigo
requested changes
Jul 21, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/test/java/io/trino/cli/TestMarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
7b42f2d to
58d9ff9
Compare
58d9ff9 to
08a4348
Compare
08a4348 to
109762e
Compare
Member
Author
|
@wendigo PTAL |
1 similar comment
Member
Author
|
@wendigo PTAL |
Member
Author
Member
Author
Contributor
|
@nineinchnick hi! i'm back from holidays, I'll review it soon :) |
wendigo
approved these changes
Aug 16, 2023
client/trino-cli/src/main/java/io/trino/cli/MarkdownTablePrinter.java
Outdated
Show resolved
Hide resolved
client/trino-cli/src/test/java/io/trino/cli/TestMarkdownTablePrinter.java
Show resolved
Hide resolved
Contributor
|
We've discussed offline to follow-up with the refactoring of the code coming from/being similiar to aligned writer. LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add Markdown output to avoid having to use external tools like
csv2md.Example usage:
./client/trino-cli/target/trino-cli-419-SNAPSHOT-executable.jar --output-format MARKDOWN \ --execute="select * from (values (1234567, 'some longer strin'), (123, 'aa')) as t(one, two)"Prints:
where the default
ALIGNEDformat looks like:Additional context and related issues
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: