Polypheny-DB
Polypheny-DB copied to clipboard
Can't query data from a CSV with empty fields
Operating System (Polypheny-DB)
Windows
Polypheny-DB Version
0d7256f77c62e8d18959966f3afbda2357b918b2 name:schema-integration
Affected Areas
DB
Browser
Chrome
Client Operating System
No response
Bug Description
When I load a CSV into Polypheny which has empty fields (not all values set), I can't query the respective columns.
After executing the steps from reproduction steps, I get a NullPointerException:
13:35:56.886 ERROR [qtp542743255-162]: Caught exception while executing a query from the console
org.polypheny.db.webui.Crud$QueryExecutionException: java.lang.RuntimeException: java.lang.NullPointerException
at org.polypheny.db.webui.Crud.executeSqlSelect(Crud.java:3667) ~[classes/:?]
at org.polypheny.db.webui.Crud.anySqlQuery(Crud.java:810) ~[classes/:?]
at org.polypheny.db.webui.crud.LanguageCrud.anyQuery(LanguageCrud.java:119) ~[classes/:?]
at org.polypheny.db.webui.WebSocket.onMessage(WebSocket.java:119) ~[classes/:?]
at io.javalin.websocket.WsConnection$onMessage$1.invoke(WsConnection.kt:38) [javalin-4.1.1.jar:4.1.1]
at io.javalin.websocket.WsConnection$onMessage$1.invoke(WsConnection.kt:38) [javalin-4.1.1.jar:4.1.1]
at io.javalin.websocket.WsConnection.tryBeforeAndEndpointHandlers(WsConnection.kt:71) [javalin-4.1.1.jar:4.1.1]
at io.javalin.websocket.WsConnection.onMessage(WsConnection.kt:38) [javalin-4.1.1.jar:4.1.1]
at jdk.internal.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextMessage(JettyAnnotatedEventDriver.java:301) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:67) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextFrame(JettyAnnotatedEventDriver.java:287) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:152) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.extensions.AbstractExtension.nextIncomingFrame(AbstractExtension.java:148) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.nextIncomingFrame(PerMessageDeflateExtension.java:111) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension.forwardIncoming(CompressExtension.java:169) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.incomingFrame(PerMessageDeflateExtension.java:90) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440) [websocket-common-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [jetty-io-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [jetty-io-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [jetty-util-9.4.44.v20210927.jar:9.4.44.v20210927]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.polypheny.db.PolyImplementation.getRows(PolyImplementation.java:234) ~[classes/:?]
at org.polypheny.db.PolyImplementation.getRows(PolyImplementation.java:192) ~[classes/:?]
at org.polypheny.db.webui.Crud.executeSqlSelect(Crud.java:3654) ~[classes/:?]
... 38 more
Caused by: java.lang.NullPointerException
at org.polypheny.db.runtime.functions.Functions.cannotConvert(Functions.java:2322) ~[classes/:?]
at org.polypheny.db.runtime.functions.Functions.toFloat(Functions.java:2530) ~[classes/:?]
at Baz$1$1.current(Unknown Source) ~[?:?]
at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683) ~[calcite-linq4j-1.18.0.jar:1.18.0]
at org.polypheny.db.util.LimitIterator.next(LimitIterator.java:58) ~[classes/:?]
at org.apache.calcite.avatica.MetaImpl.collect(MetaImpl.java:129) ~[avatica-core-1.17.2-POLYPHENY.jar:1.17.2-POLYPHENY]
at org.apache.calcite.avatica.MetaImpl.collect(MetaImpl.java:122) ~[avatica-core-1.17.2-POLYPHENY.jar:1.17.2-POLYPHENY]
at org.polypheny.db.PolyImplementation.getRows(PolyImplementation.java:208) ~[classes/:?]
at org.polypheny.db.PolyImplementation.getRows(PolyImplementation.java:192) ~[classes/:?]
at org.polypheny.db.webui.Crud.executeSqlSelect(Crud.java:3654) ~[classes/:?]
... 38 more
Reproduction Steps
Example: Use baeume as source csv. baeume.csv
Then query on the console: SELECT hoehe FROM public.baeume
Expected Behavior
Show the column that was queried
Relevant Log Output
No response