snuyanzin commented on code in PR #23223:
URL: https://github.com/apache/flink/pull/23223#discussion_r1342686349


##########
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -776,6 +780,14 @@ protected void convertSelectImpl(final Blackboard bb, 
SqlSelect select) {
         convertOrder(select, bb, collation, orderExprList, select.getOffset(), 
select.getFetch());
 
         if (select.hasHints()) {
+            FlinkContext context = ShortcutUtils.unwrapContext(cluster);
+            if 
(context.getTableConfig().get(TableConfigOptions.TABLE_QUERY_HINTS_IGNORE)) {
+                throw new ValidationException(

Review Comment:
   +1 otherwise such change leads to breaking behaviour and i guess making it 
violating SQL Standard saying that content of comments should not have impact 
on query output
   
   If I remember correctly in ML there was mentioned ORACLE and it ignores 
hints (not thrownig errors)
   
https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/OPTIMIZER_IGNORE_HINTS.html#GUID-D62CA6D8-D0D8-4A20-93EA-EEB4B3144347
   



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