Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
fix ci

fmt
  • Loading branch information
xxhZs committed Jun 6, 2024
1 parent 5195a4e commit d940439
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
32 changes: 17 additions & 15 deletions src/frontend/src/binder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,22 +574,24 @@ mod tests {
Share(
BoundShare {
share_id: 0,
input: Right(
RecursiveUnion {
all: true,
base: Select(
BoundSelect {
distinct: All,
select_items: [
Literal(
Literal {
data: Some(
Int32(
1,
input: Query(
Right(
RecursiveUnion {
all: true,
base: Select(
BoundSelect {
distinct: All,
select_items: [
Literal(
Literal {
data: Some(
Int32(
1,
),
),
data_type: Some(
Int32,
),
),
data_type: Some(
Int32,
),
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

use super::expr_visitable::ExprVisitable;
use super::generic::GenericPlanRef;
use crate::error::ErrorCode::BindError;
use super::utils::impl_distill_by_unit;
use super::{
gen_filter_and_pushdown, generic, ColPrunable, ColumnPruningContext, ExprRewritable, Logical,
PlanBase, PlanTreeNodeUnary, PredicatePushdown, RewriteStreamContext, StreamChangedLog,
StreamRowIdGen, ToBatch, ToStream, ToStreamContext,
};
use crate::error::ErrorCode::BindError;
use crate::error::Result;
use crate::optimizer::property::Distribution;
use crate::utils::{ColIndexMapping, Condition};
Expand Down
10 changes: 8 additions & 2 deletions src/sqlparser/tests/sqlparser_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2690,7 +2690,7 @@ fn parse_ctes() {
fn assert_ctes_in_select(expected: &[&str], sel: &Query) {
for (i, exp) in expected.iter().enumerate() {
let Cte { alias, query, .. } = &sel.with.as_ref().unwrap().cte_tables[i];
assert_eq!(*exp, query.to_string());
assert_eq!(*exp, query.as_ref().unwrap().to_string());
assert_eq!(
if i == 0 {
Ident::new_unchecked("a")
Expand Down Expand Up @@ -2732,7 +2732,13 @@ fn parse_ctes() {
// CTE in a CTE...
let sql = &format!("WITH outer_cte AS ({}) SELECT * FROM outer_cte", with);
let select = verified_query(sql);
assert_ctes_in_select(&cte_sqls, &only(&select.with.unwrap().cte_tables).query);
assert_ctes_in_select(
&cte_sqls,
only(&select.with.unwrap().cte_tables)
.query
.as_ref()
.unwrap(),
);
}

#[test]
Expand Down

0 comments on commit d940439

Please sign in to comment.