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

Function test_fn_replace

datafusion/core/tests/dataframe/dataframe_functions.rs:860–879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

858
859#[tokio::test]
860async fn test_fn_replace() -> Result<()> {
861 let expr = replace(col("a"), lit("abc"), lit("x"));
862
863 let batches = get_batches(expr).await?;
864
865 assert_snapshot!(
866 batches_to_string(&batches),
867 @r#"
868 +---------------------------------------+
869 | replace(test.a,Utf8("abc"),Utf8("x")) |
870 +---------------------------------------+
871 | xDEF |
872 | x123 |
873 | CBAdef |
874 | 123AbcDef |
875 +---------------------------------------+
876 "#);
877
878 Ok(())
879}
880
881#[tokio::test]
882async fn test_fn_repeat() -> Result<()> {

Callers

nothing calls this directly

Calls 4

replaceFunction · 0.85
get_batchesFunction · 0.85
colFunction · 0.50
litFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…