yunchipang commented on code in PR #433:
URL: https://github.com/apache/hudi-rs/pull/433#discussion_r2324071534


##########
python/hudi/_internal.pyi:
##########
@@ -15,12 +15,45 @@
 #  specific language governing permissions and limitations
 #  under the License.
 from dataclasses import dataclass
+from enum import Enum
 from typing import Dict, List, Optional, Tuple
 
 import pyarrow  # type: ignore
 
 __version__: str
 
+class HudiTableConfig(Enum):
+    """Configurations for Hudi tables, most of them are persisted in 
`hoodie.properties`."""
+
+    BASE_FILE_FORMAT = "hoodie.table.base.file.format"
+    BASE_PATH = "hoodie.base.path"
+    CHECKSUM = "hoodie.table.checksum"
+    CREATE_SCHEMA = "hoodie.table.create.schema"
+    DATABASE_NAME = "hoodie.database.name"
+    DROPS_PARTITION_FIELDS = "hoodie.datasource.write.drop.partition.columns"
+    IS_HIVE_STYLE_PARTITIONING = 
"hoodie.datasource.write.hive_style_partitioning"
+    IS_PARTITION_PATH_URLENCODED = 
"hoodie.datasource.write.partitionpath.urlencode"
+    KEY_GENERATOR_CLASS = "hoodie.table.keygenerator.class"
+    PARTITION_FIELDS = "hoodie.table.partition.fields"
+    PRECOMBINE_FIELD = "hoodie.table.precombine.field"
+    POPULATES_META_FIELDS = "hoodie.populate.meta.fields"
+    RECORD_KEY_FIELDS = "hoodie.table.recordkey.fields"
+    RECORD_MERGE_STRATEGY = "hoodie.table.record.merge.strategy"
+    TABLE_NAME = "hoodie.table.name"
+    TABLE_TYPE = "hoodie.table.type"
+    TABLE_VERSION = "hoodie.table.version"
+    TIMELINE_LAYOUT_VERSION = "hoodie.timeline.layout.version"
+    TIMELINE_TIMEZONE = "hoodie.table.timeline.timezone"
+
+class HudiReadConfig(Enum):

Review Comment:
   @xushiyan i added a `macros` crate to auto-gen enums for python using pyo3.. 
PTAL if this aligns better with the goal. thanks!



##########
python/hudi/_internal.pyi:
##########
@@ -15,12 +15,45 @@
 #  specific language governing permissions and limitations
 #  under the License.
 from dataclasses import dataclass
+from enum import Enum
 from typing import Dict, List, Optional, Tuple
 
 import pyarrow  # type: ignore
 
 __version__: str
 
+class HudiTableConfig(Enum):
+    """Configurations for Hudi tables, most of them are persisted in 
`hoodie.properties`."""
+
+    BASE_FILE_FORMAT = "hoodie.table.base.file.format"
+    BASE_PATH = "hoodie.base.path"
+    CHECKSUM = "hoodie.table.checksum"
+    CREATE_SCHEMA = "hoodie.table.create.schema"
+    DATABASE_NAME = "hoodie.database.name"
+    DROPS_PARTITION_FIELDS = "hoodie.datasource.write.drop.partition.columns"
+    IS_HIVE_STYLE_PARTITIONING = 
"hoodie.datasource.write.hive_style_partitioning"
+    IS_PARTITION_PATH_URLENCODED = 
"hoodie.datasource.write.partitionpath.urlencode"
+    KEY_GENERATOR_CLASS = "hoodie.table.keygenerator.class"
+    PARTITION_FIELDS = "hoodie.table.partition.fields"
+    PRECOMBINE_FIELD = "hoodie.table.precombine.field"
+    POPULATES_META_FIELDS = "hoodie.populate.meta.fields"
+    RECORD_KEY_FIELDS = "hoodie.table.recordkey.fields"
+    RECORD_MERGE_STRATEGY = "hoodie.table.record.merge.strategy"
+    TABLE_NAME = "hoodie.table.name"
+    TABLE_TYPE = "hoodie.table.type"
+    TABLE_VERSION = "hoodie.table.version"
+    TIMELINE_LAYOUT_VERSION = "hoodie.timeline.layout.version"
+    TIMELINE_TIMEZONE = "hoodie.table.timeline.timezone"
+
+class HudiReadConfig(Enum):

Review Comment:
   @xushiyan i added a `macros` crate to auto-gen enums for python using pyo3. 
PTAL if this aligns better with the goal. thanks!



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to