datajunction-ui 0.0.102 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1257,7 +1257,7 @@ export function QueryPlannerPage() {
|
|
|
1257
1257
|
selectedMetrics,
|
|
1258
1258
|
selectedDimensions,
|
|
1259
1259
|
filters,
|
|
1260
|
-
selectedEngine,
|
|
1260
|
+
selectedEngine || null,
|
|
1261
1261
|
progress => setQueryLinks(progress.links || []),
|
|
1262
1262
|
);
|
|
1263
1263
|
const elapsed = (Date.now() - startTime) / 1000;
|
|
@@ -1259,9 +1259,10 @@ export const DataJunctionAPI = {
|
|
|
1259
1259
|
if (filters && filters.length > 0) {
|
|
1260
1260
|
filters.forEach(f => params.append('filters', f));
|
|
1261
1261
|
}
|
|
1262
|
-
const resolvedDialect = dialect || (useMaterialized ? 'druid' : 'trino');
|
|
1263
1262
|
params.append('use_materialized', useMaterialized ? 'true' : 'false');
|
|
1264
|
-
|
|
1263
|
+
if (dialect) {
|
|
1264
|
+
params.append('dialect', dialect);
|
|
1265
|
+
}
|
|
1265
1266
|
return await (
|
|
1266
1267
|
await fetch(`${DJ_URL}/sql/metrics/v3/?${params}`, {
|
|
1267
1268
|
credentials: 'include',
|
|
@@ -1284,7 +1285,9 @@ export const DataJunctionAPI = {
|
|
|
1284
1285
|
}
|
|
1285
1286
|
params.append('limit', '10000');
|
|
1286
1287
|
params.append('async_', 'true');
|
|
1287
|
-
|
|
1288
|
+
if (dialect) {
|
|
1289
|
+
params.append('dialect', dialect);
|
|
1290
|
+
}
|
|
1288
1291
|
|
|
1289
1292
|
let pollInterval = 1000;
|
|
1290
1293
|
|
|
@@ -2999,7 +2999,7 @@ describe('DataJunctionAPI', () => {
|
|
|
2999
2999
|
// ===== metricsV3 — useMaterialized=false branch (lines 1224-1225) =====
|
|
3000
3000
|
it('calls metricsV3 with useMaterialized=false (trino dialect)', async () => {
|
|
3001
3001
|
fetch.mockResponseOnce(JSON.stringify({ sql: 'SELECT ...' }));
|
|
3002
|
-
await DataJunctionAPI.metricsV3(['metric1'], ['dim1'], [], false);
|
|
3002
|
+
await DataJunctionAPI.metricsV3(['metric1'], ['dim1'], [], false, 'trino');
|
|
3003
3003
|
const url = fetch.mock.calls[0][0];
|
|
3004
3004
|
expect(url).toContain('use_materialized=false');
|
|
3005
3005
|
expect(url).toContain('dialect=trino');
|