vinothchandar commented on a change in pull request #1858:
URL: https://github.com/apache/hudi/pull/1858#discussion_r460343368



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java
##########
@@ -151,6 +154,27 @@ public HoodieTableType getTableType() {
         : Option.empty();
   }
 
+  /**
+   * @return the table version from .hoodie properties file.
+   */
+  public HoodieTableVersion getHoodieTableVersionFromPropertyFile() {
+    if (props.contains(HOODIE_TABLE_VERSION_PROP_NAME)) {
+      String propValue = props.getProperty(HOODIE_TABLE_VERSION_PROP_NAME);
+      if (propValue.equals(HoodieTableVersion.ZERO_SIX_ZERO.version)) {
+        return HoodieTableVersion.ZERO_SIX_ZERO;
+      }
+    }
+    return DEFAULT_TABLE_VERSION;
+  }
+
+  /**
+   * @return the current hoodie table version.
+   */
+  public HoodieTableVersion getCurrentHoodieTableVersion() {
+    // TODO: fetch current version dynamically

Review comment:
       `HoodieTableVersion` or someplace we need to ahve a `CURR_VERSION` 
variable that gets bumped to 0.6.1 . 
   
   More I think about this. I think its better to name the versions 0,1,2... 
and so on, instead of release numbers. we may not bump this up every release . 
only when upgrade/downgrade is necessary. 




----------------------------------------------------------------
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


Reply via email to