-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-30025][table] Unified the max display column width for SqlClient and Table APi in both Streaming and Batch execMode #21322
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
[FLINK-30025][table] Unified the max display column width for SqlClient and Table APi in both Streaming and Batch execMode #21322
Conversation
d6777b1 to
8222ff4
Compare
|
@flinkbot run azure |
1 similar comment
|
@flinkbot run azure |
fsk119
left a comment
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.
Thanks for your contribution. I left some comments.
...flink-table-api-java/src/main/java/org/apache/flink/table/api/config/TableConfigOptions.java
Outdated
Show resolved
Hide resolved
...k-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
Show resolved
Hide resolved
docs/layouts/shortcodes/generated/table_config_configuration.html
Outdated
Show resolved
Hide resolved
8222ff4 to
adb3568
Compare
d0acd8b to
733eb0c
Compare
6c2fe89 to
97b3b75
Compare
wuchong
left a comment
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.
I think the change didn't verify impacts to SQL CLI.
Could you add tests in flink-table/flink-sql-client/src/test/resources/sql/select.q to
(1) set table.print.max-column-width=40 should also work
(2) truncating should also work on batch mode.
And please also add tests in flink-table/flink-sql-client/src/test/resources/sql/table.q to verify truncating doesn't affect show create table with table names longer than 30 characters.
...flink-table-api-java/src/main/java/org/apache/flink/table/api/config/TableConfigOptions.java
Outdated
Show resolved
Hide resolved
...flink-table-api-java/src/main/java/org/apache/flink/table/api/config/TableConfigOptions.java
Outdated
Show resolved
Hide resolved
...le/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
Show resolved
Hide resolved
8f852b0 to
690f194
Compare
|
All tests have been added. |
690f194 to
2d4e0a0
Compare
wuchong
left a comment
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.
Please append fixup commits to address comments. Please DO NOT squash or amend commits. Otherwise, the reviewer doesn't know what was updated and has to review the whole pull request again. You can squash or modify commits after the review pass.
...c/main/java/org/apache/flink/table/examples/java/basics/DisplayMaxColumnWidthSQLExample.java
Outdated
Show resolved
Hide resolved
...le/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
Show resolved
Hide resolved
wuchong
left a comment
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.
LGMT. I only left some minor comments.
You can rebase and restructure your commits now.
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/api/TableConfigTest.java
Show resolved
Hide resolved
...le/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
Outdated
Show resolved
Hide resolved
8ae5474 to
9cc74e1
Compare
|
Waiting for branch cut. |
9cc74e1 to
defdde0
Compare
c5581cb to
8fcdbe5
Compare
|
@flinkbot run azure |
1 similar comment
|
@flinkbot run azure |
|
It's weird. Running the CliClientITCase locally in IDE or via maven has no failures. It seems CI has some special setting that the result of |
|
@flinkbot run azure |
1ae8cf1 to
7c640ff
Compare
|
Found reason that node ids are two digit numbers running locally but are three digit numbers in the CI env which make the header and footer of the printing result have different lengths. |
|
@flinkbot run azure |
84621c4 to
91eaae2
Compare
…lumn width while printing the query result to the client console.
…n.DISPLAY_MAX_COLUMN_WIDTH
…st SET 'table.display.max-column-width'
91eaae2 to
8b2d903
Compare
…de ids have been removed because the ids might have different length in different envs.
8b2d903 to
8c6a9ab
Compare
What is the purpose of the change
Currently, the default value 30 of
DEFAULT_MAX_COLUMN_WIDTHinPrintStylehas been used when table.execute().print() has been called. There is no way to adjust it if user wants to print more content of some columns.Users want to configure the max display column width in a unified way while:
using CLI
Using Table API
Running job in batch execution mode
Running job in streaming execution mode
For further information, please refer to https://cwiki.apache.org/confluence/display/FLINK/FLIP-279+Unified+the+max+display+column+width+for+SqlClient+and+Table+APi+in+both+Streaming+and+Batch+execMode
Brief change log
executeQueryOperationVerifying this change
This change added tests and can be verified by executing
CliTableauResultViewTestandDisplayMaxColumnWidthSQLExampleTCase.Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no) Configurations are changed.Documentation