mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-21 11:13:54 +03:00
Enhance the percentile() and median() extension functions so that they can be
window functions. FossilOrigin-Name: 4d0e3df4b9c609755977b8a462126242d2be1310c0122a8d4ba76d98d32a7230
This commit is contained in:
@@ -2049,7 +2049,11 @@ static void minMaxFinalize(sqlite3_context *context){
|
||||
** group_concat(EXPR, ?SEPARATOR?)
|
||||
** string_agg(EXPR, SEPARATOR)
|
||||
**
|
||||
** The SEPARATOR goes before the EXPR string. This is tragic. The
|
||||
** Content is accumulated in GroupConcatCtx.str with the SEPARATOR
|
||||
** coming before the EXPR value, except for the first entry which
|
||||
** omits the SEPARATOR.
|
||||
**
|
||||
** It is tragic that the SEPARATOR goes before the EXPR string. The
|
||||
** groupConcatInverse() implementation would have been easier if the
|
||||
** SEPARATOR were appended after EXPR. And the order is undocumented,
|
||||
** so we could change it, in theory. But the old behavior has been
|
||||
@@ -2153,7 +2157,7 @@ static void groupConcatInverse(
|
||||
/* pGCC is always non-NULL since groupConcatStep() will have always
|
||||
** run first to initialize it */
|
||||
if( ALWAYS(pGCC) ){
|
||||
int nVS;
|
||||
int nVS; /* Number of characters to remove */
|
||||
/* Must call sqlite3_value_text() to convert the argument into text prior
|
||||
** to invoking sqlite3_value_bytes(), in case the text encoding is UTF16 */
|
||||
(void)sqlite3_value_text(argv[0]);
|
||||
|
Reference in New Issue
Block a user