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
string ivm_query = "INSERT INTO delta_"+view_name+" SELECT * from DoIVM('"+view_catalog_name+"','"+view_schema_name+"','"+view_name+"');";
Internally, from this query, the view is fetched and the definition/base query of the view is obtained. The optimized logical plan for this query is generated and modified to operate on delta_basetable. At the end, and INSERT node is generated and placed at the top of the plan:
Thus, it does not matter if the IVM query is SELECT * FROM DoIVM(...) or INSERT INTO delta_view SELECT * FROM DoIVM(...). But, for some reason, the former fails with the following error and the latter succeeds.
Error: INTERNAL Error: Assertion triggered in file "/Users/kriti/Projects/duckdb/src/common/types/column/column_data_collection.cpp" on line 716: types == input.GetTypes()
Debug details on printing out types and input.GetTypes():
This is minor but good to figure out why this is happening.
The text was updated successfully, but these errors were encountered:
kriti-sc
changed the title
SELECT * FROM DoIVM(...) in PRAGMA fails.SELECT * FROM DoIVM(...) in PRAGMA fails, but INSERT into delta_view SELECT * FROM DoIVM(...) succeeds
Sep 5, 2023
The PRAGMA generates a series of SQL queries that perform IVM on
view
and insert the result intodelta_view
.This is the IVM query that is executed:
ivm-extension/ivm_extension.cpp
Line 102 in e968d05
Internally, from this query, the
view
is fetched and the definition/base query of theview
is obtained. The optimized logical plan for this query is generated and modified to operate ondelta_basetable
. At the end, and INSERT node is generated and placed at the top of the plan:ivm-extension/include/ivm_rewrite_rule.hpp
Line 328 in e968d05
Thus, it does not matter if the IVM query is
SELECT * FROM DoIVM(...)
orINSERT INTO delta_view SELECT * FROM DoIVM(...)
. But, for some reason, the former fails with the following error and the latter succeeds.Debug details on printing out
types
andinput.GetTypes()
:This is minor but good to figure out why this is happening.
The text was updated successfully, but these errors were encountered: