luca-p-castelli commented on code in PR #28054:
URL: https://github.com/apache/flink/pull/28054#discussion_r3290524127


##########
docs/content/docs/concepts/sql-table-concepts/overview.md:
##########
@@ -278,20 +278,24 @@ Flink SQL> COMPILE PLAN 'file:///path/to/plan.json' FOR 
INSERT INTO enriched_ord
 - SQL Syntax
 
     ```sql
-    COMPILE PLAN [IF NOT EXISTS] <plan_file_path> FOR 
<insert_statement>|<statement_set>;
-    
+    -- Write the compiled plan to a file:
+    COMPILE PLAN '<plan_file_path>' [IF NOT EXISTS] FOR 
<insert_statement>|<statement_set>;
+
+    -- Or return the compiled plan inline as a single-row, single-column 
STRING result set:
+    COMPILE PLAN FOR <insert_statement>|<statement_set>;

Review Comment:
   Thanks for the feedback, David. 
   
   I agree this is worth clarifying, but I don’t think of the distinction as 
write vs read. COMPILE PLAN always compiles the supplied INSERT / STATEMENT 
SET; the optional path only selects the output destination.
   
   With a path, the existing behaviour is unchanged: the compiled plan JSON is 
written to a Flink-supported filesystem. Without a path, the same compiled plan 
JSON is returned to the client as a result set. EXECUTE PLAN remains the 
statement that reads a compiled plan.
   
   This also mirrors the Table API, where compilePlanSql(...) returns a 
CompiledPlan, and callers can choose asJsonString() or writeToFile(...).



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