Skip to content

Commit

Permalink
Merge pull request #139 from carlopi/duckdb_v113
Browse files Browse the repository at this point in the history
Bump to duckdb v1.1.3
  • Loading branch information
hannes authored Nov 11, 2024
2 parents 13cb1d6 + 7271bc5 commit e8968f5
Show file tree
Hide file tree
Showing 288 changed files with 8,682 additions and 3,389 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "duckdb",
"main": "./lib/duckdb.js",
"types": "./lib/duckdb.d.ts",
"version": "0.0.2-dev5.0",
"version": "1.1.3",
"description": "DuckDB node.js API",
"gypfile": true,
"dependencies": {
Expand Down
5 changes: 0 additions & 5 deletions src/duckdb/extension/icu/third_party/icu/common/putil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
// First, the platform type. Need this for U_PLATFORM.
#include "unicode/platform.h"

#if U_PLATFORM == U_PF_MINGW && defined __STRICT_ANSI__
/* tzset isn't defined in strict ANSI on MinGW. */
#undef __STRICT_ANSI__
#endif

/*
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

// // Node Stack.
// // Normally has one entry, which is the entire parse tree for the rules.
// // If errors occured, there may be additional subtrees left on the stack.
// // If errors occurred, there may be additional subtrees left on the stack.
// while (fNodeStackPtr > 0) {
// delete fNodeStack[fNodeStackPtr];
// fNodeStackPtr--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
// }
// }
// return;
// // delete local pointers only if error occured.
// // delete local pointers only if error occurred.
// ExitBuildSTdeleteall:
// delete initialState;
// delete failState;
Expand Down
2 changes: 1 addition & 1 deletion src/duckdb/extension/icu/third_party/icu/common/ucurr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ uprv_parseCurrency(const char* locale,

int32_t max = 0;
int32_t matchIndex = -1;
// case in-sensitive comparision against currency names
// case in-sensitive comparison against currency names
searchCurrencyName(currencyNames, total_currency_name_count,
upperText, textLen, partialMatchLen, &max, &matchIndex);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3019,7 +3019,7 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
U_INTERNAL UBool U_EXPORT2
ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){
if(res1==NULL || res2==NULL){
return res1==res2; /* pointer comparision */
return res1==res2; /* pointer comparison */
}
if(res1->fKey==NULL|| res2->fKey==NULL){
return (res1->fKey==res2->fKey);
Expand Down
62 changes: 31 additions & 31 deletions src/duckdb/extension/icu/third_party/icu/common/uresimp.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ U_CFUNC UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle
* Returns a resource that can be located using the pathToResource argument. One needs optional package, locale
* and path inside the locale, for example: "/myData/en/zoneStrings/3". Keys and indexes are supported. Keys
* need to reference data in named structures, while indexes can reference both named and anonymous resources.
* Features a fill-in parameter.
*
* Features a fill-in parameter.
*
* Note, this function does NOT have a syntax for specifying items within a tree. May want to consider a
* syntax that delineates between package/tree and resource.
* syntax that delineates between package/tree and resource.
*
* @param pathToResource a path that will lead to the requested resource
* @param fillIn if NULL a new UResourceBundle struct is allocated and must be deleted by the caller.
Expand All @@ -184,16 +184,16 @@ U_CFUNC UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must delete it
*/
U_CAPI UResourceBundle* U_EXPORT2
ures_findResource(const char* pathToResource,
UResourceBundle *fillIn, UErrorCode *status);
ures_findResource(const char* pathToResource,
UResourceBundle *fillIn, UErrorCode *status);

/**
* Returns a sub resource that can be located using the pathToResource argument. One needs a path inside
* Returns a sub resource that can be located using the pathToResource argument. One needs a path inside
* the supplied resource, for example, if you have "en_US" resource bundle opened, you might ask for
* "zoneStrings/3". Keys and indexes are supported. Keys
* need to reference data in named structures, while indexes can reference both
* need to reference data in named structures, while indexes can reference both
* named and anonymous resources.
* Features a fill-in parameter.
* Features a fill-in parameter.
*
* @param resourceBundle a resource
* @param pathToResource a path that will lead to the requested resource
Expand All @@ -203,8 +203,8 @@ ures_findResource(const char* pathToResource,
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must delete it
*/
U_CAPI UResourceBundle* U_EXPORT2
ures_findSubResource(const UResourceBundle *resB,
char* pathToResource,
ures_findSubResource(const UResourceBundle *resB,
char* pathToResource,
UResourceBundle *fillIn, UErrorCode *status);

/**
Expand All @@ -215,23 +215,23 @@ ures_findSubResource(const UResourceBundle *resB,
* @param resName top level resource. Example: "collations"
* @param keyword locale keyword. Example: "collation"
* @param locid The requested locale
* @param isAvailable If non-null, pointer to fillin parameter that indicates whether the
* requested locale was available. The locale is defined as 'available' if it physically
* @param isAvailable If non-null, pointer to fillin parameter that indicates whether the
* requested locale was available. The locale is defined as 'available' if it physically
* exists within the specified tree.
* @param omitDefault if TRUE, omit keyword and value if default. 'de_DE\@collation=standard' -> 'de_DE'
* @param status error code
* @return the actual buffer size needed for the full locale. If it's greater
* @return the actual buffer size needed for the full locale. If it's greater
* than resultCapacity, the returned full name will be truncated and an error code will be returned.
*/
U_CAPI int32_t U_EXPORT2
ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
const char *path, const char *resName, const char *keyword, const char *locid,
UBool *isAvailable, UBool omitDefault, UErrorCode *status);

/**
* Given a tree path and keyword, return a string enumeration of all possible values for that keyword.
* @param path path to the tree, or NULL for ICU data
* @param keyword a particular keyword to consider, must match a top level resource name
* @param keyword a particular keyword to consider, must match a top level resource name
* within the tree.
* @param status error code
*/
Expand All @@ -251,14 +251,14 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
* Alternatively, you can supply a struct to be filled by this function.
* @param status: fills in the outgoing error code
* could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found
* could be a non-failing error
* could be a non-failing error
* e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT>
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must delete it
*/
U_CAPI UResourceBundle* U_EXPORT2
ures_getByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
UResourceBundle *fillIn,
U_CAPI UResourceBundle* U_EXPORT2
ures_getByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
UResourceBundle *fillIn,
UErrorCode *status);


Expand All @@ -272,13 +272,13 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
* @param inKey a key associated with the requested resource
* @param status: fills in the outgoing error code
* could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found
* could be a non-failing error
* could be a non-failing error
* e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING </TT>
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must delete it
*/
U_CAPI const UChar* U_EXPORT2
ures_getStringByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
U_CAPI const UChar* U_EXPORT2
ures_getStringByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
int32_t* len,
UErrorCode *status);

Expand Down Expand Up @@ -318,29 +318,29 @@ ures_getVersionByKey(const UResourceBundle *resB,
* The caller does not own this string.
* @see ures_getVersion
*/
U_CAPI const char* U_EXPORT2
U_CAPI const char* U_EXPORT2
ures_getVersionNumberInternal(const UResourceBundle *resourceBundle);

/**
* Return the name of the Locale associated with this ResourceBundle. This API allows
* you to query for the real locale of the resource. For example, if you requested
* "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be returned.
* you to query for the real locale of the resource. For example, if you requested
* "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be returned.
* For subresources, the locale where this resource comes from will be returned.
* If fallback has occured, getLocale will reflect this.
* If fallback has occurred, getLocale will reflect this.
*
* This internal version avoids deprecated-warnings in ICU code.
*
* @param resourceBundle resource bundle in question
* @param status just for catching illegal arguments
* @return A Locale name
*/
U_CAPI const char* U_EXPORT2
ures_getLocaleInternal(const UResourceBundle* resourceBundle,
U_CAPI const char* U_EXPORT2
ures_getLocaleInternal(const UResourceBundle* resourceBundle,
UErrorCode* status);

/**
* Same as ures_openDirect() but uses the fill-in parameter instead of allocating a new bundle.
*
*
* @param r The existing UResourceBundle to fill in. If NULL then status will be
* set to U_ILLEGAL_ARGUMENT_ERROR.
* @param packageName The packageName and locale together point to an ICU udata object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ uprv_strCompare(const UChar *s1, int32_t length1,
length2=u_strlen(s2);
}

/* limit1=start1+min(lenght1, length2) */
/* limit1=start1+min(length1, length2) */
if(length1<length2) {
lengthResult=-1;
limit1=start1+length1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int32_t UVector::indexOf(UElement key, int32_t startIndex, int8_t hint) const {
} else {
for (i=startIndex; i<count; ++i) {
/* Pointers are not always the same size as ints so to perform
* a valid comparision we need to know whether we are being
* a valid comparison we need to know whether we are being
* provided an int or a pointer. */
if (hint & HINT_KEY_POINTER) {
if (key.pointer == elements[i].pointer) {
Expand Down
24 changes: 12 additions & 12 deletions src/duckdb/extension/icu/third_party/icu/i18n/coleitr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 08/03/98 erm Synched with 1.2 version of CollationElementIterator.java
* 12/10/99 aliu Ported Thai collation support from Java.
* 01/25/01 swquek Modified to a C++ wrapper calling C APIs (ucoliter.h)
* 02/19/01 swquek Removed CollationElementIterator() since it is
* 02/19/01 swquek Removed CollationElementIterator() since it is
* private constructor and no calls are made to it
* 2012-2014 markus Rewritten in C++ again.
*/
Expand Down Expand Up @@ -53,7 +53,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CollationElementIterator)
/* CollationElementIterator public constructor/destructor ------------------ */

CollationElementIterator::CollationElementIterator(
const CollationElementIterator& other)
const CollationElementIterator& other)
: UObject(other), iter_(NULL), rbc_(NULL), otherHalf_(0), dir_(0), offsets_(NULL) {
*this = other;
}
Expand Down Expand Up @@ -98,8 +98,8 @@ int32_t CollationElementIterator::getOffset() const

/**
* Get the ordering priority of the next character in the string.
* @return the next character's ordering. Returns NULLORDER if an error has
* occured or if the end of string has been reached
* @return the next character's ordering. Returns NULLORDER if an error has
* occurred or if the end of string has been reached
*/
int32_t CollationElementIterator::next(UErrorCode& status)
{
Expand Down Expand Up @@ -161,8 +161,8 @@ UBool CollationElementIterator::operator==(
/**
* Get the ordering priority of the previous collation element in the string.
* @param status the error code status.
* @return the previous element's ordering. Returns NULLORDER if an error has
* occured or if the start of string has been reached.
* @return the previous element's ordering. Returns NULLORDER if an error has
* occurred or if the start of string has been reached.
*/
int32_t CollationElementIterator::previous(UErrorCode& status)
{
Expand Down Expand Up @@ -227,7 +227,7 @@ void CollationElementIterator::reset()
dir_ = 0;
}

void CollationElementIterator::setOffset(int32_t newOffset,
void CollationElementIterator::setOffset(int32_t newOffset,
UErrorCode& status)
{
if (U_FAILURE(status)) { return; }
Expand Down Expand Up @@ -297,10 +297,10 @@ void CollationElementIterator::setText(const UnicodeString& source,
}

// Sets the source to the new character iterator.
void CollationElementIterator::setText(CharacterIterator& source,
void CollationElementIterator::setText(CharacterIterator& source,
UErrorCode& status)
{
if (U_FAILURE(status))
if (U_FAILURE(status))
return;

source.getText(string_);
Expand All @@ -323,7 +323,7 @@ int32_t CollationElementIterator::strengthOrder(int32_t order) const

/* CollationElementIterator private constructors/destructors --------------- */

/**
/**
* This is the "real" constructor for this class; it constructs an iterator
* over the source text using the specified collator
*/
Expand All @@ -335,8 +335,8 @@ CollationElementIterator::CollationElementIterator(
setText(source, status);
}

/**
* This is the "real" constructor for this class; it constructs an iterator over
/**
* This is the "real" constructor for this class; it constructs an iterator over
* the source text using the specified collator
*/
CollationElementIterator::CollationElementIterator(
Expand Down
2 changes: 1 addition & 1 deletion src/duckdb/extension/icu/third_party/icu/i18n/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Format::operator==(const Format& that) const
* Simple function for initializing a UParseError from a UnicodeString.
*
* @param pattern The pattern to copy into the parseError
* @param pos The position in pattern where the error occured
* @param pos The position in pattern where the error occurred
* @param parseError The UParseError object to fill in
* @draft ICU 2.4
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ UnicodeString& ListFormatter::format_(
}
if (handler != nullptr) {
// If there are already some data in appendTo, we need to adjust the index
// by shifting that lenght while insert into handler.
// by shifting that length while insert into handler.
int32_t shift = appendTo.length() + prefixLength;
// Output the ULISTFMT_ELEMENT_FIELD in the order of the input elements
for (int32_t i = 0; i < nItems; ++i) {
Expand All @@ -545,9 +545,9 @@ UnicodeString& ListFormatter::format_(
offsets[i + nItems]); // limit
}
// The locale pattern may reorder the items (such as in ur-IN locale),
// so we cannot assume the array is in accendning order.
// so we cannot assume the array is in ascending order.
// To handle the edging case, just insert the two ends into the array
// and sort. Then we output ULISTFMT_LITERAL_FIELD if the indecies
// and sort. Then we output ULISTFMT_LITERAL_FIELD if the indices
// between the even and odd position are not the same in the sorted array.
offsets[2 * nItems] = shift - prefixLength;
offsets[2 * nItems + 1] = result.length() + shift - prefixLength;
Expand All @@ -569,7 +569,7 @@ UnicodeString& ListFormatter::format_(
}
appendTo += result;
}
#endif
#endif
return appendTo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
* this method with delta=-3 will change the value to "1.23456".
*
* @param delta The number of magnitudes of ten to change by.
* @return true if integer overflow occured; false otherwise.
* @return true if integer overflow occurred; false otherwise.
*/
bool adjustMagnitude(int32_t delta);

Expand Down
2 changes: 1 addition & 1 deletion src/duckdb/extension/icu/third_party/icu/i18n/tzgnames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class TZGNCore : public UMemory {


// ---------------------------------------------------
// TZGNCore - core implmentation of TimeZoneGenericNames
// TZGNCore - core implementation of TimeZoneGenericNames
//
// TimeZoneGenericNames is parallel to TimeZoneNames,
// but handles run-time generated time zone names.
Expand Down
Loading

0 comments on commit e8968f5

Please sign in to comment.