-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(table options): backwards compat for catalog (#2775)
- Loading branch information
1 parent
c056a0e
commit 4935cc3
Showing
29 changed files
with
380 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
mod setup; | ||
use crate::setup::make_cli; | ||
|
||
|
||
#[test] | ||
/// Assert that we can still load the old catalog without panicking | ||
fn test_catalog_backwards_compat() { | ||
let mut cmd = make_cli(); | ||
let pwd = std::env::current_dir().unwrap(); | ||
let root_dir = pwd.parent().unwrap().parent().unwrap(); | ||
let old_catalog = root_dir.join("testdata/catalog_compat/v0"); | ||
cmd.args(["-l", old_catalog.to_str().unwrap()]) | ||
.assert() | ||
.success(); | ||
} | ||
|
||
|
||
#[test] | ||
/// Make sure that we can read the table options from the old catalog | ||
/// The v0 catalog has a table created from the following SQL: | ||
/// ```sql | ||
/// CREATE EXTERNAL TABLE debug_table | ||
/// FROM debug OPTIONS ( | ||
/// table_type 'never_ending' | ||
/// ); | ||
/// ``` | ||
fn test_catalog_backwards_compat_tbl_options() { | ||
let mut cmd = make_cli(); | ||
let pwd = std::env::current_dir().unwrap(); | ||
let root_dir = pwd.parent().unwrap().parent().unwrap(); | ||
let old_catalog = root_dir.join("testdata/catalog_compat/v0"); | ||
|
||
let query = "SELECT * FROM debug_table LIMIT 1"; | ||
cmd.args(["-l", old_catalog.to_str().unwrap(), "-q", query]) | ||
.assert() | ||
.success(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.