Skip to content

Commit

Permalink
update tests for group by change
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitRanque committed Jun 13, 2024
1 parent 4614e7e commit 2cb8bde
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ndc-clickhouse/tests/query_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod test_utils {
connector::read_server_config,
sql::{QueryBuilder, QueryBuilderError},
};
use ndc_sdk::models::{self, QueryRequest};
use ndc_sdk::models;
use std::{env, error::Error, path::PathBuf};
use tokio::fs;

Expand Down Expand Up @@ -45,7 +45,7 @@ mod test_utils {
schema_dir: &str,
group_dir: &str,
test_name: &str,
) -> Result<QueryRequest, Box<dyn Error>> {
) -> Result<models::QueryRequest, Box<dyn Error>> {
let request_path =
tests_dir_path(schema_dir, group_dir).join(format!("{test_name}.request.json"));

Expand Down Expand Up @@ -89,7 +89,7 @@ mod test_utils {
}
fn generate_sql(
configuration: &ServerConfig,
request: &QueryRequest,
request: &models::QueryRequest,
) -> Result<String, QueryBuilderError> {
let generated_statement = pretty_print_sql(
&QueryBuilder::new(&request, &configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ FROM
WHERE
TRUE
AND TRUE
GROUP BY
"_order_by_0"."AlbumId",
"_order_by_1"."Name"
LIMIT
1 BY "_order_by_0"."AlbumId"
) AS "_order_by_0" ON "_origin"."AlbumId" = "_order_by_0"."_relkey_AlbumId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ FROM
WHERE
TRUE
AND TRUE
GROUP BY
"_order_by_0"."AlbumId",
"_order_by_1"."Name"
LIMIT
1 BY "_order_by_0"."AlbumId"
) AS "_order_by_0" ON "_origin"."AlbumId" = "_order_by_0"."_relkey_AlbumId"
Expand Down

0 comments on commit 2cb8bde

Please sign in to comment.