You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2022/04/09 22:39:00 UTC

[jira] [Updated] (FLINK-14848) BaseRowSerializer.toBinaryRow wrongly process null for non-compact decimal

     [ https://issues.apache.org/jira/browse/FLINK-14848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flink Jira Bot updated FLINK-14848:
-----------------------------------
    Labels: auto-deprioritized-major pull-request-available stale-minor  (was: auto-deprioritized-major pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized.


> BaseRowSerializer.toBinaryRow wrongly process null for non-compact decimal
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-14848
>                 URL: https://issues.apache.org/jira/browse/FLINK-14848
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Runtime
>    Affects Versions: 1.9.1
>            Reporter: Zhenghua Gao
>            Priority: Minor
>              Labels: auto-deprioritized-major, pull-request-available, stale-minor
>
> Take non-compact decimal(precision > 18 null as an example, the writer not only need to set null bits, but also need to assign bytes of variable-length part for future update. The following test case can reproduce the problem.
>  
>  
> {code:java}
> @Test
> public void test() {
>    Decimal dec = Decimal.fromBigDecimal(new BigDecimal(11), 38, 0);
>    BinaryRow row1 = new BinaryRow(2);
>    BinaryRowWriter writer = new BinaryRowWriter(row1);
>    writer.writeDecimal(0, dec, 38);
>    writer.writeDecimal(1, null, 38);
>    writer.complete();
>    BaseRowSerializer serializer = new BaseRowSerializer(null, RowType.of(new DecimalType(38, 0), new DecimalType(38, 0)));
>    GenericRow row2 = new GenericRow(2);
>    row2.setField(0, dec);
>    row2.setField(1, null);
>    BinaryRow row3 = serializer.toBinaryRow(row2);
>    assertTrue(row1.equalsWithoutHeader(row3));
> }
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)