Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] no execution result in composite blocktype #591

Open
TungstnBallon opened this issue Jun 19, 2024 · 0 comments
Open

[BUG] no execution result in composite blocktype #591

TungstnBallon opened this issue Jun 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TungstnBallon
Copy link
Contributor

Steps to reproduce

run this model:

pipeline pip {

	XTractor
		-> TextFile
		-> CSV
		-> Table
		-> ToDecimals
		-> Loader;

	block XTractor oftype LocalFileExtractor {
		filePath: "data.csv";
	}

	block TextFile oftype TextFileInterpreter { }
	block CSV oftype CSVInterpreter { }

	block Table oftype TableInterpreter {
		header: false;
		columns: [
			"c" oftype text,
		];
	}


	block ToDecimals oftype DecimalParser2 {
		columnName: "c";
	}

	block Loader oftype SQLiteLoader {
		table: "table";
		file: "out.sqlite";
	}
}

composite blocktype DecimalParser2 {
	input WithTextColumn oftype Table;
	output WithDecimalColumn oftype Table;

	property columnName oftype text;

	WithTextColumn
		-> ParseDecimalBlock
		-> WithDecimalColumn;

	transform ParseDecimal {
		from decText oftype text;
		to dec oftype decimal;

		dec: asDecimal decText;
	}

	block ParseDecimalBlock oftype TableTransformer {
		inputColumns: [
			columnName
		];
		outputColumn: columnName;

		uses: ParseDecimal;
	}
}

data.csv:

"32.0"

Description

  • Expected: The pipeline runs without errors
  • Actual: an error is thrown here
        error: An unknown error occurred: AssertionError [ERR_ASSERTION]: No execution result found for composite block DecimalParser
    at AbstractBlockExecutor.doExecute (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:12476:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AbstractBlockExecutor.execute (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:11154:29)
    at async executeBlock (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:11979:14)
    at async executeBlocks (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:11952:29)
    at async runPipeline (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:14557:27)
    at async Promise.all (index 0)
    at async interpretJayveeModel (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:14525:21)
    at async interpretModel (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:14484:34)
    at async Command.runAction (file:///home/jonas/.local/share/npm/lib/node_modules/@jvalue/jayvee-interpreter/main.js:14618:20)
        $In /home/jonas/Code/uni/mwe2/model.jv:25:8
        25 |     block ToDecimals oftype DecimalParser {
           |           ^^^^^^^^^^

This error does not occur if the composite blocktype is replaced with a regular TableTransformer inside the pipeline

@TungstnBallon TungstnBallon added the bug Something isn't working label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant