Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.16.0, 1.15.2
Description
Background info:
table.execute().print() can only use the default max column width. When running table API program "table.execute().print();", the columns with long string value are truncated to 30 chars. E.g.,:
I tried set the max width with: tEnv.getConfig.getConfiguration.setInteger("sql-client.display.max-column-width", 100); It has no effect. How can I set the max-width?
Here is the example code:
val env = StreamExecutionEnvironment.getExecutionEnvironment
val tEnv = StreamTableEnvironment.create(env)
tEnv.getConfig.getConfiguration.setInteger("sql-client.display.max-column-width", 100)
val orderA = env
.fromCollection(Seq(Order(1L, "beer", 3), Order(1L, "diaper-{}.diaper{}.diaper{}.diaper{}-.", 4), Order(3L, "rubber", 2)))
.toTable(tEnv)
orderA.execute().print()
"sql-client.display.max-column-width" seems only work in cli: SET 'sql-client.display.max-column-width' = '40';
While using Table API, by default, the DEFAULT_MAX_COLUMN_WIDTH in PrintStyle is used now. It should be configurable.
Attachments
Issue Links
- is related to
-
FLINK-31403 CliClientITCase print unexpected border when printing explain results
-
- Closed
-
- relates to
-
FLINK-32906 Release Testing: Verify FLIP-279 Unified the max display column width for SqlClient and Table APi in both Streaming and Batch execMode
-
- Resolved
-
-
FLINK-30758 Remove sql-client.display.max-column-width
-
- Open
-
- links to