MCPcopy Create free account
hub / github.com/apache/datafusion / test_collect_expr

Function test_collect_expr

datafusion/expr/src/utils.rs:1739–1752  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1737
1738 #[test]
1739 fn test_collect_expr() -> Result<()> {
1740 let mut accum: HashSet<Column> = HashSet::new();
1741 expr_to_columns(
1742 &Expr::Cast(Cast::new(Box::new(col("a")), DataType::Float64)),
1743 &mut accum,
1744 )?;
1745 expr_to_columns(
1746 &Expr::Cast(Cast::new(Box::new(col("a")), DataType::Float64)),
1747 &mut accum,
1748 )?;
1749 assert_eq!(1, accum.len());
1750 assert!(accum.contains(&Column::from_name("a")));
1751 Ok(())
1752 }
1753
1754 #[test]
1755 fn test_can_hash() {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
expr_to_columnsFunction · 0.85
CastClass · 0.85
colFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…