Skip to content

Commit 4656b7a

Browse files
committed
add useful comment
1 parent df854cb commit 4656b7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ export class DataSchemaCompiler {
9898

9999
if (getEnv('workerThreadsTranspilation')) {
100100
cubeNames = Object.keys(this.cubeDictionary.byId);
101+
// We need only cubes and all its member names for transpiling.
102+
// Communication between main and worker threads uses
103+
// The structured clone algorithm (@see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)
104+
// which doesn't allow passing any function objects, so we need to sanitize the symbols.
101105
cubeSymbolsNames = Object.fromEntries(
102106
Object.entries(this.cubeSymbols.symbols)
103107
.map(

0 commit comments

Comments
 (0)