mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Allowed to switch between 'basic' and 'best effort' methods of parsing DateTime from text #1710
This commit is contained in:
parent
101276e541
commit
96fbe1d716
@ -74,6 +74,8 @@ void PrettyBlockOutputStream::calculateWidths(
|
||||
|
||||
void PrettyBlockOutputStream::write(const Block & block)
|
||||
{
|
||||
UInt64 max_rows = format_settings.pretty.max_rows;
|
||||
|
||||
if (total_rows >= max_rows)
|
||||
{
|
||||
total_rows += block.rows();
|
||||
@ -210,10 +212,10 @@ void PrettyBlockOutputStream::writeValueWithPadding(const ColumnWithTypeAndName
|
||||
|
||||
void PrettyBlockOutputStream::writeSuffix()
|
||||
{
|
||||
if (total_rows >= max_rows)
|
||||
if (total_rows >= format_settings.pretty.max_rows)
|
||||
{
|
||||
writeCString(" Showed first ", ostr);
|
||||
writeIntText(max_rows, ostr);
|
||||
writeIntText(format_settings.pretty.max_rows, ostr);
|
||||
writeCString(".\n", ostr);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@ protected:
|
||||
|
||||
WriteBuffer & ostr;
|
||||
const Block header;
|
||||
size_t max_rows;
|
||||
size_t total_rows = 0;
|
||||
size_t terminal_width = 0;
|
||||
|
||||
|
@ -95,6 +95,8 @@ void PrettyCompactBlockOutputStream::writeRow(
|
||||
|
||||
void PrettyCompactBlockOutputStream::write(const Block & block)
|
||||
{
|
||||
UInt64 max_rows = format_settings.pretty.max_rows;
|
||||
|
||||
if (total_rows >= max_rows)
|
||||
{
|
||||
total_rows += block.rows();
|
||||
|
@ -9,6 +9,8 @@ namespace DB
|
||||
|
||||
void PrettySpaceBlockOutputStream::write(const Block & block)
|
||||
{
|
||||
UInt64 max_rows = format_settings.pretty.max_rows;
|
||||
|
||||
if (total_rows >= max_rows)
|
||||
{
|
||||
total_rows += block.rows();
|
||||
@ -81,10 +83,10 @@ void PrettySpaceBlockOutputStream::write(const Block & block)
|
||||
|
||||
void PrettySpaceBlockOutputStream::writeSuffix()
|
||||
{
|
||||
if (total_rows >= max_rows)
|
||||
if (total_rows >= format_settings.pretty.max_rows)
|
||||
{
|
||||
writeCString("\nShowed first ", ostr);
|
||||
writeIntText(max_rows, ostr);
|
||||
writeIntText(format_settings.pretty.max_rows, ostr);
|
||||
writeCString(".\n", ostr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user