leaves12138 commented on code in PR #486:
URL: https://github.com/apache/paimon-rust/pull/486#discussion_r3544878045
##########
crates/paimon/tests/rest_catalog_test.rs:
##########
@@ -254,6 +345,146 @@ async fn test_catalog_get_table() {
assert!(table.is_ok(), "failed to get table: {table:?}");
}
+#[tokio::test]
+async fn test_rest_env_get_table_reuses_catalog_environment() {
+ let ctx = setup_catalog(vec!["default"]).await;
+
+ ctx.server.add_table_with_schema(
+ "default",
+ "current_table",
+ test_schema(),
+ "file:///tmp/test_warehouse/default.db/current_table",
+ );
+ ctx.server.add_table_with_schema(
+ "default",
+ "upstream_table",
+ test_schema(),
+ "file:///tmp/test_warehouse/default.db/upstream_table",
+ );
+
+ let current = ctx
+ .catalog
+ .get_table(&Identifier::new("default", "current_table"))
+ .await
+ .expect("current table should load");
+ let upstream = current
+ .rest_env()
+ .expect("REST table should carry RESTEnv")
+ .get_table(&Identifier::new("default", "upstream_table"))
+ .await
+ .expect("upstream table should load via RESTEnv");
+
+ assert_eq!(upstream.identifier().full_name(), "default.upstream_table");
+ assert!(upstream.rest_env().is_some());
+}
+
+#[tokio::test]
+async fn test_blob_view_prescan_filters_invalid_filtered_out_reference() {
Review Comment:
The regression test fixes the semantic gap, but it currently fails on `unit
(windows-latest)`:
`test_blob_view_prescan_filters_invalid_filtered_out_reference` panics in
opendal fs listing with `StripPrefixError(())`. This test uses
`FileSystemCatalog`, whose own filesystem catalog tests are already
`#[cfg(not(windows))]` because directory listing on Windows is still tracked
separately. Could we either make this test `#[cfg(not(windows))]` or rewrite it
to avoid the Windows-unsupported filesystem listing path? The CI failure is
from this test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]