diff --git a/packages/cubejs-api-gateway/src/gateway.ts b/packages/cubejs-api-gateway/src/gateway.ts index 65132abcb4434..084de7d916bf0 100644 --- a/packages/cubejs-api-gateway/src/gateway.ts +++ b/packages/cubejs-api-gateway/src/gateway.ts @@ -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; @@ -1969,8 +1971,6 @@ class ApiGateway { ); res(await getFinalQueryResultArray(transformDataJson, rawData, resultDataJson)); - } else { - res(results[0]); } } } catch (e: any) { diff --git a/rust/cubeorchestrator/src/transport.rs b/rust/cubeorchestrator/src/transport.rs index e7cf56044a4b2..5bcd358a28a40 100644 --- a/rust/cubeorchestrator/src/transport.rs +++ b/rust/cubeorchestrator/src/transport.rs @@ -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")]