Skip to content

Commit 40a2275

Browse files
committed
fix
1 parent df878c7 commit 40a2275

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/cubejs-backend-native/js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export const sql4sql = async (instance: SqlInterfaceInstance, sqlQuery: string,
448448
return native.sql4sql(instance, sqlQuery, disablePostProcessing, securityContext ? JSON.stringify(securityContext) : null);
449449
};
450450

451-
export const buildSqlAndParams = (cubeEvaluator: any): String => {
451+
export const buildSqlAndParams = (cubeEvaluator: any): any[] => {
452452
const native = loadNative();
453453
return native.buildSqlAndParams(cubeEvaluator);
454454
};

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -950,15 +950,8 @@ export class BaseQuery {
950950

951951
const buildResult = nativeBuildSqlAndParams(queryParams);
952952

953-
if (buildResult.error) {
954-
if (buildResult.error.cause === 'User') {
955-
throw new UserError(buildResult.error.message);
956-
} else {
957-
throw new Error(buildResult.error.message);
958-
}
959-
}
960953

961-
const [, , preAggregation] = buildResult.result;
954+
const [, , preAggregation] = buildResult;
962955
return preAggregation;
963956
}
964957

0 commit comments

Comments
 (0)