Skip to content

Commit

Permalink
[hotfix][table-api-java][javadoc]fix and unified the example JavaDoc …
Browse files Browse the repository at this point in the history
…for most DSL methods of Table class
  • Loading branch information
coderappee authored and MartijnVisser committed Jun 23, 2022
1 parent 4904727 commit 9f65980
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ default TableSchema getSchema() {
* Performs a selection operation. Similar to a SQL SELECT statement. The field expressions can
* contain complex expressions and aggregations.
*
* <p>Scala Example:
* <p>Java Example:
*
* <pre>{@code
* tab.select($("key"), $("value").avg().plus(" The average").as("average"));
Expand Down Expand Up @@ -164,7 +164,7 @@ TemporalTableFunction createTemporalTableFunction(
* Renames the fields of the expression result. Use this to disambiguate fields before joining
* to operations.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.as($("a"), $("b"))
Expand All @@ -184,7 +184,7 @@ TemporalTableFunction createTemporalTableFunction(
/**
* Filters out elements that don't pass the filter predicate. Similar to a SQL WHERE clause.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.filter($("name").isEqual("Fred"));
Expand All @@ -201,7 +201,7 @@ TemporalTableFunction createTemporalTableFunction(
/**
* Filters out elements that don't pass the filter predicate. Similar to a SQL WHERE clause.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.where($("name").isEqual("Fred"));
Expand All @@ -219,7 +219,7 @@ TemporalTableFunction createTemporalTableFunction(
* Groups the elements on some grouping keys. Use this before a selection with aggregations to
* perform the aggregation on a per-group basis. Similar to a SQL GROUP BY statement.
*
* <p>Scala Example:
* <p>Java Example:
*
* <pre>{@code
* tab.groupBy($("key")).select($("key"), $("value").avg());
Expand Down Expand Up @@ -267,7 +267,7 @@ TemporalTableFunction createTemporalTableFunction(
*
* <p>Note: Both tables must be bound to the same {@code TableEnvironment} .
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* left.join(right, $("a").isEqual($("b")))
Expand Down Expand Up @@ -306,7 +306,7 @@ TemporalTableFunction createTemporalTableFunction(
* <p>Note: Both tables must be bound to the same {@code TableEnvironment} and its {@code
* TableConfig} must have null check enabled (default).
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* left.leftOuterJoin(right, $("a").isEqual($("b")))
Expand All @@ -329,7 +329,7 @@ TemporalTableFunction createTemporalTableFunction(
* <p>Note: Both tables must be bound to the same {@code TableEnvironment} and its {@code
* TableConfig} must have null check enabled (default).
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* left.rightOuterJoin(right, $("a").isEqual($("b")))
Expand All @@ -352,7 +352,7 @@ TemporalTableFunction createTemporalTableFunction(
* <p>Note: Both tables must be bound to the same {@code TableEnvironment} and its {@code
* TableConfig} must have null check enabled (default).
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* left.fullOuterJoin(right, $("a").isEqual($("b")))
Expand All @@ -373,7 +373,7 @@ TemporalTableFunction createTemporalTableFunction(
* a SQL inner join with ON TRUE predicate but works with a table function. Each row of the
* table is joined with all rows produced by the table function.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* class MySplitUDTF extends TableFunction<String> {
Expand Down Expand Up @@ -407,7 +407,7 @@ TemporalTableFunction createTemporalTableFunction(
* a SQL inner join but works with a table function. Each row of the table is joined with all
* rows produced by the table function.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* class MySplitUDTF extends TableFunction<String> {
Expand Down Expand Up @@ -442,7 +442,7 @@ TemporalTableFunction createTemporalTableFunction(
* table is joined with all rows produced by the table function. If the table function does not
* produce any row, the outer row is padded with nulls.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* class MySplitUDTF extends TableFunction<String> {
Expand Down Expand Up @@ -477,7 +477,7 @@ TemporalTableFunction createTemporalTableFunction(
* table is joined with all rows produced by the table function. If the table function does not
* produce any row, the outer row is padded with nulls.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* class MySplitUDTF extends TableFunction<String> {
Expand Down Expand Up @@ -702,7 +702,7 @@ default Table limit(int offset, int fetch) {
* <p>An over-window defines for each record an interval of records over which aggregation
* functions can be computed.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* table
Expand Down Expand Up @@ -735,7 +735,7 @@ default Table limit(int offset, int fetch) {
* complex expressions, but can not contain aggregations. It will throw an exception if the
* added fields already exist.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.addColumns(
Expand All @@ -760,7 +760,7 @@ default Table limit(int offset, int fetch) {
* complex expressions, but can not contain aggregations. Existing fields will be replaced. If
* the added fields have duplicate field name, then the last one is used.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.addOrReplaceColumns(
Expand All @@ -784,7 +784,7 @@ default Table limit(int offset, int fetch) {
* Renames existing columns. Similar to a field alias statement. The field expressions should be
* alias expressions, and only the existing fields can be renamed.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.renameColumns(
Expand All @@ -807,7 +807,7 @@ default Table limit(int offset, int fetch) {
/**
* Drops existing columns. The field expressions should be field reference expressions.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.dropColumns($("a"), $("b"));
Expand All @@ -825,7 +825,7 @@ default Table limit(int offset, int fetch) {
* Performs a map operation with an user-defined scalar function or built-in scalar function.
* The output will be flattened if the output type is a composite type.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.map(call(MyMapFunction.class, $("c")))
Expand All @@ -844,7 +844,7 @@ default Table limit(int offset, int fetch) {
* Performs a flatMap operation with an user-defined table function or built-in table function.
* The output will be flattened if the output type is a composite type.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.flatMap(call(MyFlatMapFunction.class, $("c")))
Expand All @@ -864,7 +864,7 @@ default Table limit(int offset, int fetch) {
* {@link #aggregate(Expression)} with a select statement. The output will be flattened if the
* output type is a composite type.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.aggregate(call(MyAggregateFunction.class, $("a"), $("b")).as("f0", "f1", "f2"))
Expand All @@ -885,7 +885,7 @@ default Table limit(int offset, int fetch) {
* Perform a global flatAggregate without groupBy. FlatAggregate takes a TableAggregateFunction
* which returns multiple rows. Use a selection after the flatAggregate.
*
* <p>Example:
* <p>Java Example:
*
* <pre>{@code
* tab.flatAggregate(call(MyTableAggregateFunction.class, $("a"), $("b")).as("x", "y", "z"))
Expand Down

0 comments on commit 9f65980

Please sign in to comment.