Skip to content

Commit

Permalink
feat(cubesql): excel subquery column with same name (#4602)
Browse files Browse the repository at this point in the history
  • Loading branch information
gandronchik committed May 27, 2022
1 parent b198fb3 commit ea3a0bc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rust/cubesql/cubesql/src/compile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7763,4 +7763,18 @@ ORDER BY \"COUNT(count)\" DESC"

Ok(())
}

#[tokio::test]
async fn test_subquery_with_same_name_excel() -> Result<(), CubeError> {
insta::assert_snapshot!(
"subquery_with_same_name_excel",
execute_query(
"SELECT oid, (SELECT oid FROM pg_type WHERE typname like 'geography') as dd FROM pg_type WHERE typname like 'geometry'".to_string(),
DatabaseProtocol::PostgreSQL
)
.await?
);

Ok(())
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: cubesql/src/compile/mod.rs
expression: "execute_query(\"SELECT oid, (SELECT oid FROM pg_type WHERE typname like 'geography') as dd FROM pg_type WHERE typname like 'geometry'\".to_string(),\n DatabaseProtocol::PostgreSQL).await?"
---
++
++
++

0 comments on commit ea3a0bc

Please sign in to comment.