HyukjinKwon commented on a change in pull request #27459: 
[SPARK-30510][SQL][DOCS] Publicly document Spark SQL configuration options
URL: https://github.com/apache/spark/pull/27459#discussion_r375686004
 
 

 ##########
 File path: sql/gen-sql-markdown.py
 ##########
 @@ -218,9 +236,68 @@ def generate_sql_markdown(jvm, path):
             mdfile.write("<br/>\n\n")
 
 
+def generate_sql_configs_table(jvm, path):
+    """
+    Generates an HTML table at `path` that lists all public SQL
+    configuration options.
+    """
+    sql_configs = _list_sql_configs(jvm)
+    value_reference_pattern = re.compile(r"^<value of (\S*)>$")
+
+    with open(path, 'w') as f:
+        f.write(dedent(
+            """
+            <table class="table">
+            <tr><th>Property Name</th><th>Default</th><th>Meaning</th></tr>
+            """
+        ))
+        for config in sorted(sql_configs, key=lambda x: x.name):
+            if config.default == "<undefined>":
+                default = "none"
+            elif config.default.startswith("<value of "):
+                referenced_config_name = 
value_reference_pattern.match(config.default).group(1)
+                # difficultes in looking this up:
 
 Review comment:
   Actually, we shouldn't look up and show the default value from another 
configuration.
   
   If the default value of configuration A is from configuration B, the default 
value of configuration A changes when the value of configuration B is set by 
user.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to