gianm commented on code in PR #12897:
URL: https://github.com/apache/druid/pull/12897#discussion_r944766639
##########
sql/src/main/java/org/apache/druid/sql/calcite/external/ExternalTableScanRule.java:
##########
@@ -43,17 +43,26 @@ public ExternalTableScanRule(final PlannerContext
plannerContext)
@Override
public boolean matches(RelOptRuleCall call)
{
- if
(plannerContext.getQueryMaker().feature(QueryFeature.CAN_READ_EXTERNAL_DATA)) {
+ if (plannerContext.engineHasFeature(EngineFeature.CAN_READ_EXTERNAL_DATA))
{
return super.matches(call);
} else {
- plannerContext.setPlanningError("SQL query requires scanning external
datasources that is not suported.");
+ plannerContext.setPlanningError(
+ "Cannot use '%s' with the current SQL engine.",
Review Comment:
I thought about it, but as usual in CS: naming is the hard part 🙂. I think
we can add engine names in the future. I thought it would involve some
discussion about what to call them in user-facing messages, so better to have a
dedicated PR for that.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]