@comunica/actor-rdf-join-optional-nestedloop 3.3.0 → 4.0.1

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/README.md CHANGED
@@ -22,7 +22,7 @@ After installing, this package can be added to your engine's configuration as fo
22
22
  {
23
23
  "@context": [
24
24
  ...
25
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-optional-nestedloop/^3.0.0/components/context.jsonld"
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-optional-nestedloop/^4.0.0/components/context.jsonld"
26
26
  ],
27
27
  "actors": [
28
28
  ...
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-optional-nestedloop/^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-optional-nestedloop/^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-optional-nestedloop",
8
8
  "components": [
@@ -39,29 +39,37 @@
39
39
  "genericTypeInstances": [
40
40
  {
41
41
  "@type": "ParameterRangeGenericTypeReference",
42
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
42
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
43
43
  },
44
44
  {
45
45
  "@type": "ParameterRangeGenericTypeReference",
46
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
46
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
47
47
  },
48
48
  {
49
49
  "@type": "ParameterRangeGenericTypeReference",
50
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
50
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
51
+ },
52
+ {
53
+ "@type": "ParameterRangeGenericTypeReference",
54
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
51
55
  }
52
56
  ]
53
57
  },
54
58
  {
55
59
  "@type": "ParameterRangeGenericTypeReference",
56
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
61
+ },
62
+ {
63
+ "@type": "ParameterRangeGenericTypeReference",
64
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
57
65
  },
58
66
  {
59
67
  "@type": "ParameterRangeGenericTypeReference",
60
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
68
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
61
69
  },
62
70
  {
63
71
  "@type": "ParameterRangeGenericTypeReference",
64
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
72
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
65
73
  }
66
74
  ]
67
75
  },
@@ -71,6 +79,20 @@
71
79
  },
72
80
  "comment": "The bus this actor subscribes to."
73
81
  },
82
+ {
83
+ "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_busFailMessage",
84
+ "range": {
85
+ "@type": "ParameterRangeUnion",
86
+ "parameterRangeElements": [
87
+ "xsd:string",
88
+ {
89
+ "@type": "ParameterRangeUndefined"
90
+ }
91
+ ]
92
+ },
93
+ "default": "RDF joining failed: none of the configured actors were able to handle the join type ${action.type}",
94
+ "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}\""
95
+ },
74
96
  {
75
97
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_beforeActors",
76
98
  "range": {
@@ -84,15 +106,19 @@
84
106
  "genericTypeInstances": [
85
107
  {
86
108
  "@type": "ParameterRangeGenericTypeReference",
87
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
109
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
88
110
  },
89
111
  {
90
112
  "@type": "ParameterRangeGenericTypeReference",
91
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
113
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
92
114
  },
93
115
  {
94
116
  "@type": "ParameterRangeGenericTypeReference",
95
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
117
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
118
+ },
119
+ {
120
+ "@type": "ParameterRangeGenericTypeReference",
121
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
96
122
  }
97
123
  ]
98
124
  }
@@ -141,6 +167,12 @@
141
167
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_bus"
142
168
  }
143
169
  },
170
+ {
171
+ "keyRaw": "busFailMessage",
172
+ "value": {
173
+ "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_busFailMessage"
174
+ }
175
+ },
144
176
  {
145
177
  "keyRaw": "beforeActors",
146
178
  "value": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-optional-nestedloop/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-optional-nestedloop/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-join-optional-nestedloop",
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
- "carjon": "npmd:@comunica/actor-rdf-join-optional-nestedloop/^3.0.0/",
6
+ "carjon": "npmd:@comunica/actor-rdf-join-optional-nestedloop/^4.0.0/",
7
7
  "ActorRdfJoinOptionalNestedLoop": {
8
8
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop",
9
9
  "@prefix": true,
@@ -17,6 +17,9 @@
17
17
  "args_bus": {
18
18
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_bus"
19
19
  },
20
+ "args_busFailMessage": {
21
+ "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_busFailMessage"
22
+ },
20
23
  "args_beforeActors": {
21
24
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_beforeActors",
22
25
  "@container": "@list"
@@ -30,6 +33,9 @@
30
33
  "bus": {
31
34
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_bus"
32
35
  },
36
+ "busFailMessage": {
37
+ "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_busFailMessage"
38
+ },
33
39
  "beforeActors": {
34
40
  "@id": "carjon:components/ActorRdfJoinOptionalNestedLoop.jsonld#ActorRdfJoinOptionalNestedLoop_args_beforeActors",
35
41
  "@container": "@list"
@@ -1,12 +1,12 @@
1
- import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';
1
+ import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs, IActorRdfJoinTestSideData } from '@comunica/bus-rdf-join';
2
2
  import { ActorRdfJoin } from '@comunica/bus-rdf-join';
3
+ import type { TestResult } from '@comunica/core';
3
4
  import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
4
- import type { MetadataBindings } from '@comunica/types';
5
5
  /**
6
6
  * A comunica Optional Nested Loop RDF Join Actor.
7
7
  */
8
8
  export declare class ActorRdfJoinOptionalNestedLoop extends ActorRdfJoin {
9
9
  constructor(args: IActorRdfJoinArgs);
10
10
  getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
11
- protected getJoinCoefficients(action: IActionRdfJoin, metadatas: MetadataBindings[]): Promise<IMediatorTypeJoinCoefficients>;
11
+ protected getJoinCoefficients(action: IActionRdfJoin, sideData: IActorRdfJoinTestSideData): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
12
12
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorRdfJoinOptionalNestedLoop = void 0;
4
4
  const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
5
+ const core_1 = require("@comunica/core");
5
6
  const asyncjoin_1 = require("asyncjoin");
6
7
  /**
7
8
  * A comunica Optional Nested Loop RDF Join Actor.
@@ -21,20 +22,21 @@ class ActorRdfJoinOptionalNestedLoop extends bus_rdf_join_1.ActorRdfJoin {
21
22
  result: {
22
23
  type: 'bindings',
23
24
  bindingsStream: join,
24
- metadata: async () => await this.constructResultMetadata(action.entries, await bus_rdf_join_1.ActorRdfJoin.getMetadatas(action.entries), action.context, { canContainUndefs: true }, true),
25
+ metadata: async () => await this.constructResultMetadata(action.entries, await bus_rdf_join_1.ActorRdfJoin.getMetadatas(action.entries), action.context, {}, true),
25
26
  },
26
27
  };
27
28
  }
28
- async getJoinCoefficients(action, metadatas) {
29
+ async getJoinCoefficients(action, sideData) {
30
+ const { metadatas } = sideData;
29
31
  const requestInitialTimes = bus_rdf_join_1.ActorRdfJoin.getRequestInitialTimes(metadatas);
30
32
  const requestItemTimes = bus_rdf_join_1.ActorRdfJoin.getRequestItemTimes(metadatas);
31
- return {
33
+ return (0, core_1.passTestWithSideData)({
32
34
  iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,
33
35
  persistedItems: 0,
34
36
  blockingItems: 0,
35
37
  requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +
36
38
  requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],
37
- };
39
+ }, sideData);
38
40
  }
39
41
  }
40
42
  exports.ActorRdfJoinOptionalNestedLoop = ActorRdfJoinOptionalNestedLoop;
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinOptionalNestedLoop.js","sourceRoot":"","sources":["ActorRdfJoinOptionalNestedLoop.ts"],"names":[],"mappings":";;;AACA,yDAEgC;AAGhC,yCAA2C;AAE3C;;GAEG;AACH,MAAa,8BAA+B,SAAQ,2BAAY;IAC9D,YAAmB,IAAuB;QACxC,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,UAAU;YACvB,YAAY,EAAE,aAAa;YAC3B,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAAsB;QAC3C,MAAM,IAAI,GAAG,IAAI,0BAAc,CAC7B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EACvC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EACjC,2BAAY,CAAC,YAAY,EAC/B,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CACrC,CAAC;QACF,OAAO;YACL,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU;gBAChB,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,KAAK,IAAG,EAAE,CAAC,MAAM,IAAI,CAAC,uBAAuB,CACrD,MAAM,CAAC,OAAO,EACd,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,EAC/C,MAAM,CAAC,OAAO,EACd,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAC1B,IAAI,CACL;aACF;SACF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,MAAsB,EACtB,SAA6B;QAE7B,MAAM,mBAAmB,GAAG,2BAAY,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,gBAAgB,GAAG,2BAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACrE,OAAO;YACL,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC3E,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,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,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;SAChF,CAAC;IACJ,CAAC;CACF;AA9CD,wEA8CC","sourcesContent":["import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica Optional Nested Loop RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const join = new NestedLoopJoin<Bindings, Bindings, Bindings>(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n <any> ActorRdfJoin.joinBindings,\n { optional: true, autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n true,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise<IMediatorTypeJoinCoefficients> {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n"]}
1
+ {"version":3,"file":"ActorRdfJoinOptionalNestedLoop.js","sourceRoot":"","sources":["ActorRdfJoinOptionalNestedLoop.ts"],"names":[],"mappings":";;;AAMA,yDAEgC;AAEhC,yCAAsD;AAGtD,yCAA2C;AAE3C;;GAEG;AACH,MAAa,8BAA+B,SAAQ,2BAAY;IAC9D,YAAmB,IAAuB;QACxC,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,UAAU;YACvB,YAAY,EAAE,aAAa;YAC3B,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAAsB;QAC3C,MAAM,IAAI,GAAG,IAAI,0BAAc,CAC7B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EACvC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EACjC,2BAAY,CAAC,YAAY,EAC/B,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CACrC,CAAC;QACF,OAAO;YACL,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU;gBAChB,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,KAAK,IAAG,EAAE,CAAC,MAAM,IAAI,CAAC,uBAAuB,CACrD,MAAM,CAAC,OAAO,EACd,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,EAC/C,MAAM,CAAC,OAAO,EACd,EAAE,EACF,IAAI,CACL;aACF;SACF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,MAAsB,EACtB,QAAmC;QAEnC,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;QAC/B,MAAM,mBAAmB,GAAG,2BAAY,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,gBAAgB,GAAG,2BAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACrE,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK;YAC3E,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,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,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;SAChF,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;CACF;AA/CD,wEA+CC","sourcesContent":["import type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n IActorRdfJoinTestSideData,\n} from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { TestResult } from '@comunica/core';\nimport { passTestWithSideData } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica Optional Nested Loop RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const join = new NestedLoopJoin<Bindings, Bindings, Bindings>(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n <any> ActorRdfJoin.joinBindings,\n { optional: true, autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n {},\n true,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n const { metadatas } = sideData;\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return passTestWithSideData({\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n }, sideData);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-join-optional-nestedloop",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "A optional-nestedloop 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,10 +41,10 @@
37
41
  "build:components": "componentsjs-generator"
38
42
  },
39
43
  "dependencies": {
40
- "@comunica/bus-rdf-join": "^3.3.0",
41
- "@comunica/mediatortype-join-coefficients": "^3.3.0",
42
- "@comunica/types": "^3.3.0",
43
- "asyncjoin": "^1.2.3"
44
+ "@comunica/bus-rdf-join": "^4.0.1",
45
+ "@comunica/core": "^4.0.1",
46
+ "@comunica/mediatortype-join-coefficients": "^4.0.1",
47
+ "asyncjoin": "^1.2.4"
44
48
  },
45
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
49
+ "gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
46
50
  }