rosakng commented on code in PR #27118:
URL: https://github.com/apache/flink/pull/27118#discussion_r2481945854
##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/operation/OperationExecutor.java:
##########
@@ -681,6 +682,17 @@ private ResultFetcher callModifyOperations(
TableEnvironmentInternal tableEnv,
OperationHandle handle,
List<ModifyOperation> modifyOperations) {
+ // Check if SQL Gateway is in read-only mode
+ Configuration configuration = sessionContext.getSessionConf().clone();
+ configuration.addAll(executionConfig);
+ boolean isReadOnlyMode =
+
configuration.get(SqlGatewayServiceConfigOptions.SQL_GATEWAY_READ_ONLY_MODE);
+
+ if (isReadOnlyMode) {
+ throw new SqlExecutionException(
+ "SQL Gateway is in read-only mode. Modify operations are
not allowed.");
Review Comment:
@liuml07 These `modifyOperations` arent tied to a specific modify type i.e.
INSERT, UPDATE, so this would require having to categorize them into a type.
Due to this I would prefer to leave the error message but open to opinions.
--
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]