imay commented on a change in pull request #2294: Add convert tablet rowset type
URL: https://github.com/apache/incubator-doris/pull/2294#discussion_r355824352
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
 ##########
 @@ -842,11 +843,24 @@ private void createJob(long dbId, OlapTable olapTable, 
Map<Long, LinkedList<Colu
         // property 3: timeout
         long timeoutSecond = PropertyAnalyzer.analyzeTimeout(propertyMap, 
Config.alter_table_timeout_second);
 
+        // Parse storage_format property
+        // sql: alter table tablet_name set ("storage_format" = "v2")
+        // Use this sql to convert all tablets(base and rollup index) to 
segment v2.
+        // analyzeStorageFormat will parse the properties to decide whether 
storage format is set to v2.
+        // If true, fire a schema change job to achieve it.
+        boolean changeStorageFormat = 
PropertyAnalyzer.analyzeStorageFormat(propertyMap);
 
 Review comment:
   If the storage format of this table is already v2, will another schema 
change job be created?
   It's not suitable to return a boolean value, a format type is perferred, and 
the caller will process it as it wants. For example if there is another storage 
format in the future, you will find that the analyzeStorageFormat should be 
changed, but it may make other user unhappy.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to