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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to