You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected: A cars.sqlite file is created without errors
Actual: The interpreter crashes when trying to print the table
error: An unknown error occurred: TypeError: column.getValueType is not a function
at file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:10222:40
at Array.map (<anonymous>)
at DebugLogVisitor.visitTsTable (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:10221:40)
at _TsTable.acceptVisitor (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:11153:20)
at TsTableTransformerExecutor.logBlockResult (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:10371:12)
at TsTableTransformerExecutor.execute (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:10351:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async executeBlock (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:11356:14)
at async executeBlocks (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:11325:29)
at async runPipeline (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:14252:27)
at async Promise.all (index 0)
at async interpretJayveeModel (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:14219:21)
at async interpretModel (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:14177:34)
at async Command.runAction (file:///home/jonas/Code/uni/ss24-zeltner-columnar-data/dist/apps/interpreter/main.js:14313:20)
$In /home/jonas/Code/uni/ss24-zeltner-columnar-data/example/testing.jv:57:9
57 | block MyTableTransformer oftype TableTransformer {
| ^^^^^^^^^^^^^^^^^^
[MyTableTransformer] Execution duration: 67 ms.
Warning: run-commands command "node --enable-source-maps dist/apps/interpreter/main.js -d example/testing.jv -dg peek" exited with non-zero status code
Additional information
When running without trying to print the table, the interpreter still crashes
❯ npx nx run interpreter:run -- example/testing.jv
✔ 6/6 dependent project tasks succeeded [6 read from cache]
Hint: you can run the command with --verbose to see the full dependent project outputs
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run interpreter:build:production [existing outputs match the cache, left as is]
> nx run interpreter:run example/testing.jv
[CarsPipeline] Overview:
Blocks (7 blocks with 1 pipes):
-> CarsExtractor (HttpExtractor)
-> CarsTextFileInterpreter (TextFileInterpreter)
-> CarsCSVInterpreter (CSVInterpreter)
-> NameHeaderWriter (CellWriter)
-> CarsTableInterpreter (TableInterpreter)
-> MyTableTransformer (TableTransformer)
-> CarsLoader (SQLiteLoader)
error: Could not write to sqlite database: column.getName is not a function
$In /home/jonas/Code/uni/ss24-zeltner-columnar-data/example/testing.jv:64:9
64 | block CarsLoader oftype SQLiteLoader {
| ^^^^^^^^^^
Warning: run-commands command "node --enable-source-maps dist/apps/interpreter/main.js example/testing.jv" exited with non-zero status code
It's really wierd that a TypeError occurs. IMO typescript should catch those at compiletime.
The text was updated successfully, but these errors were encountered:
In table.ts:446 you use structuredClone. This function creates a clone with the attributes only, i.e. the result is basically what you get if you copy a JSON object. That object is a plain JS object without any class information, that's why the type of the columns after cloning a table is just Object and not TsTableColumn (see screenshot above). The best approach is to create a custom clone method in TsTableColumn and PolarsTableColumn.
Steps to reproduce
main
branchnpm run example:testing
Description
Additional information
The text was updated successfully, but these errors were encountered: