You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /inserts-stream endpoint throws an error when trying to insert a row containing a struct column.
To Reproduce
This bug has been present since the /inserts-stream endpoint was introduced. The fix will be in 0.10.0 and 6.0.
Create stream with struct type column
Send request to insert row into stream via /inserts-stream, either via REST endpoint or Java client
Expected behavior
The insert should succeed.
Actual behaviour
The insert attempt fails. The exact error differs depending on whether the server contains #5469 or not. On later versions the error is
[2020-06-10 12:38:18,107] ERROR Error in processing inserts (io.confluent.ksql.api.server.AcksSubscriber:100)
io.confluent.ksql.api.server.KsqlApiException: Can't coerce a field of type class java.util.LinkedHashMap ({g1=foo}) into type STRUCT<`G1` STRING>
at io.confluent.ksql.api.impl.KeyValueExtractor.lambda$coerceObject$0(KeyValueExtractor.java:102)
at java.util.Optional.orElseThrow(Optional.java:290)
at io.confluent.ksql.schema.ksql.SqlValueCoercer$Result.orElseThrow(SqlValueCoercer.java:68)
at io.confluent.ksql.api.impl.KeyValueExtractor.coerceObject(KeyValueExtractor.java:101)
at io.confluent.ksql.api.impl.KeyValueExtractor.extractValues(KeyValueExtractor.java:66)
at io.confluent.ksql.api.impl.InsertsSubscriber.extractValues(InsertsSubscriber.java:193)
at io.confluent.ksql.api.impl.InsertsSubscriber.handleValue(InsertsSubscriber.java:139)
at io.confluent.ksql.api.impl.InsertsSubscriber.handleValue(InsertsSubscriber.java:51)
at io.confluent.ksql.reactive.BaseSubscriber.doOnNext(BaseSubscriber.java:191)
at io.confluent.ksql.reactive.BaseSubscriber.lambda$onNext$1(BaseSubscriber.java:67)
at io.confluent.ksql.reactive.BaseSubscriber.runOnRightContext(BaseSubscriber.java:153)
at io.confluent.ksql.reactive.BaseSubscriber.onNext(BaseSubscriber.java:67)
at io.confluent.ksql.reactive.BasePublisher.doOnNext(BasePublisher.java:106)
at io.confluent.ksql.reactive.BufferedPublisher.maybeSend(BufferedPublisher.java:149)
at io.confluent.ksql.reactive.BasePublisher.doRequest(BasePublisher.java:182)
at io.confluent.ksql.reactive.BasePublisher.access$200(BasePublisher.java:32)
at io.confluent.ksql.reactive.BasePublisher$Sub.lambda$request$0(BasePublisher.java:200)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Additional context
Prior to #5469, there was a similar issue for array and map type columns. #5469 fixed the issue for array and map but not struct.
The text was updated successfully, but these errors were encountered:
vcrfxia
changed the title
/inserts-stream endpoint does not support insertion of nested types, e.g., struct
/inserts-stream endpoint does not support insertion of nested types
Jun 12, 2020
Describe the bug
The /inserts-stream endpoint throws an error when trying to insert a row containing a struct column.
To Reproduce
This bug has been present since the /inserts-stream endpoint was introduced. The fix will be in 0.10.0 and 6.0.
Expected behavior
The insert should succeed.
Actual behaviour
The insert attempt fails. The exact error differs depending on whether the server contains #5469 or not. On later versions the error is
Additional context
Prior to #5469, there was a similar issue for array and map type columns. #5469 fixed the issue for array and map but not struct.
The text was updated successfully, but these errors were encountered: