Skip to content

Commit

Permalink
datacube: cleanups post finos#3737
Browse files Browse the repository at this point in the history
  • Loading branch information
akphi committed Jan 7, 2025
1 parent f50e5d0 commit e9327d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
_var,
} from '../DataCubeQueryBuilderUtils.js';
import { DataCubeFunction } from '../DataCubeQueryEngine.js';
import { Test__DataCubeEngine } from './Test__DataCubeEngine.js';
import { TEST__DataCubeEngine } from './TEST__DataCubeEngine.js';
import { DataCubeQuery } from '../model/DataCubeQuery.js';
import { INTERNAL__DataCubeSource } from '../model/DataCubeSource.js';

Expand Down Expand Up @@ -80,6 +80,7 @@ describe(unitTest('Analyze and build filter snapshot'), () => {
testName: FilterSnapshotAnalysisTestCase[0],
lambda: FilterSnapshotAnalysisTestCase[1],
) => {
const engine = new TEST__DataCubeEngine();
const partialQuery = V1_deserializeValueSpecification(
await ENGINE_TEST_SUPPORT__grammarToJSON_valueSpecification(lambda),
[],
Expand All @@ -92,17 +93,12 @@ describe(unitTest('Analyze and build filter snapshot'), () => {
partialQuery,
source,
baseQuery,
new Test__DataCubeEngine().filterOperations,
engine.filterOperations,
);
const query = _function(DataCubeFunction.FILTER, [
_lambda(
[_var()],
[
_filter(
snapshot.data.filter!,
new Test__DataCubeEngine().filterOperations,
),
],
[_filter(snapshot.data.filter!, engine.filterOperations)],
),
]);
const queryString = await ENGINE_TEST_SUPPORT__JSONToGrammar_model(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
type DataCubeQuerySnapshotBuilderTestCase,
} from './DatacubeQuerySnapshotBuilderTestUtils.js';
import { DataCubeConfiguration } from '../model/DataCubeConfiguration.js';
import { Test__DataCubeEngine } from './Test__DataCubeEngine.js';
import { TEST__DataCubeEngine } from './TEST__DataCubeEngine.js';

const cases: DataCubeQuerySnapshotBuilderTestCase[] = [
_testCase({
Expand Down Expand Up @@ -155,6 +155,7 @@ describe(unitTest('Analyze and build base snapshot'), () => {
configuration: DataCubeQuerySnapshotBuilderTestCase[3],
error: DataCubeQuerySnapshotBuilderTestCase[4],
) => {
const engine = new TEST__DataCubeEngine();
const partialQuery = _deserializeValueSpecification(
await ENGINE_TEST_SUPPORT__grammarToJSON_valueSpecification(code),
);
Expand All @@ -169,7 +170,7 @@ describe(unitTest('Analyze and build base snapshot'), () => {
partialQuery,
source,
baseQuery,
new Test__DataCubeEngine().filterOperations,
engine.filterOperations,
);
expect(error).toBeUndefined();
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
} from '../DataCubeEngine.js';
import type { DataCubeSource } from '../model/DataCubeSource.js';

export class Test__DataCubeEngine extends DataCubeEngine {
export class TEST__DataCubeEngine extends DataCubeEngine {
// TODO: implement the engine endpoints for testing

override processQuerySource(value: PlainObject): Promise<DataCubeSource> {
Expand Down

0 comments on commit e9327d8

Please sign in to comment.