jayvee icon indicating copy to clipboard operation
jayvee copied to clipboard

[BUG] no execution result in composite blocktype

Open jrentlez opened this issue 1 year ago • 0 comments

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

jrentlez avatar Jun 19 '24 10:06 jrentlez