[jira] [Created] (CALCITE-5730) First nulls are dropped by calcite EnumerableSortLimit Node

2023-05-29 Thread Feng Guo (Jira)
Feng Guo created CALCITE-5730:
-

 Summary: First nulls are dropped by calcite EnumerableSortLimit 
Node
 Key: CALCITE-5730
 URL: https://issues.apache.org/jira/browse/CALCITE-5730
 Project: Calcite
  Issue Type: Bug
  Components: linq4j
Reporter: Feng Guo


*Description*

The EnumerableSortLimit Node deals with offset with following logic:
{code:java}
// skip the first 'offset' rows by deleting them from the map
if (offset > 0) {
  // search the key up to (but excluding) which we have to remove entries from 
the map
  int skipped = 0;
  TKey until = null;
  for (Map.Entry> e : map.entrySet()) {
skipped += e.getValue().size();

if (skipped > offset) {
  // we might need to remove entries from the list
  List l = e.getValue();
  int toKeep = skipped - offset;
  if (toKeep < l.size()) {
l.subList(0, l.size() - toKeep).clear();
  }

  until = e.getKey();
  break;
}
  }
  if (until == null) {
// the offset is bigger than the number of rows in the map
return Linq4j.emptyEnumerator();
  }
  map.headMap(until, false).clear();
}
{code}

 In a NULLS FIRST sort, if we set offset=1, limit = 1 when first 10 rows have 
null compare key, the until will be null. But that does not mean offset bigger 
than number of rows, it should have results instead of emptyEnumerator;




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [DISCUSS] Towards Calcite 1.35.0

2023-05-29 Thread Julian Hyde
Mid-June sounds like a good idea.

I would like to see the following Jira cases finished:
 * 5701 NAMED_STRUCT (MasseGuillaume)
 * 5640 SAFE_ADD (DanZou)
 * 5625 SEARCH (olivrlee)
 * 5626 Fully-qualified names (herunkang2018)
 * 5615 SQL Logic Test (mbudiu)
 * 5607 JSON serialization (olivrlee)
 * 5564 PERCENTILE_CONT (tanclary)
 * 5526 Unparsing literals (TJ Banghart)

If the authors have made changes they would like me to review, please
add a comment to the Jira case.

Any other cases, don't ask me personally, ask everyone on the dev
list. My capacity to review PRs is limited.

Julian

On Fri, May 26, 2023 at 11:16 PM Benchao Li  wrote:
>
> It's been a bit more than 2 months since our last release [1] and there are
> currently 80+ new commits in master.
>
> As usual, according to our Jira dashboard [2] and Github [3], there are
> many pending issues that could / should be part of the release. I'd propose
> to make a collective effort to try to clean up our 1.35 backlog and merge
> the PRs which are in a good state. I'd propose to aim for **mid June** to
> release 1.35.0, this will give us about 15-20 days to clean up pending PRs
> for next version. What do you think?
>
> According to [4], the following release managers would be:
> - 1.35.0 Duan Xiong
> - 1.36.0 Benchao Li
> - 1.37.0 Sergey Nuyanzin
> - 1.38.0 Julian Hyde
>
> @Duan Xiong, are you still available for being the release manager for
> 1.35.0?
>
> And contributors, if you have any work that is in good shape and want to be
> included in 1.35.0, please mark the fixVersion to 1.35.0, this will inform
> the release manager, and we'll try our best to get it in.
>
> [1] https://calcite.apache.org/docs/history.html#v1-34-0
> [2]
> https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12333950
> [3] https://github.com/apache/calcite/pulls
> [4] https://lists.apache.org/thread/tm3t42qvpq3db24xtd2g468ofv83l6hk
>
>
> Best,
> Benchao Li