Skip to content

Commit

Permalink
edits in result processing when streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Dec 18, 2024
1 parent 88cad9b commit f5425ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/cubejs-api-gateway/src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,9 @@ class ApiGateway {
})
);

if (!request.streaming) {
if (request.streaming) {
res(results[0]);
} else {
// We prepare the final json result on native side
const [transformDataJson, rawData, resultDataJson] = (results as {
transformDataParams: any;
Expand All @@ -1969,8 +1971,6 @@ class ApiGateway {
);

res(await getFinalQueryResultArray(transformDataJson, rawData, resultDataJson));
} else {
res(results[0]);
}
}
} catch (e: any) {
Expand Down
2 changes: 1 addition & 1 deletion rust/cubeorchestrator/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub struct GroupingSet {

// We can do nothing with JS functions here,
// but to keep DTOs in sync with reality, let's keep it.
type JsFunction = String;
pub type JsFunction = String;

#[derive(Debug, Clone, Serialize, Deserialize, Hash, Eq, PartialEq)]
#[serde(rename_all = "camelCase")]
Expand Down

0 comments on commit f5425ff

Please sign in to comment.