zhuqi-lucas opened a new pull request, #14921:
URL: https://github.com/apache/datafusion/pull/14921

   ## Which issue does this PR close?
   
   
   - [Closes #14920](https://github.com/apache/datafusion/issues/14920)
   
   ## Rationale for this change
   
   When we only have one batch and size < max_rows, also size < preview limit, 
we should collect it at the end.
   
   
   ## What changes are included in this PR?
   
   When we only have one batch and size < max_rows, also size < preview limit, 
we should collect it at the end.
   
   
   Add the collect logic at the end.
   
   ## Are these changes tested?
   Yes
   
   Testing result
   
   ```rust
   > select * from a;
   Error during planning: table 'datafusion.public.a' not found
   > 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;
   +--------------------------+
   | l_comment                |
   +--------------------------+
   | nic packages. regular re |
   +--------------------------+
   1 row(s) fetched.
   Elapsed 0.087 seconds.
   ```
   
   
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to