Skip to content

Commit

Permalink
remove ref
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhao-su committed Jul 5, 2024
1 parent 44d586b commit e812288
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion e2e_test/sink/deltalake_rust_sink.slt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with (
force_append_only = 'true',
location = 's3a://deltalake/deltalake-test',
s3.access.key = 'hummockadmin',
s3.secret.key = ref secret deltalake_s3_secret_key,
s3.secret.key = secret deltalake_s3_secret_key,
s3.endpoint = 'http://127.0.0.1:9301'
);

Expand Down
8 changes: 4 additions & 4 deletions e2e_test/sink/iceberg_sink.slt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ CREATE SINK s6 AS select mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3 from mv6 WITH
primary_key = 'v1',
warehouse.path = 's3://iceberg',
s3.endpoint = 'http://127.0.0.1:9301',
s3.access.key = ref secret iceberg_s3_access_key,
s3.secret.key = ref secret iceberg_s3_secret_key,
s3.access.key = secret iceberg_s3_access_key,
s3.secret.key = secret iceberg_s3_secret_key,
s3.region = 'us-east-1',
catalog.name = 'demo',
catalog.type = 'storage',
Expand All @@ -35,8 +35,8 @@ CREATE SOURCE iceberg_demo_source WITH (
connector = 'iceberg',
warehouse.path = 's3://iceberg',
s3.endpoint = 'http://127.0.0.1:9301',
s3.access.key = ref secret iceberg_s3_access_key,
s3.secret.key = ref secret iceberg_s3_secret_key,
s3.access.key = secret iceberg_s3_access_key,
s3.secret.key = secret iceberg_s3_secret_key,
s3.region = 'us-east-1',
catalog.name = 'demo',
catalog.type = 'storage',
Expand Down
6 changes: 3 additions & 3 deletions e2e_test/source/cdc/cdc.share_stream.slt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ create source mysql_mytest with (
hostname = '${MYSQL_HOST:localhost}',
port = '${MYSQL_TCP_PORT:8306}',
username = 'rwcdc',
password = ref secret mysql_pwd,
password = secret mysql_pwd,
database.name = 'mytest',
server.id = '5601'
);
Expand Down Expand Up @@ -213,8 +213,8 @@ create source pg_source with (
connector = 'postgres-cdc',
hostname = '${PGHOST:localhost}',
port = '${PGPORT:5432}',
username = ref secret pg_username,
password = ref secret pg_pwd,
username = secret pg_username,
password = secret pg_pwd,
database.name = '${PGDATABASE:postgres}',
slot.name = 'pg_slot'
);
Expand Down
2 changes: 1 addition & 1 deletion src/connector/src/with_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub trait WithPropertiesExt: Get + Sized {

impl<T: Get> WithPropertiesExt for T {}

/// Options or properties extracted fro m the `WITH` clause of DDLs.
/// Options or properties extracted from the `WITH` clause of DDLs.
#[derive(Default, Clone, Debug, PartialEq, Eq, Hash)]
pub struct WithOptionsSecResolved {
inner: BTreeMap<String, String>,
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/utils/with_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mod options {
pub const RETENTION_SECONDS: &str = "retention_seconds";
}

/// Options or properties extracted fro m the `WITH` clause of DDLs.
/// Options or properties extracted from the `WITH` clause of DDLs.
#[derive(Default, Clone, Debug, PartialEq, Eq, Hash)]
pub struct WithOptions {
inner: BTreeMap<String, String>,
Expand Down
2 changes: 1 addition & 1 deletion src/meta/service/src/cloud_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl CloudService for CloudServiceImpl {
}
}

// XXX: We can't use ref secret in cloud validate source.
// XXX: We can't use secret in cloud validate source.
let source_cfg = WithOptionsSecResolved::without_secrets(source_cfg);

// try fetch kafka metadata, return error message on failure
Expand Down
2 changes: 1 addition & 1 deletion src/sqlparser/src/ast/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl fmt::Display for Value {
Ok(())
}
Value::Null => write!(f, "NULL"),
Value::Ref(v) => write!(f, "ref secret {}", v),
Value::Ref(v) => write!(f, "secret {}", v),
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/sqlparser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3495,8 +3495,7 @@ impl Parser<'_> {
Some('\'') => Ok(Value::SingleQuotedString(w.value)),
_ => self.expected_at(checkpoint, "A value")?,
},
Keyword::REF => {
self.expect_keyword(Keyword::SECRET)?;
Keyword::SECRET => {
let secret_name = self.parse_object_name()?;
let ref_as = if self.parse_keywords(&[Keyword::AS, Keyword::FILE]) {
SecretRefAsType::File
Expand Down

0 comments on commit e812288

Please sign in to comment.