cloud-fan commented on a change in pull request #24259: [SPARK-27328][SQL] Add
'deprecated' in ExpressionDescription for extended usage and SQL doc
URL: https://github.com/apache/spark/pull/24259#discussion_r270897924
##########
File path: sql/gen-sql-markdown.py
##########
@@ -136,6 +137,27 @@ def _make_pretty_note(note):
return "**Note:**\n%s\n" % note
+def _make_pretty_deprecated(deprecated):
+ """
+ Makes the deprecated description pretty and returns a formatted string if
`deprecated`
+ is not an empty string. Otherwise, returns None.
+
+ Expected input:
+
+ ...
+
+ Expected output:
+ **Deprecated:**
+
+ ...
+
+ """
+
+ if deprecated != "":
+ deprecated = "\n".join(map(lambda n: n[4:], deprecated.split("\n")))
Review comment:
will people use multi-line string literal in Scala? e.g.
```
deprecated = """
|xxx
|xxx
""".stripMargin
```
----------------------------------------------------------------
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]