[
https://issues.apache.org/jira/browse/FLINK-18939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-18939:
-----------------------------------
Labels: auto-deprioritized-major auto-deprioritized-minor (was:
auto-deprioritized-major stale-minor)
Priority: Not a Priority (was: Minor)
This issue was labeled "stale-minor" 7 days ago and has not received any
updates so it is being deprioritized. If this ticket is actually Minor, please
raise the priority and ask a committer to assign you the issue or revive the
public discussion.
> Sort-partition result is incorrect when use Bigdecimal as Key
> -------------------------------------------------------------
>
> Key: FLINK-18939
> URL: https://issues.apache.org/jira/browse/FLINK-18939
> Project: Flink
> Issue Type: Bug
> Components: API / DataSet
> Affects Versions: 1.9.1
> Reporter: Shengnan YU
> Priority: Not a Priority
> Labels: auto-deprioritized-major, auto-deprioritized-minor
>
> result of Dataset sort-partition method gives incorrect result when use
> BigDecimal as key.
> Here is the test code. The print result does not give the right order.
> {code:java}
> ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> DataSet<String> ss = env.fromElements("1234567.89", "3456789.12",
> "2345678.91");
> DataSet<String> result = ss.sortPartition(new
> KeySelector<String,BigDecimal>() {
> @Override
> public BigDecimal getKey(String value) throws Exception {
> return new BigDecimal(value);
> }
> }, Order.ASCENDING).setParallelism(1);
> result.print();
> {code}
> It seems that class BigDecComprator some problem and the normalized key
> cannot be compared correctly.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)