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
Now that I started researching this issue, and in particular the ALTER TABLE statement, I cannot find a clause to remove a PARTITION BY specification (or for that matter, a clause to add one). So it appears that the only behavior that yamltodb could implement is:
Is that what you want? It seems to me that this opens a whole can of worms because in a realistic production scenario, table measurement (with a PARTITION BY spec) wouldn't just exist by itself, but would have various partitions, so perhaps they would first have to be DETACHed, and then? What happens with the data in those partitions? And of course, there's the converse scenario: the table is not partitioned in the database, but the input YAML says it is.
When comparing following schemas, "PARTITION BY" is not recognized as a diff if it is added to an already existing table.
schema a:
CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int );
schema b:
CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int ) PARTITION BY RANGE (logdate);
Following commands shows no difference.
dbtoyaml schema_a -o schema_a.yaml
yamltodb schema_b schema_a.yaml
I know this is a special case, however I would be grateful if this problem could be fixed.
The text was updated successfully, but these errors were encountered: