Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-422

Invalid SQL for array modifiers

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      CP: sprint 67
    • Story Points:
      5
    • Development Team:
      Core: Platform

      Description

      INFO: CQL >>> SQL: contributors = /@contributorNameTypeId = personal novik >>> WHERE (id in (select t.id from (select id as id,              jsonb_array_elements(instance.jsonb->'contributors') as c      ) as t where to_tsvector('simple', f_unaccent(t.c->>'name')) @@ to_tsquery('simple', f_unaccent('novik')) and to_tsvector('simple', f_unaccent(t.c->>'contributorNameTypeId')) @@ to_tsquery('simple', f_unaccent('personal')))) LIMIT 10 OFFSET 0
      

      where schema.json has:

              {
                "fieldName": "contributors",
                "arraySubfield" : "name",
                "arrayModifiers": ["contributorNameTypeId"]
              },
      

      As usual we see a trace that is pretty useless and of course not the query that actually fails:

      SEVERE: ErrorMessage(fields=Map(Position -> 338, Line -> 1087, File -> scan.l, SQLSTATE -> 42601, Routine -> scanner_yyerror, V -> ERROR, Message -> syntax error at or near ")", Severity -> ERROR))
      com.github.mauricio.async.db.postgresql.exceptions.GenericDatabaseException: ErrorMessage(fields=Map(Position -> 338, Line -> 1087, File -> scan.l, SQLSTATE -> 42601, Routine -> scanner_yyerror, V -> ERROR, Message -> syntax error at or near ")", Severity -> ERROR))
              at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.onError(PostgreSQLConnection.scala:175)
              at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.channelRead0(PostgreSQLConnectionHandler.scala:206)
              at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
              at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
              at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
              at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
              at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
              at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
              at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
              at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141)
              at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
              at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
              at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
              at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              at java.lang.Thread.run(Thread.java:748)
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                adam Adam Dickmeiss
                Reporter:
                adam Adam Dickmeiss
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases