-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36597][DOCS] Fix issues in SQL function docs #33847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/internal"))) | ||
| .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/hive"))) | ||
| .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/catalog/v2/utils"))) | ||
| .map(_.filterNot(_.getCanonicalPath.contains("org.apache.spark.errors"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @cloud-fan
| | The positions are numbered from right to left, starting at zero. | ||
| | The position argument cannot be negative. | ||
| """, | ||
| _FUNC_(expr, pos) - Returns the value of the bit (0 or 1) at the specified position. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @beliefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
| // scalastyle:off line.size.limit | ||
| @ExpressionDescription( | ||
| usage = "_FUNC_(days, hours, mins, secs) - Make DayTimeIntervalType duration from days, hours, mins and secs.", | ||
| usage = "_FUNC_(days[, hours[, mins[, secs]]]) - Make DayTimeIntervalType duration from days, hours, mins and secs.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @MaxGekk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
days is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
|
||
| @ExpressionDescription( | ||
| usage = "_FUNC_(years, months) - Make year-month interval from years, months.", | ||
| usage = "_FUNC_(years[, months]) - Make year-month interval from years, months.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @MaxGekk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
years is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, does it really make sense to make it optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, it follows the old make_interval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
| | The positions are numbered from right to left, starting at zero. | ||
| | The position argument cannot be negative. | ||
| """, | ||
| _FUNC_(expr, pos) - Returns the value of the bit (0 or 1) at the specified position. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
MaxGekk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI
Line 230 in 39002cb
| usage = "_FUNC_(years, months, weeks, days, hours, mins, secs) - Make interval from years, months, weeks, days, hours, mins and secs.", |
| // scalastyle:off line.size.limit | ||
| @ExpressionDescription( | ||
| usage = "_FUNC_(days, hours, mins, secs) - Make DayTimeIntervalType duration from days, hours, mins and secs.", | ||
| usage = "_FUNC_(days[, hours[, mins[, secs]]]) - Make DayTimeIntervalType duration from days, hours, mins and secs.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
||
| @ExpressionDescription( | ||
| usage = "_FUNC_(years, months) - Make year-month interval from years, months.", | ||
| usage = "_FUNC_(years[, months]) - Make year-month interval from years, months.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
@MaxGekk I have addressed your comment on "make_interval" |
| // scalastyle:off line.size.limit | ||
| @ExpressionDescription( | ||
| usage = "_FUNC_(years, months, weeks, days, hours, mins, secs) - Make interval from years, months, weeks, days, hours, mins and secs.", | ||
| usage = "_FUNC_(years[, months[, weeks[, days[, hours[, mins[, secs]]]]]]) - Make interval from years, months, weeks, days, hours, mins and secs.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
years is optional too, see
Line 298 in 39002cb
| def this() = this(Literal(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Kubernetes integration test starting |
|
Test build #142795 has finished for PR 33847 at commit
|
|
Kubernetes integration test status success |
|
Test build #142807 has finished for PR 33847 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #142814 has finished for PR 33847 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #142823 has finished for PR 33847 at commit
|
|
Merging to master |
* the functions make_dt_interval and make_ym_interval should make it clear that some of the fields are optional * remove the `|` symbol from the doc of `bit_get` https://dist.apache.org/repos/dist/dev/spark/v3.2.0-rc1-docs/_site/api/sql/index.html#bit_get * Address one missing comment in apache#33824 (comment) Improve the documentation. No Build doc and preview:     Closes apache#33847 from gengliangwang/auditSQLDoc. Authored-by: Gengliang Wang <gengliang@apache.org> Signed-off-by: Gengliang Wang <gengliang@apache.org>
What changes were proposed in this pull request?
|symbol from the doc ofbit_gethttps://dist.apache.org/repos/dist/dev/spark/v3.2.0-rc1-docs/_site/api/sql/index.html#bit_getWhy are the changes needed?
Improve the documentation.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Build doc and preview:

