@comunica/actor-rdf-join-inner-multi-bind-source 3.3.0 → 4.0.1-alpha.48.0

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-bind-source/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-bind-source/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^4.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-rdf-join-inner-multi-bind-source",
8
8
  "components": [
@@ -11,7 +11,13 @@
11
11
  "@type": "Class",
12
12
  "requireElement": "ActorRdfJoinMultiBindSource",
13
13
  "extends": [
14
- "cbrj:components/ActorRdfJoin.jsonld#ActorRdfJoin"
14
+ {
15
+ "@type": "GenericComponentExtension",
16
+ "component": "cbrj:components/ActorRdfJoin.jsonld#ActorRdfJoin",
17
+ "genericTypeInstances": [
18
+ "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData"
19
+ ]
20
+ }
15
21
  ],
16
22
  "comment": "A comunica Inner Multi Bind Source RDF Join Actor.",
17
23
  "parameters": [
@@ -56,29 +62,37 @@
56
62
  "genericTypeInstances": [
57
63
  {
58
64
  "@type": "ParameterRangeGenericTypeReference",
59
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
66
+ },
67
+ {
68
+ "@type": "ParameterRangeGenericTypeReference",
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
60
70
  },
61
71
  {
62
72
  "@type": "ParameterRangeGenericTypeReference",
63
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
73
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
64
74
  },
65
75
  {
66
76
  "@type": "ParameterRangeGenericTypeReference",
67
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
77
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
68
78
  }
69
79
  ]
70
80
  },
71
81
  {
72
82
  "@type": "ParameterRangeGenericTypeReference",
73
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
83
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
74
84
  },
75
85
  {
76
86
  "@type": "ParameterRangeGenericTypeReference",
77
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
87
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
78
88
  },
79
89
  {
80
90
  "@type": "ParameterRangeGenericTypeReference",
81
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
91
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
92
+ },
93
+ {
94
+ "@type": "ParameterRangeGenericTypeReference",
95
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
82
96
  }
83
97
  ]
84
98
  },
@@ -88,6 +102,20 @@
88
102
  },
89
103
  "comment": "The bus this actor subscribes to."
90
104
  },
105
+ {
106
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_busFailMessage",
107
+ "range": {
108
+ "@type": "ParameterRangeUnion",
109
+ "parameterRangeElements": [
110
+ "xsd:string",
111
+ {
112
+ "@type": "ParameterRangeUndefined"
113
+ }
114
+ ]
115
+ },
116
+ "default": "RDF joining failed: none of the configured actors were able to handle the join type ${action.type}",
117
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
118
+ },
91
119
  {
92
120
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_beforeActors",
93
121
  "range": {
@@ -101,15 +129,19 @@
101
129
  "genericTypeInstances": [
102
130
  {
103
131
  "@type": "ParameterRangeGenericTypeReference",
104
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
132
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
133
+ },
134
+ {
135
+ "@type": "ParameterRangeGenericTypeReference",
136
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
105
137
  },
106
138
  {
107
139
  "@type": "ParameterRangeGenericTypeReference",
108
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
140
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
109
141
  },
110
142
  {
111
143
  "@type": "ParameterRangeGenericTypeReference",
112
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
144
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
113
145
  }
114
146
  ]
115
147
  }
@@ -199,6 +231,12 @@
199
231
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_bus"
200
232
  }
201
233
  },
234
+ {
235
+ "keyRaw": "busFailMessage",
236
+ "value": {
237
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_busFailMessage"
238
+ }
239
+ },
202
240
  {
203
241
  "keyRaw": "beforeActors",
204
242
  "value": {
@@ -214,7 +252,13 @@
214
252
  "@type": "AbstractClass",
215
253
  "requireElement": "IActorRdfJoinInnerMultiBindSourceArgs",
216
254
  "extends": [
217
- "cbrj:components/ActorRdfJoin.jsonld#IActorRdfJoinArgs"
255
+ {
256
+ "@type": "GenericComponentExtension",
257
+ "component": "cbrj:components/ActorRdfJoin.jsonld#IActorRdfJoinArgs",
258
+ "genericTypeInstances": [
259
+ "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData"
260
+ ]
261
+ }
218
262
  ],
219
263
  "parameters": [],
220
264
  "memberFields": [
@@ -232,6 +276,26 @@
232
276
  }
233
277
  ],
234
278
  "constructorArguments": []
279
+ },
280
+ {
281
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData",
282
+ "@type": "AbstractClass",
283
+ "requireElement": "IActorRdfJoinMultiBindSourceTestSideData",
284
+ "extends": [
285
+ "cbrj:components/ActorRdfJoin.jsonld#IActorRdfJoinTestSideData"
286
+ ],
287
+ "parameters": [],
288
+ "memberFields": [
289
+ {
290
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData__member_entriesUnsorted",
291
+ "memberFieldName": "entriesUnsorted"
292
+ },
293
+ {
294
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData__member_entriesSorted",
295
+ "memberFieldName": "entriesSorted"
296
+ }
297
+ ],
298
+ "constructorArguments": []
235
299
  }
236
300
  ]
237
301
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-bind-source/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-bind-source/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-join-inner-multi-bind-source",
6
6
  "@type": "Module",
@@ -3,7 +3,7 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "carjimbs": "npmd:@comunica/actor-rdf-join-inner-multi-bind-source/^3.0.0/",
6
+ "carjimbs": "npmd:@comunica/actor-rdf-join-inner-multi-bind-source/^4.0.0/",
7
7
  "ActorRdfJoinMultiBindSource": {
8
8
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource",
9
9
  "@prefix": true,
@@ -26,6 +26,9 @@
26
26
  "args_bus": {
27
27
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_bus"
28
28
  },
29
+ "args_busFailMessage": {
30
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_busFailMessage"
31
+ },
29
32
  "args_beforeActors": {
30
33
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_beforeActors",
31
34
  "@container": "@list"
@@ -48,6 +51,9 @@
48
51
  "bus": {
49
52
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_bus"
50
53
  },
54
+ "busFailMessage": {
55
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_busFailMessage"
56
+ },
51
57
  "beforeActors": {
52
58
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#ActorRdfJoinMultiBindSource_args_beforeActors",
53
59
  "@container": "@list"
@@ -58,6 +64,11 @@
58
64
  "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinInnerMultiBindSourceArgs",
59
65
  "@prefix": true,
60
66
  "@context": {}
67
+ },
68
+ "IActorRdfJoinMultiBindSourceTestSideData": {
69
+ "@id": "carjimbs:components/ActorRdfJoinMultiBindSource.jsonld#IActorRdfJoinMultiBindSourceTestSideData",
70
+ "@prefix": true,
71
+ "@context": {}
61
72
  }
62
73
  }
63
74
  ]
@@ -1,23 +1,25 @@
1
- import type { IActionRdfJoin, IActorRdfJoinArgs, IActorRdfJoinOutputInner } from '@comunica/bus-rdf-join';
1
+ import type { IActionRdfJoin, IActorRdfJoinArgs, IActorRdfJoinOutputInner, IActorRdfJoinTestSideData } from '@comunica/bus-rdf-join';
2
2
  import { ActorRdfJoin } from '@comunica/bus-rdf-join';
3
3
  import type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';
4
+ import type { TestResult } from '@comunica/core';
4
5
  import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
5
- import type { IJoinEntryWithMetadata, MetadataBindings, IActionContext } from '@comunica/types';
6
+ import type { IJoinEntryWithMetadata, IActionContext } from '@comunica/types';
6
7
  import type { Algebra } from 'sparqlalgebrajs';
8
+ import { Factory } from 'sparqlalgebrajs';
7
9
  /**
8
10
  * A comunica Inner Multi Bind Source RDF Join Actor.
9
11
  */
10
- export declare class ActorRdfJoinMultiBindSource extends ActorRdfJoin {
12
+ export declare class ActorRdfJoinMultiBindSource extends ActorRdfJoin<IActorRdfJoinMultiBindSourceTestSideData> {
11
13
  readonly selectivityModifier: number;
12
14
  readonly blockSize: number;
13
15
  readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;
14
16
  constructor(args: IActorRdfJoinInnerMultiBindSourceArgs);
15
- getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
16
- protected sortJoinEntries(entries: IJoinEntryWithMetadata[], context: IActionContext): Promise<IJoinEntryWithMetadata[]>;
17
- getJoinCoefficients(action: IActionRdfJoin, metadatas: MetadataBindings[]): Promise<IMediatorTypeJoinCoefficients>;
18
- createOperationFromEntries(remainingEntries: IJoinEntryWithMetadata[]): Algebra.Operation;
17
+ getOutput(action: IActionRdfJoin, sideData: IActorRdfJoinMultiBindSourceTestSideData): Promise<IActorRdfJoinOutputInner>;
18
+ protected sortJoinEntries(entries: IJoinEntryWithMetadata[], context: IActionContext): Promise<TestResult<IJoinEntryWithMetadata[]>>;
19
+ getJoinCoefficients(action: IActionRdfJoin, sideData: IActorRdfJoinTestSideData): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinMultiBindSourceTestSideData>>;
20
+ createOperationFromEntries(algebraFactory: Factory, remainingEntries: IJoinEntryWithMetadata[]): Algebra.Operation;
19
21
  }
20
- export interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs {
22
+ export interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs<IActorRdfJoinMultiBindSourceTestSideData> {
21
23
  /**
22
24
  * Multiplier for selectivity values
23
25
  * @range {double}
@@ -34,3 +36,7 @@ export interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs
34
36
  */
35
37
  mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;
36
38
  }
39
+ export interface IActorRdfJoinMultiBindSourceTestSideData extends IActorRdfJoinTestSideData {
40
+ entriesUnsorted: IJoinEntryWithMetadata[];
41
+ entriesSorted: IJoinEntryWithMetadata[];
42
+ }
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorRdfJoinMultiBindSource = void 0;
4
- const bus_query_operation_1 = require("@comunica/bus-query-operation");
5
4
  const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
5
+ const context_entries_1 = require("@comunica/context-entries");
6
+ const core_1 = require("@comunica/core");
7
+ const utils_iterator_1 = require("@comunica/utils-iterator");
8
+ const utils_query_operation_1 = require("@comunica/utils-query-operation");
6
9
  const asynciterator_1 = require("asynciterator");
7
10
  const sparqlalgebrajs_1 = require("sparqlalgebrajs");
8
- const AF = new sparqlalgebrajs_1.Factory();
9
11
  /**
10
12
  * A comunica Inner Multi Bind Source RDF Join Actor.
11
13
  */
@@ -17,10 +19,11 @@ class ActorRdfJoinMultiBindSource extends bus_rdf_join_1.ActorRdfJoin {
17
19
  canHandleUndefs: true,
18
20
  });
19
21
  }
20
- async getOutput(action) {
22
+ async getOutput(action, sideData) {
23
+ const dataFactory = action.context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
24
+ const algebraFactory = new sparqlalgebrajs_1.Factory(dataFactory);
21
25
  // Order the entries so we can pick the first one (usually the one with the lowest cardinality)
22
- const entriesUnsorted = await bus_rdf_join_1.ActorRdfJoin.getEntriesWithMetadatas(action.entries);
23
- const entries = await this.sortJoinEntries(entriesUnsorted, action.context);
26
+ const entries = sideData.entriesSorted;
24
27
  this.logDebug(action.context, 'First entry for Bind Join Source: ', () => ({ entry: entries[0].operation, metadata: entries[0].metadata }));
25
28
  // Close the non-smallest streams
26
29
  for (const [i, element] of entries.entries()) {
@@ -34,11 +37,11 @@ class ActorRdfJoinMultiBindSource extends bus_rdf_join_1.ActorRdfJoin {
34
37
  const remainingEntries = [...entries];
35
38
  remainingEntries.splice(0, 1);
36
39
  // Get source for remaining entries (guaranteed thanks to prior check in getJoinCoefficients())
37
- const sourceWrapper = bus_query_operation_1.ActorQueryOperation.getOperationSource(remainingEntries[0].operation);
40
+ const sourceWrapper = (0, utils_query_operation_1.getOperationSource)(remainingEntries[0].operation);
38
41
  // Determine the operation to pass
39
- const operation = this.createOperationFromEntries(remainingEntries);
42
+ const operation = this.createOperationFromEntries(algebraFactory, remainingEntries);
40
43
  // Slice the smallest stream into chunks according to the block size, so we avoid blocking too long.
41
- const chunkedStreams = new bus_rdf_join_1.ChunkedIterator(smallestStream.bindingsStream, this.blockSize, { autoStart: false });
44
+ const chunkedStreams = new utils_iterator_1.ChunkedIterator(smallestStream.bindingsStream, this.blockSize, { autoStart: false });
42
45
  // For each chunk, pass the query and the bindings to the source for execution
43
46
  const bindingsStream = new asynciterator_1.UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(operation, sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context, { joinBindings: { bindings: chunk, metadata: smallestMetadata } })));
44
47
  return {
@@ -48,12 +51,16 @@ class ActorRdfJoinMultiBindSource extends bus_rdf_join_1.ActorRdfJoin {
48
51
  metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),
49
52
  },
50
53
  physicalPlanMetadata: {
51
- bindIndex: entriesUnsorted.indexOf(entries[0]),
54
+ bindIndex: sideData.entriesUnsorted.indexOf(entries[0]),
52
55
  },
53
56
  };
54
57
  }
55
58
  async sortJoinEntries(entries, context) {
56
- entries = await bus_rdf_join_1.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);
59
+ const entriesTest = await bus_rdf_join_1.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);
60
+ if (entriesTest.isFailed()) {
61
+ return entriesTest;
62
+ }
63
+ entries = entriesTest.get();
57
64
  // Prioritize entries with modified operations, so these are not re-executed
58
65
  entries = entries.sort((entryLeft, entryRight) => {
59
66
  if (entryLeft.operationModified && !entryRight.operationModified) {
@@ -61,62 +68,68 @@ class ActorRdfJoinMultiBindSource extends bus_rdf_join_1.ActorRdfJoin {
61
68
  }
62
69
  return 0;
63
70
  });
64
- return entries;
71
+ return (0, core_1.passTest)(entries);
65
72
  }
66
- async getJoinCoefficients(action, metadatas) {
73
+ async getJoinCoefficients(action, sideData) {
74
+ let { metadatas } = sideData;
75
+ const dataFactory = action.context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
76
+ const algebraFactory = new sparqlalgebrajs_1.Factory(dataFactory);
67
77
  // Order the entries so we can pick the first one (usually the one with the lowest cardinality)
68
- const entries = await this.sortJoinEntries(action.entries
69
- .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);
70
- metadatas = entries.map(entry => entry.metadata);
78
+ const entriesUnsorted = action.entries.map((entry, i) => ({ ...entry, metadata: metadatas[i] }));
79
+ const entriesTest = await this.sortJoinEntries(entriesUnsorted, action.context);
80
+ if (entriesTest.isFailed()) {
81
+ return entriesTest;
82
+ }
83
+ const entriesSorted = entriesTest.get();
84
+ metadatas = entriesSorted.map(entry => entry.metadata);
71
85
  const requestInitialTimes = bus_rdf_join_1.ActorRdfJoin.getRequestInitialTimes(metadatas);
72
86
  const requestItemTimes = bus_rdf_join_1.ActorRdfJoin.getRequestItemTimes(metadatas);
73
87
  // Determine first stream and remaining ones
74
- const remainingEntries = [...entries];
88
+ const remainingEntries = [...entriesSorted];
75
89
  const remainingRequestInitialTimes = [...requestInitialTimes];
76
90
  const remainingRequestItemTimes = [...requestItemTimes];
77
91
  remainingEntries.splice(0, 1);
78
92
  remainingRequestInitialTimes.splice(0, 1);
79
93
  remainingRequestItemTimes.splice(0, 1);
80
94
  // Reject binding on operations without sources
81
- const sources = remainingEntries.map(entry => bus_query_operation_1.ActorQueryOperation.getOperationSource(entry.operation));
95
+ const sources = remainingEntries.map(entry => (0, utils_query_operation_1.getOperationSource)(entry.operation));
82
96
  if (sources.some(source => !source)) {
83
- throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);
97
+ return (0, core_1.failTest)(`Actor ${this.name} can not bind on remaining operations without source annotation`);
84
98
  }
85
99
  // Reject binding on operations with un-equal sources
86
100
  if (sources.some(source => source !== sources[0])) {
87
- throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);
101
+ return (0, core_1.failTest)(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);
88
102
  }
89
103
  // Reject if the source can not handle bindings
90
104
  const sourceWrapper = sources[0];
91
- const testingOperation = this.createOperationFromEntries(remainingEntries);
105
+ const testingOperation = this.createOperationFromEntries(algebraFactory, remainingEntries);
92
106
  const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);
93
- if (!bus_query_operation_1.ActorQueryOperation
94
- .doesShapeAcceptOperation(selectorShape, testingOperation, { joinBindings: true })) {
95
- throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);
107
+ if (!(0, utils_query_operation_1.doesShapeAcceptOperation)(selectorShape, testingOperation, { joinBindings: true })) {
108
+ return (0, core_1.failTest)(`Actor ${this.name} detected a source that can not handle passing down join bindings`);
96
109
  }
97
110
  // Determine selectivities of smallest entry with all other entries
98
111
  const selectivities = await Promise.all(remainingEntries
99
112
  .map(async (entry) => (await this.mediatorJoinSelectivity.mediate({
100
- entries: [entries[0], entry],
113
+ entries: [entriesSorted[0], entry],
101
114
  context: action.context,
102
115
  })).selectivity * this.selectivityModifier));
103
116
  // Determine coefficients for remaining entries
104
117
  const cardinalityRemaining = remainingEntries
105
118
  .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])
106
119
  .reduce((sum, element) => sum + element, 0);
107
- return {
120
+ return (0, core_1.passTestWithSideData)({
108
121
  iterations: 1,
109
122
  persistedItems: metadatas[0].cardinality.value,
110
123
  blockingItems: metadatas[0].cardinality.value,
111
124
  requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +
112
125
  requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],
113
- };
126
+ }, { ...sideData, entriesUnsorted, entriesSorted });
114
127
  }
115
- createOperationFromEntries(remainingEntries) {
128
+ createOperationFromEntries(algebraFactory, remainingEntries) {
116
129
  if (remainingEntries.length === 1) {
117
130
  return remainingEntries[0].operation;
118
131
  }
119
- return AF.createJoin(remainingEntries.map(entry => entry.operation), true);
132
+ return algebraFactory.createJoin(remainingEntries.map(entry => entry.operation), true);
120
133
  }
121
134
  }
122
135
  exports.ActorRdfJoinMultiBindSource = ActorRdfJoinMultiBindSource;
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinMultiBindSource.js","sourceRoot":"","sources":["ActorRdfJoinMultiBindSource.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAEpE,yDAAuE;AAYvE,iDAA8C;AAE9C,qDAA0C;AAE1C,MAAM,EAAE,GAAG,IAAI,yBAAO,EAAE,CAAC;AAEzB;;GAEG;AACH,MAAa,2BAA4B,SAAQ,2BAAY;IAK3D,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,E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AW,GAAG,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAE/C,+CAA+C;QAC/C,MAAM,oBAAoB,GAAG,gBAAgB;aAC1C,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;aACtE,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;QAE9C,OAAO;YACL,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC9C,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC7C,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;gBACxF,mBAAmB,CAAC,CAAC,CAAC,GAAG,oBAAoB,GAAG,gBAAgB,CAAC,CAAC,CAAC;SACtE,CAAC;IACJ,CAAC;IAEM,0BAA0B,CAAC,gBAA0C;QAC1E,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvC,CAAC;QACD,OAAO,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;CACF;AAzJD,kEAyJC","sourcesContent":["import { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinArgs, IActorRdfJoinOutputInner } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin, ChunkedIterator } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n IJoinEntryWithMetadata,\n IQueryOperationResultBindings,\n IQuerySourceWrapper,\n MetadataBindings,\n IActionContext,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\n\n/**\n * A comunica Inner Multi Bind Source RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBindSource extends ActorRdfJoin {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n\n public constructor(args: IActorRdfJoinInnerMultiBindSourceArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind-source',\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas(action.entries);\n const entries = await this.sortJoinEntries(entriesUnsorted, action.context);\n\n this.logDebug(\n action.context,\n 'First entry for Bind Join Source: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const smallestMetadata = entries[0].metadata;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Get source for remaining entries (guaranteed thanks to prior check in getJoinCoefficients())\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(remainingEntries[0].operation)!;\n\n // Determine the operation to pass\n const operation = this.createOperationFromEntries(remainingEntries);\n\n // Slice the smallest stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator<AsyncIterator<RDF.Bindings>> = new ChunkedIterator(\n smallestStream.bindingsStream,\n this.blockSize,\n { autoStart: false },\n );\n\n // For each chunk, pass the query and the bindings to the source for execution\n const bindingsStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { joinBindings: { bindings: chunk, metadata: smallestMetadata }},\n )));\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: entriesUnsorted.indexOf(entries[0]),\n },\n };\n }\n\n protected async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise<IJoinEntryWithMetadata[]> {\n entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);\n\n // Prioritize entries with modified operations, so these are not re-executed\n entries = entries.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n return entries;\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise<IMediatorTypeJoinCoefficients> {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entries.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entries ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on operations without sources\n const sources = remainingEntries.map(entry => ActorQueryOperation.getOperationSource(entry.operation));\n if (sources.some(source => !source)) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);\n }\n\n // Reject binding on operations with un-equal sources\n if (sources.some(source => source !== sources[0])) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);\n }\n\n // Reject if the source can not handle bindings\n const sourceWrapper: IQuerySourceWrapper = sources[0]!;\n const testingOperation = this.createOperationFromEntries(remainingEntries);\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!ActorQueryOperation\n .doesShapeAcceptOperation(selectorShape, testingOperation, { joinBindings: true })) {\n throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entries[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n\n return {\n iterations: 1,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n };\n }\n\n public createOperationFromEntries(remainingEntries: IJoinEntryWithMetadata[]): Algebra.Operation {\n if (remainingEntries.length === 1) {\n return remainingEntries[0].operation;\n }\n return AF.createJoin(remainingEntries.map(entry => entry.operation), true);\n }\n}\n\nexport interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {16}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n}\n"]}
1
+ {"version":3,"file":"ActorRdfJoinMultiBindSource.js","sourceRoot":"","sources":["ActorRdfJoinMultiBindSource.ts"],"names":[],"mappings":";;;AAMA,yDAAsD;AAEtD,+DAA0D;AAE1D,yCAA0E;AAS1E,6DAA2D;AAC3D,2EAA+F;AAG/F,iDAA8C;AAE9C,qDAA0C;AAE1C;;GAEG;AACH,MAAa,2BAA4B,SAAQ,2BAAsD;IAKrG,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,aAAa;YAC3B,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,SAAS,CACpB,MAAsB,EACtB,QAAkD;QAElD,MAAM,WAAW,GAAwB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QAC3F,MAAM,cAAc,GAAG,IAAI,yBAAO,CAAC,WAAW,CAAC,CAAC;QAEhD,+FAA+F;QAC/F,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;QACvC,IAAI,CAAC,QAAQ,CACX,MAAM,CAAC,OAAO,EACd,oCAAoC,EACpC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CACvE,CAAC;QAEF,iCAAiC;QACjC,KAAK,MAAM,CAAE,CAAC,EAAE,OAAO,CAAE,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACZ,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;YACxC,CAAC;QACH,CAAC;QAED,8CAA8C;QAC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C,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;QAE9C,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC9C,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC7C,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;gBACxF,mBAAmB,CAAC,CAAC,CAAC,GAAG,oBAAoB,GAAG,gBAAgB,CAAC,CAAC,CAAC;SACtE,EAAE,EAAE,GAAG,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,0BAA0B,CAC/B,cAAuB,EACvB,gBAA0C;QAE1C,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvC,CAAC;QACD,OAAO,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;IACzF,CAAC;CACF;AA5KD,kEA4KC","sourcesContent":["import type {\n IActionRdfJoin,\n IActorRdfJoinArgs,\n IActorRdfJoinOutputInner,\n IActorRdfJoinTestSideData,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { TestResult } from '@comunica/core';\nimport { passTestWithSideData, failTest, passTest } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n IJoinEntryWithMetadata,\n IQueryOperationResultBindings,\n IQuerySourceWrapper,\n IActionContext,\n ComunicaDataFactory,\n} from '@comunica/types';\nimport { ChunkedIterator } from '@comunica/utils-iterator';\nimport { doesShapeAcceptOperation, getOperationSource } from '@comunica/utils-query-operation';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica Inner Multi Bind Source RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBindSource extends ActorRdfJoin<IActorRdfJoinMultiBindSourceTestSideData> {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n\n public constructor(args: IActorRdfJoinInnerMultiBindSourceArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind-source',\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinMultiBindSourceTestSideData,\n ): Promise<IActorRdfJoinOutputInner> {\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new Factory(dataFactory);\n\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = sideData.entriesSorted;\n this.logDebug(\n action.context,\n 'First entry for Bind Join Source: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const smallestMetadata = entries[0].metadata;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Get source for remaining entries (guaranteed thanks to prior check in getJoinCoefficients())\n const sourceWrapper = <IQuerySourceWrapper> getOperationSource(remainingEntries[0].operation);\n\n // Determine the operation to pass\n const operation = this.createOperationFromEntries(algebraFactory, remainingEntries);\n\n // Slice the smallest stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator<AsyncIterator<RDF.Bindings>> = new ChunkedIterator(\n smallestStream.bindingsStream,\n this.blockSize,\n { autoStart: false },\n );\n\n // For each chunk, pass the query and the bindings to the source for execution\n const bindingsStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { joinBindings: { bindings: chunk, metadata: smallestMetadata }},\n )));\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: sideData.entriesUnsorted.indexOf(entries[0]),\n },\n };\n }\n\n protected async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise<TestResult<IJoinEntryWithMetadata[]>> {\n const entriesTest = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);\n if (entriesTest.isFailed()) {\n return entriesTest;\n }\n entries = entriesTest.get();\n\n // Prioritize entries with modified operations, so these are not re-executed\n entries = entries.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n return passTest(entries);\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinMultiBindSourceTestSideData>> {\n let { metadatas } = sideData;\n\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new Factory(dataFactory);\n\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = action.entries.map((entry, i) => ({ ...entry, metadata: metadatas[i] }));\n const entriesTest = await this.sortJoinEntries(entriesUnsorted, action.context);\n if (entriesTest.isFailed()) {\n return entriesTest;\n }\n const entriesSorted = entriesTest.get();\n metadatas = entriesSorted.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entriesSorted ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on operations without sources\n const sources = remainingEntries.map(entry => getOperationSource(entry.operation));\n if (sources.some(source => !source)) {\n return failTest(`Actor ${this.name} can not bind on remaining operations without source annotation`);\n }\n\n // Reject binding on operations with un-equal sources\n if (sources.some(source => source !== sources[0])) {\n return failTest(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);\n }\n\n // Reject if the source can not handle bindings\n const sourceWrapper: IQuerySourceWrapper = <IQuerySourceWrapper> sources[0];\n const testingOperation = this.createOperationFromEntries(algebraFactory, remainingEntries);\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!doesShapeAcceptOperation(selectorShape, testingOperation, { joinBindings: true })) {\n return failTest(`Actor ${this.name} detected a source that can not handle passing down join bindings`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entriesSorted[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n\n return passTestWithSideData({\n iterations: 1,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n }, { ...sideData, entriesUnsorted, entriesSorted });\n }\n\n public createOperationFromEntries(\n algebraFactory: Factory,\n remainingEntries: IJoinEntryWithMetadata[],\n ): Algebra.Operation {\n if (remainingEntries.length === 1) {\n return remainingEntries[0].operation;\n }\n return algebraFactory.createJoin(remainingEntries.map(entry => entry.operation), true);\n }\n}\n\nexport interface IActorRdfJoinInnerMultiBindSourceArgs\n extends IActorRdfJoinArgs<IActorRdfJoinMultiBindSourceTestSideData> {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {16}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n}\n\nexport interface IActorRdfJoinMultiBindSourceTestSideData extends IActorRdfJoinTestSideData {\n entriesUnsorted: IJoinEntryWithMetadata[];\n entriesSorted: IJoinEntryWithMetadata[];\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-join-inner-multi-bind-source",
3
- "version": "3.3.0",
3
+ "version": "4.0.1-alpha.48.0",
4
4
  "description": "A inner-multi-bind-source rdf-join actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/comunica-association"
10
+ },
7
11
  "homepage": "https://comunica.dev/",
8
12
  "repository": {
9
13
  "type": "git",
@@ -37,14 +41,16 @@
37
41
  "build:components": "componentsjs-generator"
38
42
  },
39
43
  "dependencies": {
40
- "@comunica/bus-query-operation": "^3.3.0",
41
- "@comunica/bus-rdf-join": "^3.3.0",
42
- "@comunica/bus-rdf-join-entries-sort": "^3.3.0",
43
- "@comunica/mediatortype-join-coefficients": "^3.3.0",
44
- "@comunica/types": "^3.3.0",
45
- "@rdfjs/types": "*",
44
+ "@comunica/bus-rdf-join": "4.0.1-alpha.48.0",
45
+ "@comunica/bus-rdf-join-entries-sort": "4.0.1-alpha.48.0",
46
+ "@comunica/context-entries": "4.0.1-alpha.48.0",
47
+ "@comunica/core": "4.0.1-alpha.48.0",
48
+ "@comunica/mediatortype-join-coefficients": "4.0.1-alpha.48.0",
49
+ "@comunica/types": "4.0.1-alpha.48.0",
50
+ "@comunica/utils-iterator": "4.0.1-alpha.48.0",
51
+ "@comunica/utils-query-operation": "4.0.1-alpha.48.0",
46
52
  "asynciterator": "^3.9.0",
47
- "sparqlalgebrajs": "^4.3.7"
53
+ "sparqlalgebrajs": "^4.3.8"
48
54
  },
49
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
55
+ "gitHead": "4cc37905eab2c94a2e1d9cee0f51c53604f07da1"
50
56
  }