()
| 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> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…