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

Function test_fn_substr

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

Source from the content-addressed store, hash-verified

1107#[tokio::test]
1108#[cfg(feature = "unicode_expressions")]
1109async fn test_fn_substr() -> Result<()> {
1110 let expr = substr(col("a"), lit(2));
1111
1112 let batches = get_batches(expr).await?;
1113
1114 assert_snapshot!(
1115 batches_to_string(&batches),
1116 @r"
1117 +-------------------------+
1118 | substr(test.a,Int32(2)) |
1119 +-------------------------+
1120 | bcDEF |
1121 | bc123 |
1122 | BAdef |
1123 | 23AbcDef |
1124 +-------------------------+
1125 ");
1126
1127 Ok(())
1128}
1129
1130#[tokio::test]
1131async fn test_cast() -> Result<()> {

Callers

nothing calls this directly

Calls 4

substrFunction · 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…