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

Function explain_copy_to_table_to_table

datafusion/sql/src/parser.rs:1846–1884  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1844
1845 #[test]
1846 fn explain_copy_to_table_to_table() -> Result<(), DataFusionError> {
1847 let cases = vec![
1848 ("EXPLAIN COPY foo TO bar STORED AS PARQUET", false, false),
1849 (
1850 "EXPLAIN ANALYZE COPY foo TO bar STORED AS PARQUET",
1851 true,
1852 false,
1853 ),
1854 (
1855 "EXPLAIN VERBOSE COPY foo TO bar STORED AS PARQUET",
1856 false,
1857 true,
1858 ),
1859 (
1860 "EXPLAIN ANALYZE VERBOSE COPY foo TO bar STORED AS PARQUET",
1861 true,
1862 true,
1863 ),
1864 ];
1865 for (sql, analyze, verbose) in cases {
1866 println!("sql: {sql}, analyze: {analyze}, verbose: {verbose}");
1867
1868 let expected_copy = Statement::CopyTo(CopyToStatement {
1869 source: object_name("foo"),
1870 target: "bar".to_string(),
1871 partitioned_by: vec![],
1872 stored_as: Some("PARQUET".to_owned()),
1873 options: vec![],
1874 });
1875 let expected = Statement::Explain(ExplainStatement {
1876 analyze,
1877 verbose,
1878 format: None,
1879 statement: Box::new(expected_copy),
1880 });
1881 assert_eq!(verified_stmt(sql), expected);
1882 }
1883 Ok(())
1884 }
1885
1886 #[test]
1887 fn copy_to_query_to_table() -> Result<(), DataFusionError> {

Callers

nothing calls this directly

Calls 5

CopyToClass · 0.85
object_nameFunction · 0.85
ExplainClass · 0.85
newFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…