** often small. The developers might revisit that decision later,
** should the need arise.
*/
-#ifdef SQLITE_STATIC_PERCENTILE
+#if defined(SQLITE3_H)
+ /* no-op */
+#elif defined(SQLITE_STATIC_PERCENTILE)
# include "sqlite3.h"
#else
# include "sqlite3ext.h"
return a>=-0.001 && a<=0.001;
}
-#if 0
-/* Verify that the elements of the Percentile p are in fact sorted.
-** Used for testing and debugging only.
-*/
-static void percentAssertSorted(Percentile *p){
- int i;
- for(i=p->nUsed-2; i>=0 && p->a[i]<=p->a[i+1]; i--){}
- assert( i<0 );
-}
-#else
-# define percentAssertSorted(X)
-#endif
-
/*
** Search p (which must have p->bSorted) looking for an entry with
** value y. Return the index of that entry.
p->a[p->nUsed++] = y;
}else if( p->bKeepSorted ){
int i;
- percentAssertSorted(p);
i = percentBinarySearch(p, y, 0);
if( i<p->nUsed ){
memmove(&p->a[i+1], &p->a[i], (p->nUsed-i)*sizeof(p->a[0]));
assert( p->nUsed>1 );
percentSort(p->a, p->nUsed);
p->bSorted = 1;
- }else{
- percentAssertSorted(p);
}
p->bKeepSorted = 1;
memmove(&p->a[i], &p->a[i+1], (p->nUsed - i)*sizeof(p->a[0]));
}
}
- percentAssertSorted(p);
}
/*
assert( p->nUsed>1 );
percentSort(p->a, p->nUsed);
p->bSorted = 1;
- }else{
- percentAssertSorted(p);
}
ix = p->rPct*(p->nUsed-1);
i1 = (unsigned)ix;
){
int rc = SQLITE_OK;
int i;
-#ifdef SQLITE_STATIC_PERCENTILE
+#if defined(SQLITE3_H) || defined(SQLITE_STATIC_PERCENTILE)
(void)pApi; /* Unused parameter */
#else
SQLITE_EXTENSION_INIT2(pApi);
-C Enhance\sthe\spercentile\sextension\sto\ssupport\spercentile_cont()\sand\npercentile_disc().\s\sAdd\ssupport\sfor\sordered-set\saggregate\snotation\sin\s\nthe\sparser\swhen\scompiling\swith\sSQLITE_ENABLE_ORDERED_SET_AGGREGATES.\s\sA\nnew\sfunction\sproperty\sSQLITE_SELFORDER1\smust\sappear\son\sany\saggregate\sfunction\nthat\swants\sto\stake\sadvantage\sof\sthe\sordered-set\saggregate\snotation.
-D 2024-09-02T12:07:37.155
+C Remove\ssome\sdebug/test\scode\sfrom\spercentile.\s\sMake\sthe\sextension\seasier\sto\nstatically\slink.
+D 2024-09-02T14:46:56.875
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F ext/misc/noop.c f1a21cc9b7a4e667e5c8458d80ba680b8bd4315a003f256006046879f679c5a0
F ext/misc/normalize.c bd84355c118e297522aba74de34a4fd286fc775524e0499b14473918d09ea61f
F ext/misc/pcachetrace.c f4227ce03fb16aa8d6f321b72dd051097419d7a028a9853af048bee7645cb405
-F ext/misc/percentile.c 4e333fc78d2a7b9cf362e29f30fa3f486cdab9e69fbc9aa0f680399683aa22f7
+F ext/misc/percentile.c 519498f4b1da580c309f6101bad8ed75dae8b14b1cedeb9ed5674c5ba56dcfd8
F ext/misc/prefixes.c 82645f79229877afab08c8b08ca1e7fa31921280906b90a61c294e4f540cd2a6
F ext/misc/qpvtab.c fc189e127f68f791af90a487f4460ec91539a716daf45a0c357e963fd47cc06c
F ext/misc/randomjson.c ef835fc64289e76ac4873b85fe12f9463a036168d7683cf2b773e36e6262c4ed
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 9f84e8d59bcda642e732565e840f6a880a01b2fc65af2651248f6a8a6e1cb65a e1bca168e70335fa2f9537632fd16e374c566a564fab4974c0b8f61cb63d08ce
-R a80c34160df19b1603ad0e7833a0d0c3
+P 557bd245ef24af15da1374762bbeb9b8b0241da06e604efdf00d567a9ed09216
+R ec683c52072c14116d879dab2762a8e0
U drh
-Z bcaae55c6dbf3569256cb9e1e280cac1
+Z 2046e8e3b6b1593905ac362bd0920672
# Remove this line to create a well-formed Fossil manifest.
-557bd245ef24af15da1374762bbeb9b8b0241da06e604efdf00d567a9ed09216
+6e5f146e274b210749dd8923a2da56905eb098b5a66699ff9130e3e51b1ff662