Page properties | ||||||||
---|---|---|---|---|---|---|---|---|
|
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
When running table API program "table.execute().print();", the columns with long string value are truncated to 30 chars, e.g.,:
After setting the max width with: tEnv.getConfig.getConfiguration.setInteger("sql-client.display.max-column-width", 100); It has no effect.
...
It is not configurable. By default, PrintStyle.DEFAULT_MAX_COLUMN_WIDTHis used. [1]
Test didn't cover case with text whose length exceeds PrintStyle.DEFAULT_MAX_COLUMN_WIDTH, i.e. 30. [2]
Job running in streaming execution mode with SqlClient
...
It only works for jobs running in streaming execution mode. There is a bug in documentation [23].
Job running in batch execution mode with Table API
It is not configurable. By default, PrintStyle.DEFAULT_MAX_COLUMN_WIDTHis used. [24]
Job running in streaming execution mode with Table API
Same as in batch execution mode, it is not configurable. By default, PrintStyle.DEFAULT_MAX_COLUMN_WIDTHis used. [34]
Conceptually, there is no difference between printing table results of jobs running in batch and streaming exec mode. The snapshot at the calling time will be printed. [45]
Summary
Topics mentioned above are mixed with layered and orthogonal issues. In order to provide a clear big picture, all of them will be summarized in the following table:
sql-client.display.max-column-width, default value is 30 | ||
sqlclient | Streaming | Text longer than the value will be truncated and replaced with “...” |
sqlclient | Batch | No effect. The default value 30 is hard coded. Text longer than 30 will be truncated and replaced with “...” |
Table API | Streaming | No effect. The default value 30 is hard coded. Text longer than 30 will be truncated and replaced with “...” |
Table API | Batch | No effect. The default value 30 is hard coded. Text longer than 30 will be truncated and replaced with “...” |
Proposed Changes
New Display ConfigOption for Table API and SqlClient in both batch and streaming execution modes
...
After the proposed changes, the big picture looks like the following tables. During the migration phase while sql-client.display.max-column-width marked as deprecated:
Deprecated: sql-client.display.max-column-width, default value is 30 | table.display.max-column-width, default value is 30 | ||
sqlclient | Streaming | Changes will be forwarded to table.display.max-column-width | Text longer than the value will be truncated and replaced with “...” |
sqlclient | Batch |
No effect.
Changes will be forwarded to table.display.max-column-width |
Text longer than the value will be truncated and replaced with “...” | |||
Table API | Streaming | No effect. table.display.max-column-width with the default value 30 will be used | Text longer than the value will be truncated and replaced with “...” |
Table API | Batch | No effect. table.display.max-column-width with the default value 30 will be used | Text longer than the value will be truncated and replaced with “...” |
After removing sql-client.display.max-column-width, there will be only one configuration for users:
table.display.max-column-width, default value is 30 | ||
sqlclient | Streaming | Text longer than the value will be truncated and replaced with “...” |
sqlclient | Batch | Text longer than the value will be truncated and replaced with “...” |
Table API | Streaming | Text longer than the value will be truncated and replaced with “...” |
Table API | Batch | Text longer than the value will be truncated and replaced with “...” |
Compatibility, Deprecation, and Migration Plan
...