Skip to content

Return non-Nullable results from COUNT(DISTINCT), more complete.#11661

Merged
alexey-milovidov merged 10 commits intomasterfrom
return-not-nullable-from-count-distinct-2
Jun 17, 2020
Merged

Return non-Nullable results from COUNT(DISTINCT), more complete.#11661
alexey-milovidov merged 10 commits intomasterfrom
return-not-nullable-from-count-distinct-2

Conversation

@alexey-milovidov
Copy link
Member

Changelog category (leave one):

  • Backward Incompatible Change

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Return non-Nullable result from COUNT(DISTINCT), and uniq aggregate functions family. If all passed values are NULL, return zero instead. This improves SQL compatibility.

Detailed description / Documentation draft:
It is better than #11593, because if all arguments are NULL literals, we return 0.

@blinkov blinkov added the pr-backward-incompatible Pull request with backwards incompatible changes label Jun 14, 2020
@alexey-milovidov alexey-milovidov force-pushed the return-not-nullable-from-count-distinct-2 branch from 0491ff5 to 217d054 Compare June 14, 2020 17:42
@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Jun 16, 2020

This PR is also notable because we will augment all factories with documentation in similar way
- to make documentation available within running server.

@alexey-milovidov alexey-milovidov merged commit e07d020 into master Jun 17, 2020
@alexey-milovidov alexey-milovidov deleted the return-not-nullable-from-count-distinct-2 branch June 17, 2020 06:25
azat added a commit to azat/ClickHouse that referenced this pull request Jun 17, 2020
The following error reported:

    FAILED: src/Interpreters/tests/hash_map
    ...
    ld.lld: error: undefined symbol: typeinfo for DB::AggregateFunctionCount
    >>> referenced by typeinfo:308 (../contrib/libcxx/include/typeinfo:308)
    >>>               InterpreterSelectQuery.cpp.o:(std::__1::enable_if<is_pointer_v<DB::AggregateFunctionCount*>, DB::AggregateFunctionCount*>::type typeid_cast<DB::AggregateFunctionCount*, DB::IAggregateFunction>(DB::IAggregateFunction*)) in archive src/libdbms.a
    collect2: error: ld returned 1 exit status

And also this one with gold linker:

  FAILED: programs/clickhouse-odbc-bridge
  ...  src/AggregateFunctions/libclickhouse_aggregate_functions.a ... src/libdbms.a ...
  ../contrib/libcxx/include/typeinfo:308: error: undefined reference to 'typeinfo for DB::AggregateFunctionCount'

Due to order?

Introduced by 394fb64/ClickHouse#11661 I guess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backward-incompatible Pull request with backwards incompatible changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants