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



##########
File path: core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
##########
@@ -542,6 +550,31 @@
             + "FROM \"foodmart\".\"expense_fact\"");
   }
 
+  @Test void testTableScanHint() {
+    SqlNodeList hints = HintSqlDialectFactory.captureHints(() -> CalciteAssert
+        .model(JdbcTest.FOODMART_MODEL_WITH_HINTS)
+        .enable(CalciteAssert.DB == DatabaseInstance.HSQLDB)
+        .query("?")
+        .withRel(
+            builder -> {
+              
builder.getCluster().setHintStrategies(HintStrategyTable.builder()
+                  .hintStrategy("PLACEHOLDERS", HintPredicates.TABLE_SCAN)
+                  .build());
+              return builder
+                  .scan("foodmart", "expense_fact")
+                  .hints(RelHint.builder("PLACEHOLDERS")
+                      .hintOptions(ImmutableMap.of("a", "b"))

Review comment:
       You can use this method instead `hintOption(String optionKey, String 
optionValue)`.




-- 
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:
[email protected]


Reply via email to