Skip to content

SQL: CREATE TYPE does not automatically create BUCKETs #892

Description

@gramian

ArcadeDB Version: v23.1.2 (build 9dbe3ce/1675373316135/main)

JDK Version: openjdk 11.0.18 2023-01-17

OS: MacOs 12.6

Expected behavior

Non existing buckets are created, see https://docs.arcadedb.com/#SQL-Create-Type

Actual behavior

Internal error Bucket with name 'b1' was not found
Details
Error on command execution (PostCommandHandler)
com.arcadedb.exception.SchemaException: Bucket with name 'b1' was not found
	at com.arcadedb.schema.EmbeddedSchema.getBucketByName(EmbeddedSchema.java:261)
	at com.arcadedb.query.sql.parser.CreateDocumentTypeStatement.createType(CreateDocumentTypeStatement.java:52)
	at com.arcadedb.query.sql.parser.CreateTypeAbstractStatement.executeDDL(CreateTypeAbstractStatement.java:84)
	at com.arcadedb.query.sql.executor.DDLExecutionPlan.executeInternal(DDLExecutionPlan.java:60)
	at com.arcadedb.query.sql.parser.DDLStatement.execute(DDLStatement.java:60)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:85)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:69)
	at com.arcadedb.query.sql.SQLQueryEngine.command(SQLQueryEngine.java:106)
	at com.arcadedb.database.EmbeddedDatabase.command(EmbeddedDatabase.java:1250)
	at com.arcadedb.server.ServerDatabase.command(ServerDatabase.java:416)
	at com.arcadedb.server.http.handler.PostCommandHandler.executeCommand(PostCommandHandler.java:127)
	at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:88)
	at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:91)
	at com.arcadedb.server.http.handler.AbstractHandler.handleRequest(AbstractHandler.java:128)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
	at java.base/java.lang.Thread.run(Thread.java:829)

Steps to reproduce

CREATE DOCUMENT TYPE doc BUCKET b1, b2

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions