Skip to content

Commit 76c2027

Browse files
authored
fix: desc password policy column types must match schema types. (#18990)
1 parent 253aba6 commit 76c2027

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

โ€Žsrc/query/service/src/interpreters/interpreter_password_policy_desc.rsโ€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use std::sync::Arc;
1616

1717
use databend_common_exception::Result;
1818
use databend_common_expression::types::StringType;
19-
use databend_common_expression::types::UInt64Type;
2019
use databend_common_expression::DataBlock;
2120
use databend_common_expression::FromData;
2221
use databend_common_sql::plans::DescPasswordPolicyPlan;
@@ -127,6 +126,11 @@ impl Interpreter for DescPasswordPolicyInterpreter {
127126
Some(DEFAULT_PASSWORD_HISTORY),
128127
];
129128

129+
let defaults = defaults
130+
.iter()
131+
.map(|opt| opt.map(|v| v.to_string()))
132+
.collect::<Vec<_>>();
133+
130134
let descriptions = vec![
131135
"Name of password policy.".to_string(),
132136
"Comment of password policy.".to_string(),
@@ -146,7 +150,7 @@ impl Interpreter for DescPasswordPolicyInterpreter {
146150
PipelineBuildResult::from_blocks(vec![DataBlock::new_from_columns(vec![
147151
StringType::from_data(properties),
148152
StringType::from_data(values),
149-
UInt64Type::from_opt_data(defaults),
153+
StringType::from_opt_data(defaults),
150154
StringType::from_data(descriptions),
151155
])])
152156
}

0 commit comments

Comments
ย (0)