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

Function round_trip_dataframe

datafusion/core/tests/expr_api/parse_sql_expr.rs:75–88  ·  view source on GitHub ↗
(sql: &str)

Source from the content-addressed store, hash-verified

73}
74
75async fn round_trip_dataframe(sql: &str) -> Result<()> {
76 let ctx = SessionContext::new();
77 let df = ctx
78 .read_csv(
79 &"tests/data/example.csv".to_string(),
80 CsvReadOptions::default(),
81 )
82 .await?;
83 let expr = df.parse_sql_expr(sql)?;
84 let sql2 = unparse_sql_expr(&expr)?;
85 assert_eq!(sql, sql2);
86
87 Ok(())
88}
89
90#[tokio::test]
91async fn roundtrip_qualified_schema() -> Result<()> {

Callers 1

Calls 5

newFunction · 0.85
unparse_sql_exprFunction · 0.85
read_csvMethod · 0.80
to_stringMethod · 0.45
parse_sql_exprMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…