Skip to content

Commit 34d0085

Browse files
committed
edits in result processing when streaming
1 parent 0697c03 commit 34d0085

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,9 @@ class ApiGateway {
19551955
})
19561956
);
19571957

1958-
if (!request.streaming) {
1958+
if (request.streaming) {
1959+
res(results[0]);
1960+
} else {
19591961
// We prepare the final json result on native side
19601962
const [transformDataJson, rawData, resultDataJson] = (results as {
19611963
transformDataParams: any;
@@ -1971,8 +1973,6 @@ class ApiGateway {
19711973
);
19721974

19731975
res(await getFinalQueryResultArray(transformDataJson, rawData, resultDataJson));
1974-
} else {
1975-
res(results[0]);
19761976
}
19771977
}
19781978
} catch (e: any) {

rust/cubeorchestrator/src/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct GroupingSet {
8484

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

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

0 commit comments

Comments
 (0)