fn resolve_remote_query_target( ctx: &QueryContextRef, query: &Query, table_name: &str, ) -> PermissionTableTarget