feat(table-catalog): wire durable strong backing config (#3971)

* feat(table-catalog): wire durable strong backing config

* fix(table-catalog): guard strong backing warehouse prefixes

* fix(checksums): remove unused base64 decode helper

---------

Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
This commit is contained in:
Henry Guo
2026-06-29 07:58:14 +08:00
committed by GitHub
parent 51d44f20c7
commit cf7af17b43
5 changed files with 652 additions and 51 deletions
-20
View File
@@ -14,26 +14,6 @@
#![allow(dead_code)]
use base64_simd::STANDARD;
use std::error::Error;
#[derive(Debug)]
pub(crate) struct DecodeError(base64_simd::Error);
impl Error for DecodeError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
Some(&self.0)
}
}
impl std::fmt::Display for DecodeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "failed to decode base64")
}
}
pub(crate) fn decode(input: impl AsRef<str>) -> Result<Vec<u8>, DecodeError> {
STANDARD.decode_to_vec(input.as_ref()).map_err(DecodeError)
}
pub(crate) fn encode(input: impl AsRef<[u8]>) -> String {
STANDARD.encode_to_string(input.as_ref())
+4 -3
View File
@@ -338,8 +338,7 @@ mod tests {
use crate::ChecksumAlgorithm;
use crate::http::HttpChecksum;
use crate::base64;
use base64_simd::STANDARD;
use http::HeaderValue;
use pretty_assertions::assert_eq;
use std::fmt::Write;
@@ -347,7 +346,9 @@ mod tests {
const TEST_DATA: &str = r#"test data"#;
fn base64_encoded_checksum_to_hex_string(header_value: &HeaderValue) -> String {
let decoded_checksum = base64::decode(header_value.to_str().unwrap()).unwrap();
let decoded_checksum = STANDARD
.decode_to_vec(header_value.to_str().expect("checksum header value should be ASCII"))
.expect("checksum header value should be valid base64");
let decoded_checksum = decoded_checksum.into_iter().fold(String::new(), |mut acc, byte| {
write!(acc, "{byte:02X?}").expect("string will always be writable");
acc