You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/06/07 07:22:59 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #2426: Propagate table scan hints to JDBC

danny0405 commented on a change in pull request #2426:
URL: https://github.com/apache/calcite/pull/2426#discussion_r646331922



##########
File path: core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
##########
@@ -525,7 +530,38 @@ private static SqlNode groupItem(List<SqlNode> groupKeys,
   /** Visits a TableScan; called by {@link #dispatch} via reflection. */
   public Result visit(TableScan e) {
     final SqlIdentifier identifier = getSqlTargetTable(e);
-    return result(identifier, ImmutableList.of(Clause.FROM), e, null);
+    SqlNode node = identifier;
+    if (e instanceof Hintable) {
+      final ImmutableList<RelHint> hints = e.getHints();
+      if (hints != null && ! hints.isEmpty()) {
+        SqlParserPos pos = identifier.getParserPosition();

Review comment:
       Does the `Hintable.getHints` has any chance to return null ?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org