flink-faker icon indicating copy to clipboard operation
flink-faker copied to clipboard

#{lorem.sentence} and #{lorem.paragraph} are always the same for the same row

Open tsreaper opened this issue 2 years ago • 4 comments

Run the following SQL in SQL client:

create temporary table faker (
    a string,
    b string,
    c string,
    d string
) with (
    'connector' = 'faker',
    'number-of-rows' = '3',
    'fields.a.expression' = '#{lorem.sentence}',
    'fields.b.expression' = '#{lorem.sentence}',
    'fields.c.expression' = '#{lorem.paragraph}',
    'fields.d.expression' = '#{lorem.paragraph}'
);
select * from faker;

Result:

                              a                              b                              c                              d
 Fugit id praesentium soluta n~ Fugit id praesentium soluta n~ A tempore numquam inventore c~ A tempore numquam inventore c~
 Fugit id praesentium soluta n~ Fugit id praesentium soluta n~ A tempore numquam inventore c~ A tempore numquam inventore c~
 Fugit id praesentium soluta n~ Fugit id praesentium soluta n~ A tempore numquam inventore c~ A tempore numquam inventore c~

tsreaper avatar Mar 25 '22 08:03 tsreaper

It seems that #{internet.uuid} are the same too.

tsreaper avatar Mar 25 '22 08:03 tsreaper

@tsreaper I can't reproduce that with Flink 1.14, I'm getting: image

MartijnVisser avatar Mar 25 '22 10:03 MartijnVisser

Sorry that I forgot to mention the Flink version. I'm testing on Flink 1.15 and I'll check for other Flink versions.

tsreaper avatar Mar 28 '22 01:03 tsreaper

@tsreaper It is related to a regression in data-faker:1.2.0. See the discussion in #2. I will downgrade it to 1.1.0.

knaufk avatar Mar 28 '22 06:03 knaufk