chunweilei commented on a change in pull request #1467: Don't require use of
JdbcSchema in QuerySqlStatisticProvider
URL: https://github.com/apache/calcite/pull/1467#discussion_r326453046
##########
File path: core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcTable.java
##########
@@ -100,6 +100,16 @@ public String toString() {
return jdbcTableType;
}
+ @Override public <C> C unwrap(Class<C> aClass) {
+ if (aClass.isInstance(jdbcSchema.getDataSource())) {
+ return aClass.cast(jdbcSchema.getDataSource());
+ } else if (aClass.isInstance(jdbcSchema.dialect)) {
+ return aClass.cast(jdbcSchema.dialect);
+ } else {
+ return super.unwrap(aClass);
+ }
+ }
+
public RelDataType getRowType(RelDataTypeFactory typeFactory) {
if (protoRowType == null) {
Review comment:
Do you open a jira ticket for this? If you do, we can discuss it there.
----------------------------------------------------------------
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]
With regards,
Apache Git Services