Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rust/cubesql/cubesql/src/compile/engine/df/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ impl CubeScanWrapperNode {
vec![],
vec![],
vec![],
// TODO
vec![],
from_alias.clone().unwrap_or("".to_string()),
None,
None,
Expand Down Expand Up @@ -3579,7 +3579,7 @@ impl WrappedSelectNode {
aggregate,
patch_measures,
filter,
window: _,
window,
order,
} = columns;

Expand All @@ -3597,7 +3597,7 @@ impl WrappedSelectNode {
group_by.into_iter().map(|(m, _)| m).collect(),
group_descs,
aggregate.into_iter().map(|(m, _)| m).collect(),
// TODO
window.into_iter().map(|(m, _)| m).collect(),
from_alias.unwrap_or("".to_string()),
if !filter.is_empty() {
Some(filter.iter().map(|(f, _)| f.expr.to_string()).join(" AND "))
Expand Down
4 changes: 4 additions & 0 deletions rust/cubesql/cubesql/src/transport/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ impl SqlTemplates {
group_by: Vec<AliasedColumn>,
group_descs: Vec<Option<GroupingSetDesc>>,
aggregate: Vec<AliasedColumn>,
window: Vec<AliasedColumn>,
alias: String,
filter: Option<String>,
_having: Option<String>,
Expand All @@ -412,11 +413,13 @@ impl SqlTemplates {
) -> Result<String, CubeError> {
let group_by = self.to_template_columns(group_by)?;
let aggregate = self.to_template_columns(aggregate)?;
let window = self.to_template_columns(window)?;
let projection = self.to_template_columns(projection)?;
let order_by = self.to_template_columns(order_by)?;
let select_concat = group_by
.iter()
.chain(aggregate.iter())
.chain(window.iter())
.chain(projection.iter())
.cloned()
.collect::<Vec<_>>();
Expand All @@ -437,6 +440,7 @@ impl SqlTemplates {
select_concat => select_concat,
group_by => group_by_expr,
aggregate => aggregate,
window => window,
projection => projection,
order_by => order_by,
filter => filter,
Expand Down
Loading