You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/04/18 23:05:16 UTC

[GitHub] [druid] Praytic commented on issue #12453: Broker throws an exception "Field ordinal 7 is invalid for type 'RecordType(TIMESTAMP(3) __time, VARCHAR metric, VARCHAR name, VARCHAR source, DOUBLE value)'"

Praytic commented on issue #12453:
URL: https://github.com/apache/druid/issues/12453#issuecomment-1101838763

   Removing the `name` field from subquery resolved the issue:
   **Before:**
   ```
   SELECT '4235' AS code, name,
                      regexp_extract(metric, '(?<=\"production\":\")(.+?)(?=\")', 0) AS production,
                      regexp_extract(metric, '(?<=\"station\":\")(.+?)(?=\")', 0) AS station,
                      regexp_extract(metric, '(?<=\"issuer\":\")(.+?)(?=\")', 0) AS issuer,
                      "value"
               FROM "FAKE_car-metrics"
   ```
   **After:**
   ```
   SELECT '4235' AS code,
                      regexp_extract(metric, '(?<=\"production\":\")(.+?)(?=\")', 0) AS production,
                      regexp_extract(metric, '(?<=\"station\":\")(.+?)(?=\")', 0) AS station,
                      regexp_extract(metric, '(?<=\"issuer\":\")(.+?)(?=\")', 0) AS issuer,
                      "value"
               FROM "FAKE_car-metrics"
   ```
   This query works by itself with the `name` field but it throws the error when it's a part of a virtual table.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org