-
Notifications
You must be signed in to change notification settings - Fork 118
Description
Probably related to #774
Describe the bug
I was trying to use CellService.write_dataframe function with dataframe that [len(df) > Process.MAX_STATEMENTS = 16_380] and with use_ti=True. In previous TM1py version everything was fine, now I got error (in polish: "Błąd: Prolog wiersz procedury (16387): Przekroczono maks. liczbę instrukcji", it would be something like "Error: Prolog row (16387) max number of instructions exceeded" in english).
I believe that error is caused by CellService._execute_write_statements:
if verify_version(required_version="11.8.015", version=self.version):
max_statements = Process.MAX_STATEMENTS_POST_11_8_15
verify_version returns True for required_version="11.8.015", version="11.8.00100.13" (Is it expected behavior?)
so max_statements value is set to 100'000 and it doesn't make much sense even if more statements would be allowed (in my case it isn't allowed) because write_through_unbound_process still uses only Process.MAX_STATEMENTS and sends chunks with (2Process.MAX_STATEMENTS+1) or (2Process.MAX_STATEMENTS) statements to _execute_write_statements.
By the way this is another thing that I believe should be changed:
The first chunk that write_through_unbound_process creates has length = (2*Process.MAX_STATEMENTS+1)
To Reproduce
Described above.
Expected behavior
Use CellService.write_dataframe function to save data to TM1.
Version
TM1py 1.10.0
TM1 Server Version: 11.8.00100.13