kumarUjjawal commented on code in PR #22417:
URL: https://github.com/apache/datafusion/pull/22417#discussion_r3289379563
##########
datafusion-examples/examples/custom_data_source/custom_datasource.rs:
##########
@@ -53,6 +53,20 @@ pub async fn custom_datasource() -> Result<()> {
search_accounts(db.clone(), Some(col("bank_account").gt(lit(8000u64))),
1).await?;
search_accounts(db.clone(), Some(col("bank_account").gt(lit(200u64))),
2).await?;
+ // exercise SQL paths that push down non-trivial projections:
+ // - `SELECT 1 ...` requests no source columns (projection: Some([]))
+ // - `SELECT COUNT(id) ...` requests a single column (projection:
Some([0]))
+ let ctx = SessionContext::new();
+ ctx.register_table("accounts", Arc::new(db))?;
+ ctx.sql("SELECT 1 AS a FROM accounts")
Review Comment:
Thanks! Added the actual values check.
--
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]