Skip to content

New Datafusion-cli streaming printing way should handle corner case for only one small batch which lines are less than max_rows #14920

@zhuqi-lucas

Description

@zhuqi-lucas

Describe the bug

When i continue to test for new way for datafusion-cli exec and print, i found the corner case that only one small batch which lines are less than max_rows and less than preview limit will not print, this ticket will fix it.

New way for datafusion-cli exec and print after the PR:
#14877

To Reproduce

> CREATE EXTERNAL TABLE IF NOT EXISTS lineitem (
        l_orderkey BIGINT,
        l_partkey BIGINT,
        l_suppkey BIGINT,
        l_linenumber INTEGER,
        l_quantity DECIMAL(15, 2),
        l_extendedprice DECIMAL(15, 2),
        l_discount DECIMAL(15, 2),
        l_tax DECIMAL(15, 2),
        l_returnflag VARCHAR,
        l_linestatus VARCHAR,
        l_shipdate DATE,
        l_commitdate DATE,
        l_receiptdate DATE,
        l_shipinstruct VARCHAR,
        l_shipmode VARCHAR,
        l_comment VARCHAR
) STORED AS parquet
LOCATION '/Users/zhuqi/arrow-datafusion/benchmarks/data/tpch_sf10/lineitem';
0 row(s) fetched.
Elapsed 0.007 seconds.


> select l_comment from lineitem limit 1;

It will show nothing to print.

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionSomething that used to work no longer does

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions