@@ -1699,7 +1699,7 @@ async fn test_time_travel_by_snapshot_id() {
16991699
17001700 // Snapshot 1: (1, 'alice'), (2, 'bob')
17011701 let table_snap1 = table. copy_with_options ( HashMap :: from ( [ (
1702- "scan.snapshot-id " . to_string ( ) ,
1702+ "scan.version " . to_string ( ) ,
17031703 "1" . to_string ( ) ,
17041704 ) ] ) ) ;
17051705 let rb = table_snap1. new_read_builder ( ) ;
@@ -1720,7 +1720,7 @@ async fn test_time_travel_by_snapshot_id() {
17201720
17211721 // Snapshot 2: (1, 'alice'), (2, 'bob'), (3, 'carol'), (4, 'dave')
17221722 let table_snap2 = table. copy_with_options ( HashMap :: from ( [ (
1723- "scan.snapshot-id " . to_string ( ) ,
1723+ "scan.version " . to_string ( ) ,
17241724 "2" . to_string ( ) ,
17251725 ) ] ) ) ;
17261726 let rb2 = table_snap2. new_read_builder ( ) ;
@@ -1753,7 +1753,7 @@ async fn test_time_travel_by_tag_name() {
17531753
17541754 // Tag 'snapshot1' -> snapshot 1: (1, 'alice'), (2, 'bob')
17551755 let table_tag1 = table. copy_with_options ( HashMap :: from ( [ (
1756- "scan.tag-name " . to_string ( ) ,
1756+ "scan.version " . to_string ( ) ,
17571757 "snapshot1" . to_string ( ) ,
17581758 ) ] ) ) ;
17591759 let rb = table_tag1. new_read_builder ( ) ;
@@ -1774,7 +1774,7 @@ async fn test_time_travel_by_tag_name() {
17741774
17751775 // Tag 'snapshot2' -> snapshot 2: all 4 rows
17761776 let table_tag2 = table. copy_with_options ( HashMap :: from ( [ (
1777- "scan.tag-name " . to_string ( ) ,
1777+ "scan.version " . to_string ( ) ,
17781778 "snapshot2" . to_string ( ) ,
17791779 ) ] ) ) ;
17801780 let rb2 = table_tag2. new_read_builder ( ) ;
@@ -1805,8 +1805,8 @@ async fn test_time_travel_conflicting_selectors_fail() {
18051805 let table = get_table_from_catalog ( & catalog, "time_travel_table" ) . await ;
18061806
18071807 let conflicted = table. copy_with_options ( HashMap :: from ( [
1808- ( "scan.tag-name " . to_string ( ) , "snapshot1" . to_string ( ) ) ,
1809- ( "scan.snapshot-id " . to_string ( ) , "2 " . to_string ( ) ) ,
1808+ ( "scan.version " . to_string ( ) , "snapshot1" . to_string ( ) ) ,
1809+ ( "scan.timestamp-millis " . to_string ( ) , "1234 " . to_string ( ) ) ,
18101810 ] ) ) ;
18111811
18121812 let plan_err = conflicted
@@ -1823,40 +1823,40 @@ async fn test_time_travel_conflicting_selectors_fail() {
18231823 "unexpected conflict error: {message}"
18241824 ) ;
18251825 assert ! (
1826- message. contains( "scan.snapshot-id " ) ,
1827- "conflict error should mention scan.snapshot-id : {message}"
1826+ message. contains( "scan.version " ) ,
1827+ "conflict error should mention scan.version : {message}"
18281828 ) ;
18291829 assert ! (
1830- message. contains( "scan.tag-name " ) ,
1831- "conflict error should mention scan.tag-name : {message}"
1830+ message. contains( "scan.timestamp-millis " ) ,
1831+ "conflict error should mention scan.timestamp-millis : {message}"
18321832 ) ;
18331833 }
18341834 other => panic ! ( "unexpected error: {other:?}" ) ,
18351835 }
18361836}
18371837
18381838#[ tokio:: test]
1839- async fn test_time_travel_invalid_numeric_selector_fails ( ) {
1839+ async fn test_time_travel_invalid_version_fails ( ) {
18401840 let catalog = create_file_system_catalog ( ) ;
18411841 let table = get_table_from_catalog ( & catalog, "time_travel_table" ) . await ;
18421842
18431843 let invalid = table. copy_with_options ( HashMap :: from ( [ (
1844- "scan.snapshot-id " . to_string ( ) ,
1845- "not-a-number " . to_string ( ) ,
1844+ "scan.version " . to_string ( ) ,
1845+ "nonexistent-tag " . to_string ( ) ,
18461846 ) ] ) ) ;
18471847
18481848 let plan_err = invalid
18491849 . new_read_builder ( )
18501850 . new_scan ( )
18511851 . plan ( )
18521852 . await
1853- . expect_err ( "invalid numeric time-travel selector should fail" ) ;
1853+ . expect_err ( "invalid version should fail" ) ;
18541854
18551855 match plan_err {
18561856 Error :: DataInvalid { message, .. } => {
18571857 assert ! (
1858- message. contains( "Invalid value for scan. snapshot- id" ) ,
1859- "unexpected invalid selector error: {message}"
1858+ message. contains( "is not a valid tag name or snapshot id" ) ,
1859+ "unexpected invalid version error: {message}"
18601860 ) ;
18611861 }
18621862 other => panic ! ( "unexpected error: {other:?}" ) ,
0 commit comments