alamb commented on code in PR #5518:
URL: https://github.com/apache/arrow-datafusion/pull/5518#discussion_r1140068980
##########
datafusion/core/tests/dataframe.rs:
##########
@@ -35,6 +36,58 @@ use datafusion::{assert_batches_eq,
assert_batches_sorted_eq};
use datafusion_expr::expr::{GroupingSet, Sort};
use datafusion_expr::{avg, col, count, lit, max, sum, Expr, ExprSchemable};
+#[tokio::test]
+async fn count_wildcard() -> Result<()> {
+ let ctx = SessionContext::new();
+ let testdata = datafusion::test_util::parquet_test_data();
+
+ ctx.register_parquet(
+ "alltypes_tiny_pages",
+ &format!("{testdata}/alltypes_tiny_pages.parquet"),
+ ParquetReadOptions::default(),
+ )
+ .await?;
+
+ let sql_results = ctx
+ .sql("select count(*) from alltypes_tiny_pages")
+ .await?
+ .explain(false, false)?
+ .collect()
+ .await?;
+
+ let df_results = ctx
+ .table("alltypes_tiny_pages")
+ .await?
+ .aggregate(vec![], vec![count(Expr::Wildcard)])?
+ .explain(false, false)
+ .unwrap()
+ .collect()
+ .await?;
+
+ //make sure sql plan same with df plan
+ assert_eq!(
Review Comment:
👍
--
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]