kramerul commented on code in PR #3692:
URL: https://github.com/apache/calcite/pull/3692#discussion_r1495381585
##########
core/src/test/java/org/apache/calcite/test/JdbcTest.java:
##########
@@ -241,6 +245,55 @@ public class JdbcTest {
+ "(8,1,4))\n"
+ " as t(rn,val,expected)";
+ public static final String FOODMART_SCOTT_CUSTOM_MODEL = "{\n"
+ + " version: '1.0',\n"
+ + " schemas: [\n"
+ + " {\n"
+ + " type: 'custom',\n"
+ + " factory: '"
+ + JdbcCustomSchemaFactory.class.getName()
+ + "',\n"
+ + " name: 'SCOTT'\n"
+ + " }\n"
+ + " ]\n"
+ + "}";
+
+
+ /**
+ * Tests class fro custom JDBC schema.
Review Comment:
I don't know where I could add this comment.
Today, it's not possible to implement a custom `JdcbSchema` because the
generated code always calls `CalciteSchema::unwrap`. And there is no other way
to get a `DataSource` from a `JdbcSchema`.
We have problems using `JdbcSchema` because we are using a database with
many 1000 schemas each containing up to 500000 tables. During validation, this
will require up to 30 seconds to read all those tables into memory
`JdbcSchema::computeTables`. Additionally, this requires a lot of memory to
hold 500000 tables inside `JdcbSchema`. Using `JdbcSchema::snapshot` is also
not an option because there is no way to invalidate the cache.
Therefore, we would like to implement our own `JdbcSchema` to maintain the
required tables in memory.
--
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]