Skip to content

Commit f5425ff

Browse files
committed
edits in result processing when streaming
1 parent 88cad9b commit f5425ff

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
@@ -1953,7 +1953,9 @@ class ApiGateway {
19531953
})
19541954
);
19551955

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

19711973
res(await getFinalQueryResultArray(transformDataJson, rawData, resultDataJson));
1972-
} else {
1973-
res(results[0]);
19741974
}
19751975
}
19761976
} 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)