MartijnVisser commented on code in PR #29837:
URL: https://github.com/apache/flink/pull/29837#discussion_r4535782704


##########
docs/content/docs/dev/table/tableApi.md:
##########
@@ -74,39 +74,6 @@ Table counts = orders
 counts.execute().print();
 ```
 
-{{< /tab >}}
-{{< tab "Scala" >}}
-
-The Scala Table API is enabled by importing `org.apache.flink.table.api._`, 
`org.apache.flink.api.scala._`, and `org.apache.flink.table.api.bridge.scala._` 
(for bridging to/from DataStream).
-
-The following example shows how a Scala Table API program is constructed. 
Table fields are referenced using Scala's String interpolation using a dollar 
character (`$`).
-
-```scala
-import org.apache.flink.api.scala._
-import org.apache.flink.table.api._
-import org.apache.flink.table.api.bridge.scala._
-
-// environment configuration
-val settings = EnvironmentSettings
-    .newInstance()
-    .inStreamingMode()
-    .build()
-
-val tEnv = TableEnvironment.create(settings)
-
-// register Orders table in table environment
-// ...
-
-// specify table program
-val orders = tEnv.from("Orders") // schema (a, b, c, rowtime)
-
-val result = orders
-               .groupBy($"a")
-               .select($"a", $"b".count as "cnt")
-               .execute()
-               .print()
-```
-
 {{< /tab >}}
 {{< tab "Python" >}}

Review Comment:
   Restored without the `org.apache.flink.api.scala._` import, on both pages. 
It compiles with scalac 2.12 against master; with that import it does not.



##########
docs/content/docs/dev/datastream/fault-tolerance/state.md:
##########
@@ -704,70 +751,18 @@ it simply implies that the basic even-split 
redistribution scheme will be used.
 After initializing the container, we use the `isRestored()` method of the 
context to check if we are
 recovering after a failure. If this is `true`, *i.e.* we are recovering, the 
restore logic is applied.
 
-As shown in the code of the modified `BufferingSink`, this `ListState` 
recovered during state
-initialization is kept in a class variable for future use in 
`snapshotState()`. There the `ListState` is cleared
-of all objects included by the previous checkpoint, and is then filled with 
the new ones we want to checkpoint.
+Keep the `ListState` in a field for later use in `snapshotState()`. There, 
update it with the objects
+you want to checkpoint, which replaces the objects included by the previous 
checkpoint.

Review Comment:
   Added a `CountingMap` example with the `isRestored()` branch next to the 
writer, on all four pages. `flush` now sends the buffer at the end of input and 
leaves it in the writer state on a checkpoint, as `AsyncSinkWriter` does. Both 
ran on a MiniCluster, including a savepoint restore.



##########
docs/content/docs/dev/datastream/overview.md:
##########
@@ -260,10 +260,9 @@ Data Sources
 {{< tab "Java" >}}
 
 Sources are where your program reads its input from. You can attach a source 
to your program by
-using `StreamExecutionEnvironment.addSource(sourceFunction)`. Flink comes with 
a number of pre-implemented
-source functions, but you can always write your own custom sources by 
implementing the `SourceFunction`
-for non-parallel sources, or by implementing the `ParallelSourceFunction` 
interface or extending the
-`RichParallelSourceFunction` for parallel sources.
+using `StreamExecutionEnvironment.fromSource(source, watermarkStrategy, 
sourceName)`. Flink comes with a
+number of pre-implemented sources, but you can always write your own custom 
source by implementing the
+[Source API]({{< ref "docs/internals/sources" >}}).

Review Comment:
   Done on both pages, and the `tableApi.md` and `catalogs.md` snippets compile 
now. The iterator example moved to `DataGeneratorSource`, since 
`fromCollection(Iterator, Class)` is deprecated as well.



##########
docs/content/docs/sql/reference/queries/overview.md:
##########
@@ -142,16 +102,16 @@ result = table_env \
     .sql_query("SELECT SUM(amount) FROM %s WHERE product LIKE '%%Rubber%%'" % 
table)
 
 # create and register a TableSink
-schema = Schema.new_builder()
-    .column("product", DataTypes.STRING())
-    .column("amount", DataTypes.INT())
+schema = Schema.new_builder() \
+    .column("product", DataTypes.STRING()) \
+    .column("amount", DataTypes.INT()) \
     .build()
 
-sink_descriptor = TableDescriptor.for_connector("filesystem")
-    .schema(schema)
+sink_descriptor = TableDescriptor.for_connector("filesystem") \
+    .schema(schema) \
     .format(FormatDescriptor.for_format("csv")
         .option("field-delimiter", ",")
-        .build())
+        .build()) \
     .build()
 
 t_env.create_temporary_table("RubberOrders", sink_descriptor)

Review Comment:
   Fixed all of them, plus the view and function calls in `catalogs.md` that 
also passed a string, and `t_env` in `explain.md`.



##########
docs/content.zh/docs/dev/table/functions/udfs.md:
##########
@@ -1779,8 +1782,8 @@ public static class WeightedAvgAccum {
     public int count = 0;
 }
 
-// The java class must have a public no-argument constructor and can be 
founded in current java classloader.
-// Java 类必须有一个 public 的无参构造函数,并且可以在当前类加载器中加载到。
+# The java class must have a public no-argument constructor and can be founded 
in current java classloader.
+# Java 类必须有一个 public 的无参构造函数,并且可以在当前类加载器中加载到。

Review Comment:
   Reverted.



##########
docs/content/docs/sql/timezone.md:
##########
@@ -163,9 +165,9 @@ Flink SQL> DESC MyView1;
 |           CURRENT_DATE |                        DATE | false |     |        
|           |
 |           CURRENT_TIME |                     TIME(0) | false |     |        
|           |
 |      CURRENT_TIMESTAMP |            TIMESTAMP_LTZ(3) | false |     |        
|           |
-|CURRENT_ROW_TIMESTAMP() |            TIMESTAMP_LTZ(3) | false |     |        
|           |
-|                  NOW() |            TIMESTAMP_LTZ(3) | false |     |        
|           |
-|             PROCTIME() | TIMESTAMP_LTZ(3) *PROCTIME* | false |     |        
|           |
+|                 EXPR$5 |            TIMESTAMP_LTZ(3) | false |     |        
|           |
+|                 EXPR$6 |            TIMESTAMP_LTZ(3) | false |     |        
|           |
+|                 EXPR$7 | TIMESTAMP_LTZ(3) *PROCTIME* | false |     |        
|           |

Review Comment:
   Aliased all eight. The view now works on master, and DESC and both SELECT 
outputs use the same names.



##########
docs/content/docs/ops/state/large_state_tuning.md:
##########
@@ -294,7 +294,7 @@ that the task-local state is an in-memory consisting of 
heap objects, and not st
 
 ### Configuring task-local recovery
 
-Task-local recovery is *deactivated by default* and can be activated through 
Flink's configuration with the key `state.backend.local-recovery` as specified
+Task-local recovery is *deactivated by default* and can be activated through 
Flink's configuration with the key `execution.state-recovery.from-local` as 
specified
 in `CheckpointingOptions.LOCAL_RECOVERY`. The value for this setting can 
either be *true* to enable or *false* (default) to disable local recovery.

Review Comment:
   Fixed all four.



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