[英]Ignite database: Create schema: AssertionError
I want to create a schema using ignite as an in memory database. 我想使用ignite作为内存数据库创建架构。 So I do the following: 因此,我执行以下操作:
try (Statement statement = connection.createStatement()) {
statement.executeQuery("CREATE SCHEMA my_schema");
}
But im getting the error: 但即时通讯收到错误:
Exception in thread "sql-connector-#38%null%" java.lang.AssertionError
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1341)
at org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1856)
at org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1852)
at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2293)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1860)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:188)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:122)
at org.apache.ignite.internal.processors.odbc.SqlListenerNioListener.onMessage(SqlListenerNioListener.java:152)
at org.apache.ignite.internal.processors.odbc.SqlListenerNioListener.onMessage(SqlListenerNioListener.java:44)
at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
And I have no idea what that means. 我也不知道那是什么意思。 I need to create the schema since im creating unit tests for my sql statements and the original table also has a schema: 我需要创建架构,因为im为我的sql语句创建了单元测试,并且原始表也具有架构:
my_schema.my_table
And I cant replace the table name just for unit test purposes. 而且我不能仅出于单元测试目的而替换表名。
EDIT 编辑
I have to mention that ignite calls that a schema. 我不得不提到ignite称为架构。 In my opinion it is just a database name. 我认为这只是一个数据库名称。 but CREATE DATABASE my_database
also does not work. 但是CREATE DATABASE my_database
也不起作用。
Command CREATE SCHEMA
is not supported in Ignite as of yet. CREATE SCHEMA
,Ignite不支持Command CREATE SCHEMA
。
If you create few caches, each of them will be assigned its own schema having a matching name. 如果创建几个缓存,则将为每个缓存分配一个具有匹配名称的自己的架构。 Also there's a schema named PUBLIC
where live all caches created with command CREATE TABLE
. 还有一个名为PUBLIC
的架构,其中生活着使用CREATE TABLE
命令CREATE TABLE
所有缓存。
Subset of DDL commands currently available in Ignite is described here: 这里介绍了Ignite中当前可用的DDL命令的子集:
https://apacheignite-sql.readme.io/docs/ddl https://apacheignite-sql.readme.io/docs/ddl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.