risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
7.03k stars 577 forks source link

Dates incorrectly serialized to pulsar as integers from groupby columns in materialized views #16503

Open pjpringle opened 6 months ago

pjpringle commented 6 months ago

Describe the bug

Groupby date columns are serialized to pulsar as integers and no longer as date strings.

For example if date being grouped by is '2024-04-25'

Then on pulsar it is emitted as number 739002 but in a sql select query the value is correct as '2024-04-25;

This only seems to happen when sinking MVs that have been grouped by. Non group by MVs emit the date to pulsar correctly as a string.

Error message/log

No response

To Reproduce

sometable has column dt as type date

create materialized view abc_mv as
select dt, sum(val)
from sometable
group by dt
create sink abc_sink
from abc_mv
with ... pulsar
format upsert encode json

Expected behavior

I expected the output value of dt in the pulsar message json to be '2024-04-25' but it was 739002

How did you deploy RisingWave?

Running from command line standalone

The version of RisingWave

PostgreSQL 13.14.0-RisingWave-1.8.0 (unknown)

Additional context

No response

xiangjinwu commented 6 months ago

Depending on exposing date.handling.mode for json sink: #16467