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
schemadiff uses the vtgate semantic analysis to understand views and to retrieve dependencies in views like table and column references, so it can ensure that diffing is safe and correct.
The semantic analysis however doesn't always take into account correctly if a view is on an unsharded database. This means that a query that works on an unsharded database still throws an error during semantic analysis and schemadiff fails to handle it.
Reproduction Steps
When using a view which uses OVER, this can be triggered.
create view v as SELECT year, country, product, profit, ROW_NUMBER() OVER(PARTITION BY country) AS row_num1, ROW_NUMBER() OVER(PARTITION BY country ORDER BY year, product) AS row_num2 FROM sales;
When loading this into schemadiff, it errors with a VT12001: unsupported: OVER CLAUSE with sharded keyspace even though the provided schema is not sharded.
Overview of the Issue
schemadiff
uses the vtgate semantic analysis to understand views and to retrieve dependencies in views like table and column references, so it can ensure that diffing is safe and correct.The semantic analysis however doesn't always take into account correctly if a view is on an unsharded database. This means that a query that works on an unsharded database still throws an error during semantic analysis and
schemadiff
fails to handle it.Reproduction Steps
When using a view which uses
OVER
, this can be triggered.When loading this into
schemadiff
, it errors with aVT12001: unsupported: OVER CLAUSE with sharded keyspace
even though the provided schema is not sharded.Binary Version
Since #13444
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: