timeplus-io / proton

A streaming SQL engine, a fast and lightweight alternative to ksqlDB and Apache Flink, 🚀 powered by ClickHouse.
https://timeplus.com
Apache License 2.0
1.51k stars 65 forks source link

Regression issue on array #140

Open sunset3000 opened 12 months ago

sunset3000 commented 12 months ago

Describe what's wrong In proton before 1.2.27, the below query can run without problem:

create materialized view o45_mv into execution as
with cte as (
select
  json_extract_array(`mapList`) as a,
  array_first((x)-> x:`35` = '266051', a) as e,
  array_first((x)-> x:`35` = '266052', a) as o
from
    o45_ext
where
    e != '' and o !='' and e:`37` = o:`37`
)
select a.*, b.SecurityType as MdcSecurityType
from (
         select
             to_uint64(o:`event_ts`) as event_ts, -- monitor only
             to_date16(o:`11418`)  as TradeDate,
             to_uint32(o:`11076`)  as ExchangeMatchDate,
             e:`17` as ExecId,
             o:`11` as ClOrderId,
                 o:`10111` as ProductAccount,
                 o:`10112` as AssetAccount,
                 o:`10114` as TradingAccount,
                 o:`10115` as SecurityAccount,
                 o:`1301` as SecurityExchange,
                 o:`48` as SecurityId,
                 to_float64(e:`32`) as LastQty,
             to_float64(e:`31`) as LastPx,
             to_float64(e:`11802`) as LastAmount,
             to_float64(o:`60210`) as Fee,
             o:`10117` as SeatNo,
                 o:`10119` as InvestType,
                 o:`216228` as EntrustDirection,
                 o:`37` as OrderId,
                 'O45' as Source,
                 now64(6) as _tp_time
         from cte
     ) as a
     join table(mdsConstant) as b
     on a.SecurityId = extract (b.SecurityId, '(.*)\..*') SETTINGS record_consume_batch_count=300

stream 'mdsConstant':

CREATE STREAM mdsConstant (
    SecurityId string,
    SecuritySubType int32,
    SecurityType int32,
    VolumeMultiple int32
)

stream 'o45_ext':

CREATE
STREAM default.o45_ext
(`mapList` string)
ENGINE = ExternalStream
SETTINGS type = 'kafka', brokers = 'localhost:9092', topic = 'o45', data_format = 'JSONEachRow'

stream

But in the current version 1.3.13-rc1, it reports error:

Screenshot 2023-10-08 at 16 13 41

How to reproduce

Error message and/or stacktrace

Additional context

jovezhong commented 11 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 10 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 10 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 9 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 9 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 8 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 8 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 7 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 7 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 6 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 6 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 5 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 5 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 4 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 4 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 4 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 3 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 3 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 2 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 2 months ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.