duckdb 0.4.1-dev439.0 → 0.4.1-dev454.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/duckdb.cpp CHANGED
@@ -8075,7 +8075,7 @@ ParameterNotResolvedException::ParameterNotResolvedException()
8075
8075
 
8076
8076
 
8077
8077
  // LICENSE_CHANGE_BEGIN
8078
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
8078
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
8079
8079
  // See the end of this file for a list
8080
8080
 
8081
8081
  /*
@@ -8117,7 +8117,7 @@ ParameterNotResolvedException::ParameterNotResolvedException()
8117
8117
 
8118
8118
 
8119
8119
  // LICENSE_CHANGE_BEGIN
8120
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
8120
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
8121
8121
  // See the end of this file for a list
8122
8122
 
8123
8123
  // Formatting library for C++ - the core API
@@ -12901,7 +12901,7 @@ FMT_END_NAMESPACE
12901
12901
 
12902
12902
 
12903
12903
  // LICENSE_CHANGE_BEGIN
12904
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
12904
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
12905
12905
  // See the end of this file for a list
12906
12906
 
12907
12907
  // Formatting library for C++ - legacy printf implementation
@@ -12920,7 +12920,7 @@ FMT_END_NAMESPACE
12920
12920
 
12921
12921
 
12922
12922
  // LICENSE_CHANGE_BEGIN
12923
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
12923
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
12924
12924
  // See the end of this file for a list
12925
12925
 
12926
12926
  // Formatting library for C++ - std::ostream support
@@ -14081,7 +14081,7 @@ void FileBuffer::Clear() {
14081
14081
 
14082
14082
 
14083
14083
  // LICENSE_CHANGE_BEGIN
14084
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
14084
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
14085
14085
  // See the end of this file for a list
14086
14086
 
14087
14087
  /*
@@ -15421,7 +15421,7 @@ static constexpr const unsigned char GZIP_FLAG_UNSUPPORTED =
15421
15421
 
15422
15422
 
15423
15423
  // LICENSE_CHANGE_BEGIN
15424
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
15424
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #4
15425
15425
  // See the end of this file for a list
15426
15426
 
15427
15427
  /* miniz.c 2.0.8 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing
@@ -16719,7 +16719,7 @@ void *mz_zip_extract_archive_file_to_heap_v2(const char *pZip_filename, const ch
16719
16719
 
16720
16720
 
16721
16721
  // LICENSE_CHANGE_BEGIN
16722
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
16722
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #4
16723
16723
  // See the end of this file for a list
16724
16724
 
16725
16725
  //===----------------------------------------------------------------------===//
@@ -20770,7 +20770,7 @@ struct IntervalToStringCast {
20770
20770
 
20771
20771
 
20772
20772
  // LICENSE_CHANGE_BEGIN
20773
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #4
20773
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #5
20774
20774
  // See the end of this file for a list
20775
20775
 
20776
20776
  // duckdb_fast_float by Daniel Lemire
@@ -26048,7 +26048,7 @@ private:
26048
26048
 
26049
26049
 
26050
26050
  // LICENSE_CHANGE_BEGIN
26051
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #5
26051
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
26052
26052
  // See the end of this file for a list
26053
26053
 
26054
26054
  /*
@@ -26175,7 +26175,7 @@ private:
26175
26175
 
26176
26176
 
26177
26177
  // LICENSE_CHANGE_BEGIN
26178
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #5
26178
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
26179
26179
  // See the end of this file for a list
26180
26180
 
26181
26181
  /*
@@ -26264,7 +26264,7 @@ private:
26264
26264
 
26265
26265
 
26266
26266
  // LICENSE_CHANGE_BEGIN
26267
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #5
26267
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
26268
26268
  // See the end of this file for a list
26269
26269
 
26270
26270
  /*
@@ -29692,1191 +29692,6 @@ DUCKDB_API std::vector<Match> RegexFindAll(const std::string &input, const Regex
29692
29692
 
29693
29693
 
29694
29694
 
29695
- // LICENSE_CHANGE_BEGIN
29696
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
29697
- // See the end of this file for a list
29698
-
29699
- // Copyright 2003-2009 The RE2 Authors. All Rights Reserved.
29700
- // Use of this source code is governed by a BSD-style
29701
- // license that can be found in the LICENSE file.
29702
-
29703
- #ifndef RE2_RE2_H_
29704
- #define RE2_RE2_H_
29705
-
29706
- // C++ interface to the re2 regular-expression library.
29707
- // RE2 supports Perl-style regular expressions (with extensions like
29708
- // \d, \w, \s, ...).
29709
- //
29710
- // -----------------------------------------------------------------------
29711
- // REGEXP SYNTAX:
29712
- //
29713
- // This module uses the re2 library and hence supports
29714
- // its syntax for regular expressions, which is similar to Perl's with
29715
- // some of the more complicated things thrown away. In particular,
29716
- // backreferences and generalized assertions are not available, nor is \Z.
29717
- //
29718
- // See https://github.com/google/re2/wiki/Syntax for the syntax
29719
- // supported by RE2, and a comparison with PCRE and PERL regexps.
29720
- //
29721
- // For those not familiar with Perl's regular expressions,
29722
- // here are some examples of the most commonly used extensions:
29723
- //
29724
- // "hello (\\w+) world" -- \w matches a "word" character
29725
- // "version (\\d+)" -- \d matches a digit
29726
- // "hello\\s+world" -- \s matches any whitespace character
29727
- // "\\b(\\w+)\\b" -- \b matches non-empty string at word boundary
29728
- // "(?i)hello" -- (?i) turns on case-insensitive matching
29729
- // "/\\*(.*?)\\*/" -- .*? matches . minimum no. of times possible
29730
- //
29731
- // -----------------------------------------------------------------------
29732
- // MATCHING INTERFACE:
29733
- //
29734
- // The "FullMatch" operation checks that supplied text matches a
29735
- // supplied pattern exactly.
29736
- //
29737
- // Example: successful match
29738
- // CHECK(RE2::FullMatch("hello", "h.*o"));
29739
- //
29740
- // Example: unsuccessful match (requires full match):
29741
- // CHECK(!RE2::FullMatch("hello", "e"));
29742
- //
29743
- // -----------------------------------------------------------------------
29744
- // UTF-8 AND THE MATCHING INTERFACE:
29745
- //
29746
- // By default, the pattern and input text are interpreted as UTF-8.
29747
- // The RE2::Latin1 option causes them to be interpreted as Latin-1.
29748
- //
29749
- // Example:
29750
- // CHECK(RE2::FullMatch(utf8_string, RE2(utf8_pattern)));
29751
- // CHECK(RE2::FullMatch(latin1_string, RE2(latin1_pattern, RE2::Latin1)));
29752
- //
29753
- // -----------------------------------------------------------------------
29754
- // MATCHING WITH SUBSTRING EXTRACTION:
29755
- //
29756
- // You can supply extra pointer arguments to extract matched substrings.
29757
- // On match failure, none of the pointees will have been modified.
29758
- // On match success, the substrings will be converted (as necessary) and
29759
- // their values will be assigned to their pointees until all conversions
29760
- // have succeeded or one conversion has failed.
29761
- // On conversion failure, the pointees will be in an indeterminate state
29762
- // because the caller has no way of knowing which conversion failed.
29763
- // However, conversion cannot fail for types like string and StringPiece
29764
- // that do not inspect the substring contents. Hence, in the common case
29765
- // where all of the pointees are of such types, failure is always due to
29766
- // match failure and thus none of the pointees will have been modified.
29767
- //
29768
- // Example: extracts "ruby" into "s" and 1234 into "i"
29769
- // int i;
29770
- // std::string s;
29771
- // CHECK(RE2::FullMatch("ruby:1234", "(\\w+):(\\d+)", &s, &i));
29772
- //
29773
- // Example: fails because string cannot be stored in integer
29774
- // CHECK(!RE2::FullMatch("ruby", "(.*)", &i));
29775
- //
29776
- // Example: fails because there aren't enough sub-patterns
29777
- // CHECK(!RE2::FullMatch("ruby:1234", "\\w+:\\d+", &s));
29778
- //
29779
- // Example: does not try to extract any extra sub-patterns
29780
- // CHECK(RE2::FullMatch("ruby:1234", "(\\w+):(\\d+)", &s));
29781
- //
29782
- // Example: does not try to extract into NULL
29783
- // CHECK(RE2::FullMatch("ruby:1234", "(\\w+):(\\d+)", NULL, &i));
29784
- //
29785
- // Example: integer overflow causes failure
29786
- // CHECK(!RE2::FullMatch("ruby:1234567891234", "\\w+:(\\d+)", &i));
29787
- //
29788
- // NOTE(rsc): Asking for substrings slows successful matches quite a bit.
29789
- // This may get a little faster in the future, but right now is slower
29790
- // than PCRE. On the other hand, failed matches run *very* fast (faster
29791
- // than PCRE), as do matches without substring extraction.
29792
- //
29793
- // -----------------------------------------------------------------------
29794
- // PARTIAL MATCHES
29795
- //
29796
- // You can use the "PartialMatch" operation when you want the pattern
29797
- // to match any substring of the text.
29798
- //
29799
- // Example: simple search for a string:
29800
- // CHECK(RE2::PartialMatch("hello", "ell"));
29801
- //
29802
- // Example: find first number in a string
29803
- // int number;
29804
- // CHECK(RE2::PartialMatch("x*100 + 20", "(\\d+)", &number));
29805
- // CHECK_EQ(number, 100);
29806
- //
29807
- // -----------------------------------------------------------------------
29808
- // PRE-COMPILED REGULAR EXPRESSIONS
29809
- //
29810
- // RE2 makes it easy to use any string as a regular expression, without
29811
- // requiring a separate compilation step.
29812
- //
29813
- // If speed is of the essence, you can create a pre-compiled "RE2"
29814
- // object from the pattern and use it multiple times. If you do so,
29815
- // you can typically parse text faster than with sscanf.
29816
- //
29817
- // Example: precompile pattern for faster matching:
29818
- // RE2 pattern("h.*o");
29819
- // while (ReadLine(&str)) {
29820
- // if (RE2::FullMatch(str, pattern)) ...;
29821
- // }
29822
- //
29823
- // -----------------------------------------------------------------------
29824
- // SCANNING TEXT INCREMENTALLY
29825
- //
29826
- // The "Consume" operation may be useful if you want to repeatedly
29827
- // match regular expressions at the front of a string and skip over
29828
- // them as they match. This requires use of the "StringPiece" type,
29829
- // which represents a sub-range of a real string.
29830
- //
29831
- // Example: read lines of the form "var = value" from a string.
29832
- // std::string contents = ...; // Fill string somehow
29833
- // StringPiece input(contents); // Wrap a StringPiece around it
29834
- //
29835
- // std::string var;
29836
- // int value;
29837
- // while (RE2::Consume(&input, "(\\w+) = (\\d+)\n", &var, &value)) {
29838
- // ...;
29839
- // }
29840
- //
29841
- // Each successful call to "Consume" will set "var/value", and also
29842
- // advance "input" so it points past the matched text. Note that if the
29843
- // regular expression matches an empty string, input will advance
29844
- // by 0 bytes. If the regular expression being used might match
29845
- // an empty string, the loop body must check for this case and either
29846
- // advance the string or break out of the loop.
29847
- //
29848
- // The "FindAndConsume" operation is similar to "Consume" but does not
29849
- // anchor your match at the beginning of the string. For example, you
29850
- // could extract all words from a string by repeatedly calling
29851
- // RE2::FindAndConsume(&input, "(\\w+)", &word)
29852
- //
29853
- // -----------------------------------------------------------------------
29854
- // USING VARIABLE NUMBER OF ARGUMENTS
29855
- //
29856
- // The above operations require you to know the number of arguments
29857
- // when you write the code. This is not always possible or easy (for
29858
- // example, the regular expression may be calculated at run time).
29859
- // You can use the "N" version of the operations when the number of
29860
- // match arguments are determined at run time.
29861
- //
29862
- // Example:
29863
- // const RE2::Arg* args[10];
29864
- // int n;
29865
- // // ... populate args with pointers to RE2::Arg values ...
29866
- // // ... set n to the number of RE2::Arg objects ...
29867
- // bool match = RE2::FullMatchN(input, pattern, args, n);
29868
- //
29869
- // The last statement is equivalent to
29870
- //
29871
- // bool match = RE2::FullMatch(input, pattern,
29872
- // *args[0], *args[1], ..., *args[n - 1]);
29873
- //
29874
- // -----------------------------------------------------------------------
29875
- // PARSING HEX/OCTAL/C-RADIX NUMBERS
29876
- //
29877
- // By default, if you pass a pointer to a numeric value, the
29878
- // corresponding text is interpreted as a base-10 number. You can
29879
- // instead wrap the pointer with a call to one of the operators Hex(),
29880
- // Octal(), or CRadix() to interpret the text in another base. The
29881
- // CRadix operator interprets C-style "0" (base-8) and "0x" (base-16)
29882
- // prefixes, but defaults to base-10.
29883
- //
29884
- // Example:
29885
- // int a, b, c, d;
29886
- // CHECK(RE2::FullMatch("100 40 0100 0x40", "(.*) (.*) (.*) (.*)",
29887
- // RE2::Octal(&a), RE2::Hex(&b), RE2::CRadix(&c), RE2::CRadix(&d));
29888
- // will leave 64 in a, b, c, and d.
29889
-
29890
- #include <stddef.h>
29891
- #include <stdint.h>
29892
- #include <algorithm>
29893
- #include <map>
29894
- #include <mutex>
29895
- #include <string>
29896
-
29897
-
29898
-
29899
- // LICENSE_CHANGE_BEGIN
29900
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
29901
- // See the end of this file for a list
29902
-
29903
- // Copyright 2001-2010 The RE2 Authors. All Rights Reserved.
29904
- // Use of this source code is governed by a BSD-style
29905
- // license that can be found in the LICENSE file.
29906
-
29907
- #ifndef RE2_STRINGPIECE_H_
29908
- #define RE2_STRINGPIECE_H_
29909
-
29910
- #ifdef min
29911
- #undef min
29912
- #endif
29913
-
29914
- // A string-like object that points to a sized piece of memory.
29915
- //
29916
- // Functions or methods may use const StringPiece& parameters to accept either
29917
- // a "const char*" or a "string" value that will be implicitly converted to
29918
- // a StringPiece. The implicit conversion means that it is often appropriate
29919
- // to include this .h file in other files rather than forward-declaring
29920
- // StringPiece as would be appropriate for most other Google classes.
29921
- //
29922
- // Systematic usage of StringPiece is encouraged as it will reduce unnecessary
29923
- // conversions from "const char*" to "string" and back again.
29924
- //
29925
- //
29926
- // Arghh! I wish C++ literals were "string".
29927
-
29928
- // Doing this simplifies the logic below.
29929
- #ifndef __has_include
29930
- #define __has_include(x) 0
29931
- #endif
29932
-
29933
- #include <stddef.h>
29934
- #include <string.h>
29935
- #include <algorithm>
29936
- #include <iosfwd>
29937
- #include <iterator>
29938
- #include <string>
29939
- #if __has_include(<string_view>) && __cplusplus >= 201703L
29940
- #include <string_view>
29941
- #endif
29942
-
29943
- namespace duckdb_re2 {
29944
-
29945
- class StringPiece {
29946
- public:
29947
- typedef std::char_traits<char> traits_type;
29948
- typedef char value_type;
29949
- typedef char* pointer;
29950
- typedef const char* const_pointer;
29951
- typedef char& reference;
29952
- typedef const char& const_reference;
29953
- typedef const char* const_iterator;
29954
- typedef const_iterator iterator;
29955
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
29956
- typedef const_reverse_iterator reverse_iterator;
29957
- typedef size_t size_type;
29958
- typedef ptrdiff_t difference_type;
29959
- static const size_type npos = static_cast<size_type>(-1);
29960
-
29961
- // We provide non-explicit singleton constructors so users can pass
29962
- // in a "const char*" or a "string" wherever a "StringPiece" is
29963
- // expected.
29964
- StringPiece()
29965
- : data_(NULL), size_(0) {}
29966
- #if __has_include(<string_view>) && __cplusplus >= 201703L
29967
- StringPiece(const std::string_view& str)
29968
- : data_(str.data()), size_(str.size()) {}
29969
- #endif
29970
- StringPiece(const std::string& str)
29971
- : data_(str.data()), size_(str.size()) {}
29972
- StringPiece(const char* str)
29973
- : data_(str), size_(str == NULL ? 0 : strlen(str)) {}
29974
- StringPiece(const char* str, size_type len)
29975
- : data_(str), size_(len) {}
29976
-
29977
- const_iterator begin() const { return data_; }
29978
- const_iterator end() const { return data_ + size_; }
29979
- const_reverse_iterator rbegin() const {
29980
- return const_reverse_iterator(data_ + size_);
29981
- }
29982
- const_reverse_iterator rend() const {
29983
- return const_reverse_iterator(data_);
29984
- }
29985
-
29986
- size_type size() const { return size_; }
29987
- size_type length() const { return size_; }
29988
- bool empty() const { return size_ == 0; }
29989
-
29990
- const_reference operator[](size_type i) const { return data_[i]; }
29991
- const_pointer data() const { return data_; }
29992
-
29993
- void remove_prefix(size_type n) {
29994
- data_ += n;
29995
- size_ -= n;
29996
- }
29997
-
29998
- void remove_suffix(size_type n) {
29999
- size_ -= n;
30000
- }
30001
-
30002
- void set(const char* str) {
30003
- data_ = str;
30004
- size_ = str == NULL ? 0 : strlen(str);
30005
- }
30006
-
30007
- void set(const char* str, size_type len) {
30008
- data_ = str;
30009
- size_ = len;
30010
- }
30011
-
30012
- // Converts to `std::basic_string`.
30013
- template <typename A>
30014
- explicit operator std::basic_string<char, traits_type, A>() const {
30015
- if (!data_) return {};
30016
- return std::basic_string<char, traits_type, A>(data_, size_);
30017
- }
30018
-
30019
- std::string as_string() const {
30020
- return std::string(data_, size_);
30021
- }
30022
-
30023
- // We also define ToString() here, since many other string-like
30024
- // interfaces name the routine that converts to a C++ string
30025
- // "ToString", and it's confusing to have the method that does that
30026
- // for a StringPiece be called "as_string()". We also leave the
30027
- // "as_string()" method defined here for existing code.
30028
- std::string ToString() const {
30029
- return std::string(data_, size_);
30030
- }
30031
-
30032
- void CopyToString(std::string* target) const {
30033
- target->assign(data_, size_);
30034
- }
30035
-
30036
- void AppendToString(std::string* target) const {
30037
- target->append(data_, size_);
30038
- }
30039
-
30040
- size_type copy(char* buf, size_type n, size_type pos = 0) const;
30041
- StringPiece substr(size_type pos = 0, size_type n = npos) const;
30042
-
30043
- int compare(const StringPiece& x) const {
30044
- size_type min_size = std::min(size(), x.size());
30045
- if (min_size > 0) {
30046
- int r = memcmp(data(), x.data(), min_size);
30047
- if (r < 0) return -1;
30048
- if (r > 0) return 1;
30049
- }
30050
- if (size() < x.size()) return -1;
30051
- if (size() > x.size()) return 1;
30052
- return 0;
30053
- }
30054
-
30055
- // Does "this" start with "x"?
30056
- bool starts_with(const StringPiece& x) const {
30057
- return x.empty() ||
30058
- (size() >= x.size() && memcmp(data(), x.data(), x.size()) == 0);
30059
- }
30060
-
30061
- // Does "this" end with "x"?
30062
- bool ends_with(const StringPiece& x) const {
30063
- return x.empty() ||
30064
- (size() >= x.size() &&
30065
- memcmp(data() + (size() - x.size()), x.data(), x.size()) == 0);
30066
- }
30067
-
30068
- bool contains(const StringPiece& s) const {
30069
- return find(s) != npos;
30070
- }
30071
-
30072
- size_type find(const StringPiece& s, size_type pos = 0) const;
30073
- size_type find(char c, size_type pos = 0) const;
30074
- size_type rfind(const StringPiece& s, size_type pos = npos) const;
30075
- size_type rfind(char c, size_type pos = npos) const;
30076
-
30077
- private:
30078
- const_pointer data_;
30079
- size_type size_;
30080
- };
30081
-
30082
- inline bool operator==(const StringPiece& x, const StringPiece& y) {
30083
- StringPiece::size_type len = x.size();
30084
- if (len != y.size()) return false;
30085
- return x.data() == y.data() || len == 0 ||
30086
- memcmp(x.data(), y.data(), len) == 0;
30087
- }
30088
-
30089
- inline bool operator!=(const StringPiece& x, const StringPiece& y) {
30090
- return !(x == y);
30091
- }
30092
-
30093
- inline bool operator<(const StringPiece& x, const StringPiece& y) {
30094
- StringPiece::size_type min_size = std::min(x.size(), y.size());
30095
- int r = min_size == 0 ? 0 : memcmp(x.data(), y.data(), min_size);
30096
- return (r < 0) || (r == 0 && x.size() < y.size());
30097
- }
30098
-
30099
- inline bool operator>(const StringPiece& x, const StringPiece& y) {
30100
- return y < x;
30101
- }
30102
-
30103
- inline bool operator<=(const StringPiece& x, const StringPiece& y) {
30104
- return !(x > y);
30105
- }
30106
-
30107
- inline bool operator>=(const StringPiece& x, const StringPiece& y) {
30108
- return !(x < y);
30109
- }
30110
-
30111
- // Allow StringPiece to be logged.
30112
- std::ostream& operator<<(std::ostream& o, const StringPiece& p);
30113
-
30114
- } // namespace duckdb_re2
30115
-
30116
- #endif // RE2_STRINGPIECE_H_
30117
-
30118
-
30119
- // LICENSE_CHANGE_END
30120
-
30121
-
30122
- namespace duckdb_re2 {
30123
- class Prog;
30124
- class Regexp;
30125
- } // namespace duckdb_re2
30126
-
30127
- namespace duckdb_re2 {
30128
-
30129
- // Interface for regular expression matching. Also corresponds to a
30130
- // pre-compiled regular expression. An "RE2" object is safe for
30131
- // concurrent use by multiple threads.
30132
- class RE2 {
30133
- public:
30134
- // We convert user-passed pointers into special Arg objects
30135
- class Arg;
30136
- class Options;
30137
-
30138
- // Defined in set.h.
30139
- class Set;
30140
-
30141
- enum ErrorCode {
30142
- NoError = 0,
30143
-
30144
- // Unexpected error
30145
- ErrorInternal,
30146
-
30147
- // Parse errors
30148
- ErrorBadEscape, // bad escape sequence
30149
- ErrorBadCharClass, // bad character class
30150
- ErrorBadCharRange, // bad character class range
30151
- ErrorMissingBracket, // missing closing ]
30152
- ErrorMissingParen, // missing closing )
30153
- ErrorTrailingBackslash, // trailing \ at end of regexp
30154
- ErrorRepeatArgument, // repeat argument missing, e.g. "*"
30155
- ErrorRepeatSize, // bad repetition argument
30156
- ErrorRepeatOp, // bad repetition operator
30157
- ErrorBadPerlOp, // bad perl operator
30158
- ErrorBadUTF8, // invalid UTF-8 in regexp
30159
- ErrorBadNamedCapture, // bad named capture group
30160
- ErrorPatternTooLarge // pattern too large (compile failed)
30161
- };
30162
-
30163
- // Predefined common options.
30164
- // If you need more complicated things, instantiate
30165
- // an Option class, possibly passing one of these to
30166
- // the Option constructor, change the settings, and pass that
30167
- // Option class to the RE2 constructor.
30168
- enum CannedOptions {
30169
- DefaultOptions = 0,
30170
- Latin1, // treat input as Latin-1 (default UTF-8)
30171
- POSIX, // POSIX syntax, leftmost-longest match
30172
- Quiet // do not log about regexp parse errors
30173
- };
30174
-
30175
- // Need to have the const char* and const std::string& forms for implicit
30176
- // conversions when passing string literals to FullMatch and PartialMatch.
30177
- // Otherwise the StringPiece form would be sufficient.
30178
- #ifndef SWIG
30179
- RE2(const char* pattern);
30180
- RE2(const std::string& pattern);
30181
- #endif
30182
- RE2(const StringPiece& pattern);
30183
- RE2(const StringPiece& pattern, const Options& options);
30184
- ~RE2();
30185
-
30186
- // Returns whether RE2 was created properly.
30187
- bool ok() const { return error_code() == NoError; }
30188
-
30189
- // The string specification for this RE2. E.g.
30190
- // RE2 re("ab*c?d+");
30191
- // re.pattern(); // "ab*c?d+"
30192
- const std::string& pattern() const { return pattern_; }
30193
-
30194
- // If RE2 could not be created properly, returns an error string.
30195
- // Else returns the empty string.
30196
- const std::string& error() const { return *error_; }
30197
-
30198
- // If RE2 could not be created properly, returns an error code.
30199
- // Else returns RE2::NoError (== 0).
30200
- ErrorCode error_code() const { return error_code_; }
30201
-
30202
- // If RE2 could not be created properly, returns the offending
30203
- // portion of the regexp.
30204
- const std::string& error_arg() const { return error_arg_; }
30205
-
30206
- // Returns the program size, a very approximate measure of a regexp's "cost".
30207
- // Larger numbers are more expensive than smaller numbers.
30208
- int ProgramSize() const;
30209
- int ReverseProgramSize() const;
30210
-
30211
- // EXPERIMENTAL! SUBJECT TO CHANGE!
30212
- // Outputs the program fanout as a histogram bucketed by powers of 2.
30213
- // Returns the number of the largest non-empty bucket.
30214
- int ProgramFanout(std::map<int, int>* histogram) const;
30215
- int ReverseProgramFanout(std::map<int, int>* histogram) const;
30216
-
30217
- // Returns the underlying Regexp; not for general use.
30218
- // Returns entire_regexp_ so that callers don't need
30219
- // to know about prefix_ and prefix_foldcase_.
30220
- duckdb_re2::Regexp* Regexp() const { return entire_regexp_; }
30221
-
30222
- /***** The array-based matching interface ******/
30223
-
30224
- // The functions here have names ending in 'N' and are used to implement
30225
- // the functions whose names are the prefix before the 'N'. It is sometimes
30226
- // useful to invoke them directly, but the syntax is awkward, so the 'N'-less
30227
- // versions should be preferred.
30228
- static bool FullMatchN(const StringPiece& text, const RE2& re,
30229
- const Arg* const args[], int n);
30230
- static bool PartialMatchN(const StringPiece& text, const RE2& re,
30231
- const Arg* const args[], int n);
30232
- static bool ConsumeN(StringPiece* input, const RE2& re,
30233
- const Arg* const args[], int n);
30234
- static bool FindAndConsumeN(StringPiece* input, const RE2& re,
30235
- const Arg* const args[], int n);
30236
-
30237
- #ifndef SWIG
30238
- private:
30239
- template <typename F, typename SP>
30240
- static inline bool Apply(F f, SP sp, const RE2& re) {
30241
- return f(sp, re, NULL, 0);
30242
- }
30243
-
30244
- template <typename F, typename SP, typename... A>
30245
- static inline bool Apply(F f, SP sp, const RE2& re, const A&... a) {
30246
- const Arg* const args[] = {&a...};
30247
- const int n = sizeof...(a);
30248
- return f(sp, re, args, n);
30249
- }
30250
-
30251
- public:
30252
- // In order to allow FullMatch() et al. to be called with a varying number
30253
- // of arguments of varying types, we use two layers of variadic templates.
30254
- // The first layer constructs the temporary Arg objects. The second layer
30255
- // (above) constructs the array of pointers to the temporary Arg objects.
30256
-
30257
- /***** The useful part: the matching interface *****/
30258
-
30259
- // Matches "text" against "re". If pointer arguments are
30260
- // supplied, copies matched sub-patterns into them.
30261
- //
30262
- // You can pass in a "const char*" or a "std::string" for "text".
30263
- // You can pass in a "const char*" or a "std::string" or a "RE2" for "re".
30264
- //
30265
- // The provided pointer arguments can be pointers to any scalar numeric
30266
- // type, or one of:
30267
- // std::string (matched piece is copied to string)
30268
- // StringPiece (StringPiece is mutated to point to matched piece)
30269
- // T (where "bool T::ParseFrom(const char*, size_t)" exists)
30270
- // (void*)NULL (the corresponding matched sub-pattern is not copied)
30271
- //
30272
- // Returns true iff all of the following conditions are satisfied:
30273
- // a. "text" matches "re" exactly
30274
- // b. The number of matched sub-patterns is >= number of supplied pointers
30275
- // c. The "i"th argument has a suitable type for holding the
30276
- // string captured as the "i"th sub-pattern. If you pass in
30277
- // NULL for the "i"th argument, or pass fewer arguments than
30278
- // number of sub-patterns, "i"th captured sub-pattern is
30279
- // ignored.
30280
- //
30281
- // CAVEAT: An optional sub-pattern that does not exist in the
30282
- // matched string is assigned the empty string. Therefore, the
30283
- // following will return false (because the empty string is not a
30284
- // valid number):
30285
- // int number;
30286
- // RE2::FullMatch("abc", "[a-z]+(\\d+)?", &number);
30287
- template <typename... A>
30288
- static bool FullMatch(const StringPiece& text, const RE2& re, A&&... a) {
30289
- return Apply(FullMatchN, text, re, Arg(std::forward<A>(a))...);
30290
- }
30291
-
30292
- // Exactly like FullMatch(), except that "re" is allowed to match
30293
- // a substring of "text".
30294
- template <typename... A>
30295
- static bool PartialMatch(const StringPiece& text, const RE2& re, A&&... a) {
30296
- return Apply(PartialMatchN, text, re, Arg(std::forward<A>(a))...);
30297
- }
30298
-
30299
- // Like FullMatch() and PartialMatch(), except that "re" has to match
30300
- // a prefix of the text, and "input" is advanced past the matched
30301
- // text. Note: "input" is modified iff this routine returns true
30302
- // and "re" matched a non-empty substring of "text".
30303
- template <typename... A>
30304
- static bool Consume(StringPiece* input, const RE2& re, A&&... a) {
30305
- return Apply(ConsumeN, input, re, Arg(std::forward<A>(a))...);
30306
- }
30307
-
30308
- // Like Consume(), but does not anchor the match at the beginning of
30309
- // the text. That is, "re" need not start its match at the beginning
30310
- // of "input". For example, "FindAndConsume(s, "(\\w+)", &word)" finds
30311
- // the next word in "s" and stores it in "word".
30312
- template <typename... A>
30313
- static bool FindAndConsume(StringPiece* input, const RE2& re, A&&... a) {
30314
- return Apply(FindAndConsumeN, input, re, Arg(std::forward<A>(a))...);
30315
- }
30316
- #endif
30317
-
30318
- // Replace the first match of "re" in "str" with "rewrite".
30319
- // Within "rewrite", backslash-escaped digits (\1 to \9) can be
30320
- // used to insert text matching corresponding parenthesized group
30321
- // from the pattern. \0 in "rewrite" refers to the entire matching
30322
- // text. E.g.,
30323
- //
30324
- // std::string s = "yabba dabba doo";
30325
- // CHECK(RE2::Replace(&s, "b+", "d"));
30326
- //
30327
- // will leave "s" containing "yada dabba doo"
30328
- //
30329
- // Returns true if the pattern matches and a replacement occurs,
30330
- // false otherwise.
30331
- static bool Replace(std::string* str,
30332
- const RE2& re,
30333
- const StringPiece& rewrite);
30334
-
30335
- // Like Replace(), except replaces successive non-overlapping occurrences
30336
- // of the pattern in the string with the rewrite. E.g.
30337
- //
30338
- // std::string s = "yabba dabba doo";
30339
- // CHECK(RE2::GlobalReplace(&s, "b+", "d"));
30340
- //
30341
- // will leave "s" containing "yada dada doo"
30342
- // Replacements are not subject to re-matching.
30343
- //
30344
- // Because GlobalReplace only replaces non-overlapping matches,
30345
- // replacing "ana" within "banana" makes only one replacement, not two.
30346
- //
30347
- // Returns the number of replacements made.
30348
- static int GlobalReplace(std::string* str,
30349
- const RE2& re,
30350
- const StringPiece& rewrite);
30351
-
30352
- // Like Replace, except that if the pattern matches, "rewrite"
30353
- // is copied into "out" with substitutions. The non-matching
30354
- // portions of "text" are ignored.
30355
- //
30356
- // Returns true iff a match occurred and the extraction happened
30357
- // successfully; if no match occurs, the string is left unaffected.
30358
- //
30359
- // REQUIRES: "text" must not alias any part of "*out".
30360
- static bool Extract(const StringPiece& text,
30361
- const RE2& re,
30362
- const StringPiece& rewrite,
30363
- std::string* out);
30364
-
30365
- // Escapes all potentially meaningful regexp characters in
30366
- // 'unquoted'. The returned string, used as a regular expression,
30367
- // will exactly match the original string. For example,
30368
- // 1.5-2.0?
30369
- // may become:
30370
- // 1\.5\-2\.0\?
30371
- static std::string QuoteMeta(const StringPiece& unquoted);
30372
-
30373
- // Computes range for any strings matching regexp. The min and max can in
30374
- // some cases be arbitrarily precise, so the caller gets to specify the
30375
- // maximum desired length of string returned.
30376
- //
30377
- // Assuming PossibleMatchRange(&min, &max, N) returns successfully, any
30378
- // string s that is an anchored match for this regexp satisfies
30379
- // min <= s && s <= max.
30380
- //
30381
- // Note that PossibleMatchRange() will only consider the first copy of an
30382
- // infinitely repeated element (i.e., any regexp element followed by a '*' or
30383
- // '+' operator). Regexps with "{N}" constructions are not affected, as those
30384
- // do not compile down to infinite repetitions.
30385
- //
30386
- // Returns true on success, false on error.
30387
- bool PossibleMatchRange(std::string* min, std::string* max,
30388
- int maxlen) const;
30389
-
30390
- // Generic matching interface
30391
-
30392
- // Type of match.
30393
- enum Anchor {
30394
- UNANCHORED, // No anchoring
30395
- ANCHOR_START, // Anchor at start only
30396
- ANCHOR_BOTH // Anchor at start and end
30397
- };
30398
-
30399
- // Return the number of capturing subpatterns, or -1 if the
30400
- // regexp wasn't valid on construction. The overall match ($0)
30401
- // does not count: if the regexp is "(a)(b)", returns 2.
30402
- int NumberOfCapturingGroups() const { return num_captures_; }
30403
-
30404
- // Return a map from names to capturing indices.
30405
- // The map records the index of the leftmost group
30406
- // with the given name.
30407
- // Only valid until the re is deleted.
30408
- const std::map<std::string, int>& NamedCapturingGroups() const;
30409
-
30410
- // Return a map from capturing indices to names.
30411
- // The map has no entries for unnamed groups.
30412
- // Only valid until the re is deleted.
30413
- const std::map<int, std::string>& CapturingGroupNames() const;
30414
-
30415
- // General matching routine.
30416
- // Match against text starting at offset startpos
30417
- // and stopping the search at offset endpos.
30418
- // Returns true if match found, false if not.
30419
- // On a successful match, fills in submatch[] (up to nsubmatch entries)
30420
- // with information about submatches.
30421
- // I.e. matching RE2("(foo)|(bar)baz") on "barbazbla" will return true, with
30422
- // submatch[0] = "barbaz", submatch[1].data() = NULL, submatch[2] = "bar",
30423
- // submatch[3].data() = NULL, ..., up to submatch[nsubmatch-1].data() = NULL.
30424
- // Caveat: submatch[] may be clobbered even on match failure.
30425
- //
30426
- // Don't ask for more match information than you will use:
30427
- // runs much faster with nsubmatch == 1 than nsubmatch > 1, and
30428
- // runs even faster if nsubmatch == 0.
30429
- // Doesn't make sense to use nsubmatch > 1 + NumberOfCapturingGroups(),
30430
- // but will be handled correctly.
30431
- //
30432
- // Passing text == StringPiece(NULL, 0) will be handled like any other
30433
- // empty string, but note that on return, it will not be possible to tell
30434
- // whether submatch i matched the empty string or did not match:
30435
- // either way, submatch[i].data() == NULL.
30436
- bool Match(const StringPiece& text,
30437
- size_t startpos,
30438
- size_t endpos,
30439
- Anchor re_anchor,
30440
- StringPiece* submatch,
30441
- int nsubmatch) const;
30442
-
30443
- // Check that the given rewrite string is suitable for use with this
30444
- // regular expression. It checks that:
30445
- // * The regular expression has enough parenthesized subexpressions
30446
- // to satisfy all of the \N tokens in rewrite
30447
- // * The rewrite string doesn't have any syntax errors. E.g.,
30448
- // '\' followed by anything other than a digit or '\'.
30449
- // A true return value guarantees that Replace() and Extract() won't
30450
- // fail because of a bad rewrite string.
30451
- bool CheckRewriteString(const StringPiece& rewrite,
30452
- std::string* error) const;
30453
-
30454
- // Returns the maximum submatch needed for the rewrite to be done by
30455
- // Replace(). E.g. if rewrite == "foo \\2,\\1", returns 2.
30456
- static int MaxSubmatch(const StringPiece& rewrite);
30457
-
30458
- // Append the "rewrite" string, with backslash subsitutions from "vec",
30459
- // to string "out".
30460
- // Returns true on success. This method can fail because of a malformed
30461
- // rewrite string. CheckRewriteString guarantees that the rewrite will
30462
- // be sucessful.
30463
- bool Rewrite(std::string* out,
30464
- const StringPiece& rewrite,
30465
- const StringPiece* vec,
30466
- int veclen) const;
30467
-
30468
- // Constructor options
30469
- class Options {
30470
- public:
30471
- // The options are (defaults in parentheses):
30472
- //
30473
- // utf8 (true) text and pattern are UTF-8; otherwise Latin-1
30474
- // posix_syntax (false) restrict regexps to POSIX egrep syntax
30475
- // longest_match (false) search for longest match, not first match
30476
- // log_errors (true) log syntax and execution errors to ERROR
30477
- // max_mem (see below) approx. max memory footprint of RE2
30478
- // literal (false) interpret string as literal, not regexp
30479
- // never_nl (false) never match \n, even if it is in regexp
30480
- // dot_nl (false) dot matches everything including new line
30481
- // never_capture (false) parse all parens as non-capturing
30482
- // case_sensitive (true) match is case-sensitive (regexp can override
30483
- // with (?i) unless in posix_syntax mode)
30484
- //
30485
- // The following options are only consulted when posix_syntax == true.
30486
- // When posix_syntax == false, these features are always enabled and
30487
- // cannot be turned off; to perform multi-line matching in that case,
30488
- // begin the regexp with (?m).
30489
- // perl_classes (false) allow Perl's \d \s \w \D \S \W
30490
- // word_boundary (false) allow Perl's \b \B (word boundary and not)
30491
- // one_line (false) ^ and $ only match beginning and end of text
30492
- //
30493
- // The max_mem option controls how much memory can be used
30494
- // to hold the compiled form of the regexp (the Prog) and
30495
- // its cached DFA graphs. Code Search placed limits on the number
30496
- // of Prog instructions and DFA states: 10,000 for both.
30497
- // In RE2, those limits would translate to about 240 KB per Prog
30498
- // and perhaps 2.5 MB per DFA (DFA state sizes vary by regexp; RE2 does a
30499
- // better job of keeping them small than Code Search did).
30500
- // Each RE2 has two Progs (one forward, one reverse), and each Prog
30501
- // can have two DFAs (one first match, one longest match).
30502
- // That makes 4 DFAs:
30503
- //
30504
- // forward, first-match - used for UNANCHORED or ANCHOR_START searches
30505
- // if opt.longest_match() == false
30506
- // forward, longest-match - used for all ANCHOR_BOTH searches,
30507
- // and the other two kinds if
30508
- // opt.longest_match() == true
30509
- // reverse, first-match - never used
30510
- // reverse, longest-match - used as second phase for unanchored searches
30511
- //
30512
- // The RE2 memory budget is statically divided between the two
30513
- // Progs and then the DFAs: two thirds to the forward Prog
30514
- // and one third to the reverse Prog. The forward Prog gives half
30515
- // of what it has left over to each of its DFAs. The reverse Prog
30516
- // gives it all to its longest-match DFA.
30517
- //
30518
- // Once a DFA fills its budget, it flushes its cache and starts over.
30519
- // If this happens too often, RE2 falls back on the NFA implementation.
30520
-
30521
- // For now, make the default budget something close to Code Search.
30522
- static const int kDefaultMaxMem = 8<<20;
30523
-
30524
- enum Encoding {
30525
- EncodingUTF8 = 1,
30526
- EncodingLatin1
30527
- };
30528
-
30529
- Options() :
30530
- encoding_(EncodingUTF8),
30531
- posix_syntax_(false),
30532
- longest_match_(false),
30533
- log_errors_(true),
30534
- max_mem_(kDefaultMaxMem),
30535
- literal_(false),
30536
- never_nl_(false),
30537
- dot_nl_(false),
30538
- never_capture_(false),
30539
- case_sensitive_(true),
30540
- perl_classes_(false),
30541
- word_boundary_(false),
30542
- one_line_(false) {
30543
- }
30544
-
30545
- /*implicit*/ Options(CannedOptions);
30546
-
30547
- Encoding encoding() const { return encoding_; }
30548
- void set_encoding(Encoding encoding) { encoding_ = encoding; }
30549
-
30550
- // Legacy interface to encoding.
30551
- // TODO(rsc): Remove once clients have been converted.
30552
- bool utf8() const { return encoding_ == EncodingUTF8; }
30553
- void set_utf8(bool b) {
30554
- if (b) {
30555
- encoding_ = EncodingUTF8;
30556
- } else {
30557
- encoding_ = EncodingLatin1;
30558
- }
30559
- }
30560
-
30561
- bool posix_syntax() const { return posix_syntax_; }
30562
- void set_posix_syntax(bool b) { posix_syntax_ = b; }
30563
-
30564
- bool longest_match() const { return longest_match_; }
30565
- void set_longest_match(bool b) { longest_match_ = b; }
30566
-
30567
- bool log_errors() const { return log_errors_; }
30568
- void set_log_errors(bool b) { log_errors_ = b; }
30569
-
30570
- int64_t max_mem() const { return max_mem_; }
30571
- void set_max_mem(int64_t m) { max_mem_ = m; }
30572
-
30573
- bool literal() const { return literal_; }
30574
- void set_literal(bool b) { literal_ = b; }
30575
-
30576
- bool never_nl() const { return never_nl_; }
30577
- void set_never_nl(bool b) { never_nl_ = b; }
30578
-
30579
- bool dot_nl() const { return dot_nl_; }
30580
- void set_dot_nl(bool b) { dot_nl_ = b; }
30581
-
30582
- bool never_capture() const { return never_capture_; }
30583
- void set_never_capture(bool b) { never_capture_ = b; }
30584
-
30585
- bool case_sensitive() const { return case_sensitive_; }
30586
- void set_case_sensitive(bool b) { case_sensitive_ = b; }
30587
-
30588
- bool perl_classes() const { return perl_classes_; }
30589
- void set_perl_classes(bool b) { perl_classes_ = b; }
30590
-
30591
- bool word_boundary() const { return word_boundary_; }
30592
- void set_word_boundary(bool b) { word_boundary_ = b; }
30593
-
30594
- bool one_line() const { return one_line_; }
30595
- void set_one_line(bool b) { one_line_ = b; }
30596
-
30597
- void Copy(const Options& src) {
30598
- *this = src;
30599
- }
30600
-
30601
- int ParseFlags() const;
30602
-
30603
- private:
30604
- Encoding encoding_;
30605
- bool posix_syntax_;
30606
- bool longest_match_;
30607
- bool log_errors_;
30608
- int64_t max_mem_;
30609
- bool literal_;
30610
- bool never_nl_;
30611
- bool dot_nl_;
30612
- bool never_capture_;
30613
- bool case_sensitive_;
30614
- bool perl_classes_;
30615
- bool word_boundary_;
30616
- bool one_line_;
30617
- };
30618
-
30619
- // Returns the options set in the constructor.
30620
- const Options& options() const { return options_; }
30621
-
30622
- // Argument converters; see below.
30623
- static inline Arg CRadix(short* x);
30624
- static inline Arg CRadix(unsigned short* x);
30625
- static inline Arg CRadix(int* x);
30626
- static inline Arg CRadix(unsigned int* x);
30627
- static inline Arg CRadix(long* x);
30628
- static inline Arg CRadix(unsigned long* x);
30629
- static inline Arg CRadix(long long* x);
30630
- static inline Arg CRadix(unsigned long long* x);
30631
-
30632
- static inline Arg Hex(short* x);
30633
- static inline Arg Hex(unsigned short* x);
30634
- static inline Arg Hex(int* x);
30635
- static inline Arg Hex(unsigned int* x);
30636
- static inline Arg Hex(long* x);
30637
- static inline Arg Hex(unsigned long* x);
30638
- static inline Arg Hex(long long* x);
30639
- static inline Arg Hex(unsigned long long* x);
30640
-
30641
- static inline Arg Octal(short* x);
30642
- static inline Arg Octal(unsigned short* x);
30643
- static inline Arg Octal(int* x);
30644
- static inline Arg Octal(unsigned int* x);
30645
- static inline Arg Octal(long* x);
30646
- static inline Arg Octal(unsigned long* x);
30647
- static inline Arg Octal(long long* x);
30648
- static inline Arg Octal(unsigned long long* x);
30649
-
30650
- private:
30651
- void Init(const StringPiece& pattern, const Options& options);
30652
-
30653
- bool DoMatch(const StringPiece& text,
30654
- Anchor re_anchor,
30655
- size_t* consumed,
30656
- const Arg* const args[],
30657
- int n) const;
30658
-
30659
- duckdb_re2::Prog* ReverseProg() const;
30660
-
30661
- std::string pattern_; // string regular expression
30662
- Options options_; // option flags
30663
- std::string prefix_; // required prefix (before regexp_)
30664
- bool prefix_foldcase_; // prefix is ASCII case-insensitive
30665
- duckdb_re2::Regexp* entire_regexp_; // parsed regular expression
30666
- duckdb_re2::Regexp* suffix_regexp_; // parsed regular expression, prefix removed
30667
- duckdb_re2::Prog* prog_; // compiled program for regexp
30668
- int num_captures_; // Number of capturing groups
30669
- bool is_one_pass_; // can use prog_->SearchOnePass?
30670
-
30671
- mutable duckdb_re2::Prog* rprog_; // reverse program for regexp
30672
- mutable const std::string* error_; // Error indicator
30673
- // (or points to empty string)
30674
- mutable ErrorCode error_code_; // Error code
30675
- mutable std::string error_arg_; // Fragment of regexp showing error
30676
-
30677
- // Map from capture names to indices
30678
- mutable const std::map<std::string, int>* named_groups_;
30679
-
30680
- // Map from capture indices to names
30681
- mutable const std::map<int, std::string>* group_names_;
30682
-
30683
- // Onces for lazy computations.
30684
- mutable std::once_flag rprog_once_;
30685
- mutable std::once_flag named_groups_once_;
30686
- mutable std::once_flag group_names_once_;
30687
-
30688
- RE2(const RE2&) = delete;
30689
- RE2& operator=(const RE2&) = delete;
30690
- };
30691
-
30692
- /***** Implementation details *****/
30693
-
30694
- // Hex/Octal/Binary?
30695
-
30696
- // Special class for parsing into objects that define a ParseFrom() method
30697
- template <class T>
30698
- class _RE2_MatchObject {
30699
- public:
30700
- static inline bool Parse(const char* str, size_t n, void* dest) {
30701
- if (dest == NULL) return true;
30702
- T* object = reinterpret_cast<T*>(dest);
30703
- return object->ParseFrom(str, n);
30704
- }
30705
- };
30706
-
30707
- class RE2::Arg {
30708
- public:
30709
- // Empty constructor so we can declare arrays of RE2::Arg
30710
- Arg();
30711
-
30712
- // Constructor specially designed for NULL arguments
30713
- Arg(void*);
30714
- Arg(std::nullptr_t);
30715
-
30716
- typedef bool (*Parser)(const char* str, size_t n, void* dest);
30717
-
30718
- // Type-specific parsers
30719
- #define MAKE_PARSER(type, name) \
30720
- Arg(type* p) : arg_(p), parser_(name) {} \
30721
- Arg(type* p, Parser parser) : arg_(p), parser_(parser) {}
30722
-
30723
- MAKE_PARSER(char, parse_char)
30724
- MAKE_PARSER(signed char, parse_schar)
30725
- MAKE_PARSER(unsigned char, parse_uchar)
30726
- MAKE_PARSER(float, parse_float)
30727
- MAKE_PARSER(double, parse_double)
30728
- MAKE_PARSER(std::string, parse_string)
30729
- MAKE_PARSER(StringPiece, parse_stringpiece)
30730
-
30731
- MAKE_PARSER(short, parse_short)
30732
- MAKE_PARSER(unsigned short, parse_ushort)
30733
- MAKE_PARSER(int, parse_int)
30734
- MAKE_PARSER(unsigned int, parse_uint)
30735
- MAKE_PARSER(long, parse_long)
30736
- MAKE_PARSER(unsigned long, parse_ulong)
30737
- MAKE_PARSER(long long, parse_longlong)
30738
- MAKE_PARSER(unsigned long long, parse_ulonglong)
30739
-
30740
- #undef MAKE_PARSER
30741
-
30742
- // Generic constructor templates
30743
- template <class T> Arg(T* p)
30744
- : arg_(p), parser_(_RE2_MatchObject<T>::Parse) { }
30745
- template <class T> Arg(T* p, Parser parser)
30746
- : arg_(p), parser_(parser) { }
30747
-
30748
- // Parse the data
30749
- bool Parse(const char* str, size_t n) const;
30750
-
30751
- private:
30752
- void* arg_;
30753
- Parser parser_;
30754
-
30755
- static bool parse_null (const char* str, size_t n, void* dest);
30756
- static bool parse_char (const char* str, size_t n, void* dest);
30757
- static bool parse_schar (const char* str, size_t n, void* dest);
30758
- static bool parse_uchar (const char* str, size_t n, void* dest);
30759
- static bool parse_float (const char* str, size_t n, void* dest);
30760
- static bool parse_double (const char* str, size_t n, void* dest);
30761
- static bool parse_string (const char* str, size_t n, void* dest);
30762
- static bool parse_stringpiece (const char* str, size_t n, void* dest);
30763
-
30764
- #define DECLARE_INTEGER_PARSER(name) \
30765
- private: \
30766
- static bool parse_##name(const char* str, size_t n, void* dest); \
30767
- static bool parse_##name##_radix(const char* str, size_t n, void* dest, \
30768
- int radix); \
30769
- \
30770
- public: \
30771
- static bool parse_##name##_hex(const char* str, size_t n, void* dest); \
30772
- static bool parse_##name##_octal(const char* str, size_t n, void* dest); \
30773
- static bool parse_##name##_cradix(const char* str, size_t n, void* dest);
30774
-
30775
- DECLARE_INTEGER_PARSER(short)
30776
- DECLARE_INTEGER_PARSER(ushort)
30777
- DECLARE_INTEGER_PARSER(int)
30778
- DECLARE_INTEGER_PARSER(uint)
30779
- DECLARE_INTEGER_PARSER(long)
30780
- DECLARE_INTEGER_PARSER(ulong)
30781
- DECLARE_INTEGER_PARSER(longlong)
30782
- DECLARE_INTEGER_PARSER(ulonglong)
30783
-
30784
- #undef DECLARE_INTEGER_PARSER
30785
-
30786
- };
30787
-
30788
- inline RE2::Arg::Arg() : arg_(NULL), parser_(parse_null) { }
30789
- inline RE2::Arg::Arg(void* p) : arg_(p), parser_(parse_null) { }
30790
- inline RE2::Arg::Arg(std::nullptr_t p) : arg_(p), parser_(parse_null) { }
30791
-
30792
- inline bool RE2::Arg::Parse(const char* str, size_t n) const {
30793
- return (*parser_)(str, n, arg_);
30794
- }
30795
-
30796
- // This part of the parser, appropriate only for ints, deals with bases
30797
- #define MAKE_INTEGER_PARSER(type, name) \
30798
- inline RE2::Arg RE2::Hex(type* ptr) { \
30799
- return RE2::Arg(ptr, RE2::Arg::parse_##name##_hex); \
30800
- } \
30801
- inline RE2::Arg RE2::Octal(type* ptr) { \
30802
- return RE2::Arg(ptr, RE2::Arg::parse_##name##_octal); \
30803
- } \
30804
- inline RE2::Arg RE2::CRadix(type* ptr) { \
30805
- return RE2::Arg(ptr, RE2::Arg::parse_##name##_cradix); \
30806
- }
30807
-
30808
- MAKE_INTEGER_PARSER(short, short)
30809
- MAKE_INTEGER_PARSER(unsigned short, ushort)
30810
- MAKE_INTEGER_PARSER(int, int)
30811
- MAKE_INTEGER_PARSER(unsigned int, uint)
30812
- MAKE_INTEGER_PARSER(long, long)
30813
- MAKE_INTEGER_PARSER(unsigned long, ulong)
30814
- MAKE_INTEGER_PARSER(long long, longlong)
30815
- MAKE_INTEGER_PARSER(unsigned long long, ulonglong)
30816
-
30817
- #undef MAKE_INTEGER_PARSER
30818
-
30819
- #ifndef SWIG
30820
-
30821
-
30822
- // Helper for writing global or static RE2s safely.
30823
- // Write
30824
- // static LazyRE2 re = {".*"};
30825
- // and then use *re instead of writing
30826
- // static RE2 re(".*");
30827
- // The former is more careful about multithreaded
30828
- // situations than the latter.
30829
- //
30830
- // N.B. This class never deletes the RE2 object that
30831
- // it constructs: that's a feature, so that it can be used
30832
- // for global and function static variables.
30833
- class LazyRE2 {
30834
- private:
30835
- struct NoArg {};
30836
-
30837
- public:
30838
- typedef RE2 element_type; // support std::pointer_traits
30839
-
30840
- // Constructor omitted to preserve braced initialization in C++98.
30841
-
30842
- // Pretend to be a pointer to Type (never NULL due to on-demand creation):
30843
- RE2& operator*() const { return *get(); }
30844
- RE2* operator->() const { return get(); }
30845
-
30846
- // Named accessor/initializer:
30847
- RE2* get() const {
30848
- std::call_once(once_, &LazyRE2::Init, this);
30849
- return ptr_;
30850
- }
30851
-
30852
- // All data fields must be public to support {"foo"} initialization.
30853
- const char* pattern_;
30854
- RE2::CannedOptions options_;
30855
- NoArg barrier_against_excess_initializers_;
30856
-
30857
- mutable RE2* ptr_;
30858
- mutable std::once_flag once_;
30859
-
30860
- private:
30861
- static void Init(const LazyRE2* lazy_re2) {
30862
- lazy_re2->ptr_ = new RE2(lazy_re2->pattern_, lazy_re2->options_);
30863
- }
30864
-
30865
- void operator=(const LazyRE2&); // disallowed
30866
- };
30867
- #endif // SWIG
30868
-
30869
- } // namespace duckdb_re2
30870
-
30871
- using duckdb_re2::RE2;
30872
- using duckdb_re2::LazyRE2;
30873
-
30874
- #endif // RE2_RE2_H_
30875
-
30876
-
30877
- // LICENSE_CHANGE_END
30878
-
30879
-
30880
29695
  namespace duckdb_re2 {
30881
29696
 
30882
29697
  Regex::Regex(const std::string &pattern, RegexOptions options) {
@@ -37881,7 +36696,7 @@ public:
37881
36696
 
37882
36697
 
37883
36698
  // LICENSE_CHANGE_BEGIN
37884
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
36699
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
37885
36700
  // See the end of this file for a list
37886
36701
 
37887
36702
 
@@ -61486,34 +60301,41 @@ static void ComputeWindowExpression(BoundWindowExpression *wexpr, ChunkCollectio
61486
60301
  }
61487
60302
  case ExpressionType::WINDOW_NTILE: {
61488
60303
  D_ASSERT(payload_collection.ColumnCount() == 1);
61489
- auto n_param = GetCell<int64_t>(payload_collection, 0, row_idx);
61490
- // With thanks from SQLite's ntileValueFunc()
61491
- int64_t n_total = bounds.partition_end - bounds.partition_start;
61492
- if (n_param > n_total) {
61493
- // more groups allowed than we have values
61494
- // map every entry to a unique group
61495
- n_param = n_total;
61496
- }
61497
- int64_t n_size = (n_total / n_param);
61498
- // find the row idx within the group
61499
- D_ASSERT(row_idx >= bounds.partition_start);
61500
- int64_t adjusted_row_idx = row_idx - bounds.partition_start;
61501
- // now compute the ntile
61502
- int64_t n_large = n_total - n_param * n_size;
61503
- int64_t i_small = n_large * (n_size + 1);
61504
- int64_t result_ntile;
61505
-
61506
- D_ASSERT((n_large * (n_size + 1) + (n_param - n_large) * n_size) == n_total);
61507
-
61508
- if (adjusted_row_idx < i_small) {
61509
- result_ntile = 1 + adjusted_row_idx / (n_size + 1);
60304
+ if (CellIsNull(payload_collection, 0, row_idx)) {
60305
+ FlatVector::SetNull(result, output_offset, true);
61510
60306
  } else {
61511
- result_ntile = 1 + n_large + (adjusted_row_idx - i_small) / n_size;
60307
+ auto n_param = GetCell<int64_t>(payload_collection, 0, row_idx);
60308
+ if (n_param < 1) {
60309
+ throw InvalidInputException("Argument for ntile must be greater than zero");
60310
+ }
60311
+ // With thanks from SQLite's ntileValueFunc()
60312
+ int64_t n_total = bounds.partition_end - bounds.partition_start;
60313
+ if (n_param > n_total) {
60314
+ // more groups allowed than we have values
60315
+ // map every entry to a unique group
60316
+ n_param = n_total;
60317
+ }
60318
+ int64_t n_size = (n_total / n_param);
60319
+ // find the row idx within the group
60320
+ D_ASSERT(row_idx >= bounds.partition_start);
60321
+ int64_t adjusted_row_idx = row_idx - bounds.partition_start;
60322
+ // now compute the ntile
60323
+ int64_t n_large = n_total - n_param * n_size;
60324
+ int64_t i_small = n_large * (n_size + 1);
60325
+ int64_t result_ntile;
60326
+
60327
+ D_ASSERT((n_large * (n_size + 1) + (n_param - n_large) * n_size) == n_total);
60328
+
60329
+ if (adjusted_row_idx < i_small) {
60330
+ result_ntile = 1 + adjusted_row_idx / (n_size + 1);
60331
+ } else {
60332
+ result_ntile = 1 + n_large + (adjusted_row_idx - i_small) / n_size;
60333
+ }
60334
+ // result has to be between [1, NTILE]
60335
+ D_ASSERT(result_ntile >= 1 && result_ntile <= n_param);
60336
+ auto rdata = FlatVector::GetData<int64_t>(result);
60337
+ rdata[output_offset] = result_ntile;
61512
60338
  }
61513
- // result has to be between [1, NTILE]
61514
- D_ASSERT(result_ntile >= 1 && result_ntile <= n_param);
61515
- auto rdata = FlatVector::GetData<int64_t>(result);
61516
- rdata[output_offset] = result_ntile;
61517
60339
  break;
61518
60340
  }
61519
60341
  case ExpressionType::WINDOW_LEAD:
@@ -107347,6 +106169,9 @@ struct BaseCSVData : public TableFunctionData {
107347
106169
  vector<string> files;
107348
106170
  //! The CSV reader options
107349
106171
  BufferedCSVReaderOptions options;
106172
+ //! Offsets for generated columns
106173
+ idx_t filename_col_idx;
106174
+ idx_t hive_partition_col_idx;
107350
106175
 
107351
106176
  void Finalize();
107352
106177
  };
@@ -108543,6 +107368,7 @@ void BuiltinFunctions::RegisterTableFunctions() {
108543
107368
 
108544
107369
 
108545
107370
 
107371
+
108546
107372
  #include <limits>
108547
107373
 
108548
107374
  namespace duckdb {
@@ -108591,6 +107417,8 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctio
108591
107417
  options.normalize_names = BooleanValue::Get(kv.second);
108592
107418
  } else if (loption == "filename") {
108593
107419
  options.include_file_name = BooleanValue::Get(kv.second);
107420
+ } else if (loption == "hive_partitioning") {
107421
+ options.include_parsed_hive_partitions = BooleanValue::Get(kv.second);
108594
107422
  } else {
108595
107423
  options.SetReadOption(loption, kv.second, names);
108596
107424
  }
@@ -108615,9 +107443,20 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctio
108615
107443
  D_ASSERT(return_types.size() == names.size());
108616
107444
  }
108617
107445
  if (result->options.include_file_name) {
107446
+ result->filename_col_idx = names.size();
108618
107447
  return_types.emplace_back(LogicalType::VARCHAR);
108619
107448
  names.emplace_back("filename");
108620
107449
  }
107450
+
107451
+ if (result->options.include_parsed_hive_partitions) {
107452
+ auto partitions = ParseHivePartitions(result->files[0]);
107453
+ result->hive_partition_col_idx = names.size();
107454
+ for (auto &part : partitions) {
107455
+ return_types.emplace_back(LogicalType::VARCHAR);
107456
+ names.emplace_back(part.first);
107457
+ }
107458
+ }
107459
+ result->options.names = names;
108621
107460
  return move(result);
108622
107461
  }
108623
107462
 
@@ -108668,11 +107507,34 @@ static void ReadCSVFunction(ClientContext &context, TableFunctionInput &data_p,
108668
107507
  break;
108669
107508
  }
108670
107509
  } while (true);
107510
+
108671
107511
  if (bind_data.options.include_file_name) {
108672
- auto &col = output.data.back();
107512
+ auto &col = output.data[bind_data.filename_col_idx];
108673
107513
  col.SetValue(0, Value(data.csv_reader->options.file_path));
108674
107514
  col.SetVectorType(VectorType::CONSTANT_VECTOR);
108675
107515
  }
107516
+ if (bind_data.options.include_parsed_hive_partitions) {
107517
+ auto partitions = ParseHivePartitions(data.csv_reader->options.file_path);
107518
+
107519
+ idx_t i = bind_data.hive_partition_col_idx;
107520
+
107521
+ if (partitions.size() != (bind_data.options.names.size() - bind_data.hive_partition_col_idx)) {
107522
+ throw IOException("Hive partition count mismatch, expected " +
107523
+ std::to_string(bind_data.options.names.size() - bind_data.hive_partition_col_idx) +
107524
+ " hive partitions, got " + std::to_string(partitions.size()) + "\n");
107525
+ }
107526
+
107527
+ for (auto &part : partitions) {
107528
+ if (bind_data.options.names[i] != part.first) {
107529
+ throw IOException("Hive partition names mismatch, expected '" + bind_data.options.names[i] +
107530
+ "' but found '" + part.first + "' for file '" + data.csv_reader->options.file_path +
107531
+ "'");
107532
+ }
107533
+ auto &col = output.data[i++];
107534
+ col.SetValue(0, Value(part.second));
107535
+ col.SetVectorType(VectorType::CONSTANT_VECTOR);
107536
+ }
107537
+ }
108676
107538
  }
108677
107539
 
108678
107540
  static void ReadCSVAddNamedParameters(TableFunction &table_function) {
@@ -108693,6 +107555,7 @@ static void ReadCSVAddNamedParameters(TableFunction &table_function) {
108693
107555
  table_function.named_parameters["normalize_names"] = LogicalType::BOOLEAN;
108694
107556
  table_function.named_parameters["compression"] = LogicalType::VARCHAR;
108695
107557
  table_function.named_parameters["filename"] = LogicalType::BOOLEAN;
107558
+ table_function.named_parameters["hive_partitioning"] = LogicalType::BOOLEAN;
108696
107559
  table_function.named_parameters["skip"] = LogicalType::BIGINT;
108697
107560
  table_function.named_parameters["max_line_size"] = LogicalType::VARCHAR;
108698
107561
  table_function.named_parameters["maximum_line_size"] = LogicalType::VARCHAR;
@@ -140064,7 +138927,7 @@ unique_ptr<Expression> MoveConstantsRule::Apply(LogicalOperator &op, vector<Expr
140064
138927
 
140065
138928
 
140066
138929
  // LICENSE_CHANGE_BEGIN
140067
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
138930
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
140068
138931
  // See the end of this file for a list
140069
138932
 
140070
138933
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -140163,7 +139026,7 @@ unique_ptr<Expression> MoveConstantsRule::Apply(LogicalOperator &op, vector<Expr
140163
139026
 
140164
139027
 
140165
139028
  // LICENSE_CHANGE_BEGIN
140166
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
139029
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
140167
139030
  // See the end of this file for a list
140168
139031
 
140169
139032
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -140207,7 +139070,7 @@ unique_ptr<Expression> MoveConstantsRule::Apply(LogicalOperator &op, vector<Expr
140207
139070
 
140208
139071
 
140209
139072
  // LICENSE_CHANGE_BEGIN
140210
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
139073
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
140211
139074
  // See the end of this file for a list
140212
139075
 
140213
139076
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -140332,7 +139195,7 @@ class LogMessageFatal : public LogMessage {
140332
139195
 
140333
139196
 
140334
139197
  // LICENSE_CHANGE_BEGIN
140335
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
139198
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
140336
139199
  // See the end of this file for a list
140337
139200
 
140338
139201
  /*
@@ -194771,7 +193634,7 @@ void UndoBuffer::Rollback() noexcept {
194771
193634
 
194772
193635
 
194773
193636
  // LICENSE_CHANGE_BEGIN
194774
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
193637
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
194775
193638
  // See the end of this file for a list
194776
193639
 
194777
193640
  // Formatting library for C++
@@ -194784,7 +193647,7 @@ void UndoBuffer::Rollback() noexcept {
194784
193647
 
194785
193648
 
194786
193649
  // LICENSE_CHANGE_BEGIN
194787
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
193650
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
194788
193651
  // See the end of this file for a list
194789
193652
 
194790
193653
  // Formatting library for C++ - implementation
@@ -196181,7 +195044,7 @@ FMT_END_NAMESPACE
196181
195044
 
196182
195045
 
196183
195046
  // LICENSE_CHANGE_BEGIN
196184
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
195047
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #4
196185
195048
  // See the end of this file for a list
196186
195049
 
196187
195050
  /**************************************************************************
@@ -203733,7 +202596,7 @@ mz_bool mz_zip_end(mz_zip_archive *pZip)
203733
202596
 
203734
202597
 
203735
202598
  // LICENSE_CHANGE_BEGIN
203736
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
202599
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
203737
202600
  // See the end of this file for a list
203738
202601
 
203739
202602
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -203765,7 +202628,7 @@ mz_bool mz_zip_end(mz_zip_archive *pZip)
203765
202628
 
203766
202629
 
203767
202630
  // LICENSE_CHANGE_BEGIN
203768
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
202631
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
203769
202632
  // See the end of this file for a list
203770
202633
 
203771
202634
  // Copyright 2018 The RE2 Authors. All Rights Reserved.
@@ -203830,7 +202693,7 @@ class PODArray {
203830
202693
 
203831
202694
 
203832
202695
  // LICENSE_CHANGE_BEGIN
203833
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
202696
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
203834
202697
  // See the end of this file for a list
203835
202698
 
203836
202699
  // Copyright 2007 The RE2 Authors. All Rights Reserved.
@@ -203857,7 +202720,7 @@ class PODArray {
203857
202720
 
203858
202721
 
203859
202722
  // LICENSE_CHANGE_BEGIN
203860
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
202723
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
203861
202724
  // See the end of this file for a list
203862
202725
 
203863
202726
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -204259,7 +203122,7 @@ template<typename Value> bool SparseArray<Value>::less(const IndexValue& a,
204259
203122
 
204260
203123
 
204261
203124
  // LICENSE_CHANGE_BEGIN
204262
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
203125
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
204263
203126
  // See the end of this file for a list
204264
203127
 
204265
203128
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -205301,7 +204164,7 @@ bool Prog::SearchBitState(const StringPiece& text,
205301
204164
 
205302
204165
 
205303
204166
  // LICENSE_CHANGE_BEGIN
205304
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
204167
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
205305
204168
  // See the end of this file for a list
205306
204169
 
205307
204170
  // Copyright 2007 The RE2 Authors. All Rights Reserved.
@@ -205328,7 +204191,7 @@ bool Prog::SearchBitState(const StringPiece& text,
205328
204191
 
205329
204192
 
205330
204193
  // LICENSE_CHANGE_BEGIN
205331
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
204194
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
205332
204195
  // See the end of this file for a list
205333
204196
 
205334
204197
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -206844,7 +205707,7 @@ Prog* Prog::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
206844
205707
 
206845
205708
 
206846
205709
  // LICENSE_CHANGE_BEGIN
206847
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
205710
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
206848
205711
  // See the end of this file for a list
206849
205712
 
206850
205713
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -206889,7 +205752,7 @@ Prog* Prog::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
206889
205752
 
206890
205753
 
206891
205754
  // LICENSE_CHANGE_BEGIN
206892
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
205755
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
206893
205756
  // See the end of this file for a list
206894
205757
 
206895
205758
  // Copyright 2016 The RE2 Authors. All Rights Reserved.
@@ -206940,7 +205803,7 @@ class HashMix {
206940
205803
 
206941
205804
 
206942
205805
  // LICENSE_CHANGE_BEGIN
206943
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
205806
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
206944
205807
  // See the end of this file for a list
206945
205808
 
206946
205809
  // Copyright 2007 The RE2 Authors. All Rights Reserved.
@@ -207084,7 +205947,7 @@ class WriterMutexLock {
207084
205947
 
207085
205948
 
207086
205949
  // LICENSE_CHANGE_BEGIN
207087
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
205950
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
207088
205951
  // See the end of this file for a list
207089
205952
 
207090
205953
  // Copyright 2016 The RE2 Authors. All Rights Reserved.
@@ -209160,7 +208023,7 @@ bool Prog::PossibleMatchRange(std::string* min, std::string* max, int maxlen) {
209160
208023
 
209161
208024
 
209162
208025
  // LICENSE_CHANGE_BEGIN
209163
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208026
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209164
208027
  // See the end of this file for a list
209165
208028
 
209166
208029
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -209170,7 +208033,7 @@ bool Prog::PossibleMatchRange(std::string* min, std::string* max, int maxlen) {
209170
208033
 
209171
208034
 
209172
208035
  // LICENSE_CHANGE_BEGIN
209173
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208036
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209174
208037
  // See the end of this file for a list
209175
208038
 
209176
208039
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -209296,7 +208159,7 @@ class FilteredRE2 {
209296
208159
 
209297
208160
 
209298
208161
  // LICENSE_CHANGE_BEGIN
209299
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208162
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209300
208163
  // See the end of this file for a list
209301
208164
 
209302
208165
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -209414,7 +208277,7 @@ class Prefilter {
209414
208277
 
209415
208278
 
209416
208279
  // LICENSE_CHANGE_BEGIN
209417
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208280
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209418
208281
  // See the end of this file for a list
209419
208282
 
209420
208283
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -209674,7 +208537,7 @@ void FilteredRE2::PrintPrefilter(int regexpid) {
209674
208537
 
209675
208538
 
209676
208539
  // LICENSE_CHANGE_BEGIN
209677
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208540
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209678
208541
  // See the end of this file for a list
209679
208542
 
209680
208543
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -209870,7 +208733,7 @@ static bool CanBeEmptyString(Regexp* re) {
209870
208733
 
209871
208734
 
209872
208735
  // LICENSE_CHANGE_BEGIN
209873
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
208736
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
209874
208737
  // See the end of this file for a list
209875
208738
 
209876
208739
  // Copyright 2006-2007 The RE2 Authors. All Rights Reserved.
@@ -210593,7 +209456,7 @@ void Prog::Fanout(SparseArray<int>* fanout) {
210593
209456
 
210594
209457
 
210595
209458
  // LICENSE_CHANGE_BEGIN
210596
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
209459
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
210597
209460
  // See the end of this file for a list
210598
209461
 
210599
209462
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -211177,7 +210040,7 @@ fail:
211177
210040
 
211178
210041
 
211179
210042
  // LICENSE_CHANGE_BEGIN
211180
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
210043
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
211181
210044
  // See the end of this file for a list
211182
210045
 
211183
210046
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -211217,7 +210080,7 @@ fail:
211217
210080
 
211218
210081
 
211219
210082
  // LICENSE_CHANGE_BEGIN
211220
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
210083
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
211221
210084
  // See the end of this file for a list
211222
210085
 
211223
210086
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -211305,7 +210168,7 @@ extern Rune ApplyFold(const CaseFold *f, Rune r);
211305
210168
 
211306
210169
 
211307
210170
  // LICENSE_CHANGE_BEGIN
211308
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
210171
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
211309
210172
  // See the end of this file for a list
211310
210173
 
211311
210174
  // Copyright 2008 The RE2 Authors. All Rights Reserved.
@@ -213813,7 +212676,7 @@ Regexp* Regexp::Parse(const StringPiece& s, ParseFlags global_flags,
213813
212676
 
213814
212677
 
213815
212678
  // LICENSE_CHANGE_BEGIN
213816
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
212679
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
213817
212680
  // See the end of this file for a list
213818
212681
 
213819
212682
  // GENERATED BY make_perl_groups.pl; DO NOT EDIT.
@@ -213941,7 +212804,7 @@ const int num_posix_groups = 28;
213941
212804
 
213942
212805
 
213943
212806
  // LICENSE_CHANGE_BEGIN
213944
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
212807
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
213945
212808
  // See the end of this file for a list
213946
212809
 
213947
212810
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -214642,7 +213505,7 @@ Prefilter* Prefilter::FromRE2(const RE2* re2) {
214642
213505
 
214643
213506
 
214644
213507
  // LICENSE_CHANGE_BEGIN
214645
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
213508
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
214646
213509
  // See the end of this file for a list
214647
213510
 
214648
213511
  // Copyright 2009 The RE2 Authors. All Rights Reserved.
@@ -215053,7 +213916,7 @@ std::string PrefilterTree::DebugNodeString(Prefilter* node) const {
215053
213916
 
215054
213917
 
215055
213918
  // LICENSE_CHANGE_BEGIN
215056
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
213919
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
215057
213920
  // See the end of this file for a list
215058
213921
 
215059
213922
  // Copyright 2007 The RE2 Authors. All Rights Reserved.
@@ -215077,7 +213940,7 @@ std::string PrefilterTree::DebugNodeString(Prefilter* node) const {
215077
213940
 
215078
213941
 
215079
213942
  // LICENSE_CHANGE_BEGIN
215080
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
213943
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
215081
213944
  // See the end of this file for a list
215082
213945
 
215083
213946
  // Copyright 2016 The RE2 Authors. All Rights Reserved.
@@ -216103,7 +214966,7 @@ void Prog::ComputeHints(std::vector<Inst>* flat, int begin, int end) {
216103
214966
 
216104
214967
 
216105
214968
  // LICENSE_CHANGE_BEGIN
216106
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
214969
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
216107
214970
  // See the end of this file for a list
216108
214971
 
216109
214972
  // Copyright 2003-2009 The RE2 Authors. All Rights Reserved.
@@ -217347,7 +216210,7 @@ DEFINE_INTEGER_PARSER(ulonglong)
217347
216210
 
217348
216211
 
217349
216212
  // LICENSE_CHANGE_BEGIN
217350
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
216213
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
217351
216214
  // See the end of this file for a list
217352
216215
 
217353
216216
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -218327,7 +217190,7 @@ CharClass* CharClassBuilder::GetCharClass() {
218327
217190
 
218328
217191
 
218329
217192
  // LICENSE_CHANGE_BEGIN
218330
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
217193
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
218331
217194
  // See the end of this file for a list
218332
217195
 
218333
217196
  // Copyright 2010 The RE2 Authors. All Rights Reserved.
@@ -218337,7 +217200,7 @@ CharClass* CharClassBuilder::GetCharClass() {
218337
217200
 
218338
217201
 
218339
217202
  // LICENSE_CHANGE_BEGIN
218340
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
217203
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
218341
217204
  // See the end of this file for a list
218342
217205
 
218343
217206
  // Copyright 2010 The RE2 Authors. All Rights Reserved.
@@ -218578,7 +217441,7 @@ bool RE2::Set::Match(const StringPiece& text, std::vector<int>* v,
218578
217441
 
218579
217442
 
218580
217443
  // LICENSE_CHANGE_BEGIN
218581
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
217444
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
218582
217445
  // See the end of this file for a list
218583
217446
 
218584
217447
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -219243,7 +218106,7 @@ Regexp* SimplifyWalker::SimplifyCharClass(Regexp* re) {
219243
218106
 
219244
218107
 
219245
218108
  // LICENSE_CHANGE_BEGIN
219246
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
218109
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
219247
218110
  // See the end of this file for a list
219248
218111
 
219249
218112
  // Copyright 2004 The RE2 Authors. All Rights Reserved.
@@ -219317,7 +218180,7 @@ std::ostream& operator<<(std::ostream& o, const StringPiece& p) {
219317
218180
 
219318
218181
 
219319
218182
  // LICENSE_CHANGE_BEGIN
219320
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
218183
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
219321
218184
  // See the end of this file for a list
219322
218185
 
219323
218186
  // Copyright 2006 The RE2 Authors. All Rights Reserved.
@@ -219675,7 +218538,7 @@ static void AppendCCRange(std::string* t, Rune lo, Rune hi) {
219675
218538
 
219676
218539
 
219677
218540
  // LICENSE_CHANGE_BEGIN
219678
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
218541
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
219679
218542
  // See the end of this file for a list
219680
218543
 
219681
218544
 
@@ -220251,7 +219114,7 @@ const int num_unicode_tolower = 194;
220251
219114
 
220252
219115
 
220253
219116
  // LICENSE_CHANGE_BEGIN
220254
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
219117
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
220255
219118
  // See the end of this file for a list
220256
219119
 
220257
219120
 
@@ -226319,7 +225182,7 @@ const int num_unicode_groups = 184;
226319
225182
 
226320
225183
 
226321
225184
  // LICENSE_CHANGE_BEGIN
226322
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
225185
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
226323
225186
  // See the end of this file for a list
226324
225187
 
226325
225188
  /*
@@ -226588,7 +225451,7 @@ utfrune(const char *s, Rune c)
226588
225451
 
226589
225452
 
226590
225453
  // LICENSE_CHANGE_BEGIN
226591
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #6
225454
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #1
226592
225455
  // See the end of this file for a list
226593
225456
 
226594
225457
  // Copyright 1999-2005 The RE2 Authors. All Rights Reserved.
@@ -230765,7 +229628,7 @@ void __fastpack64(const uint64_t *__restrict in, uint32_t *__restrict out) {
230765
229628
 
230766
229629
 
230767
229630
  // LICENSE_CHANGE_BEGIN
230768
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
229631
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
230769
229632
  // See the end of this file for a list
230770
229633
 
230771
229634
  /* -*- mode: c; c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil -*- */
@@ -230825,7 +229688,7 @@ namespace duckdb {
230825
229688
 
230826
229689
 
230827
229690
  // LICENSE_CHANGE_BEGIN
230828
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
229691
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
230829
229692
  // See the end of this file for a list
230830
229693
 
230831
229694
  static const utf8proc_uint16_t utf8proc_sequences[] = {
@@ -246479,7 +245342,7 @@ UTF8PROC_DLLEXPORT utf8proc_uint8_t *utf8proc_NFKC_Casefold(const utf8proc_uint8
246479
245342
 
246480
245343
 
246481
245344
  // LICENSE_CHANGE_BEGIN
246482
- // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #2
245345
+ // The following code up to LICENSE_CHANGE_END is subject to THIRD PARTY LICENSE #3
246483
245346
  // See the end of this file for a list
246484
245347
 
246485
245348
 
@@ -308599,6 +307462,38 @@ bool MbedTlsWrapper::IsValidSha256Signature(const std::string &pubkey, const std
308599
307462
 
308600
307463
  ### THIRD PARTY LICENSE #1 ###
308601
307464
 
307465
+ // Copyright (c) 2009 The RE2 Authors. All rights reserved.
307466
+ //
307467
+ // Redistribution and use in source and binary forms, with or without
307468
+ // modification, are permitted provided that the following conditions are
307469
+ // met:
307470
+ //
307471
+ // * Redistributions of source code must retain the above copyright
307472
+ // notice, this list of conditions and the following disclaimer.
307473
+ // * Redistributions in binary form must reproduce the above
307474
+ // copyright notice, this list of conditions and the following disclaimer
307475
+ // in the documentation and/or other materials provided with the
307476
+ // distribution.
307477
+ // * Neither the name of Google Inc. nor the names of its
307478
+ // contributors may be used to endorse or promote products derived from
307479
+ // this software without specific prior written permission.
307480
+ //
307481
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
307482
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
307483
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
307484
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
307485
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
307486
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
307487
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
307488
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
307489
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
307490
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
307491
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
307492
+
307493
+
307494
+
307495
+ ### THIRD PARTY LICENSE #2 ###
307496
+
308602
307497
  Copyright (c) 2012 - present, Victor Zverovich
308603
307498
 
308604
307499
  Permission is hereby granted, free of charge, to any person obtaining
@@ -308629,7 +307524,7 @@ without including the above copyright and permission notices.
308629
307524
 
308630
307525
 
308631
307526
 
308632
- ### THIRD PARTY LICENSE #2 ###
307527
+ ### THIRD PARTY LICENSE #3 ###
308633
307528
 
308634
307529
  ## utf8proc license ##
308635
307530
 
@@ -308727,7 +307622,7 @@ trademarks mentioned herein are the property of their respective owners.
308727
307622
 
308728
307623
 
308729
307624
 
308730
- ### THIRD PARTY LICENSE #3 ###
307625
+ ### THIRD PARTY LICENSE #4 ###
308731
307626
 
308732
307627
  Copyright 2013-2014 RAD Game Tools and Valve Software
308733
307628
  Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
@@ -308754,7 +307649,7 @@ THE SOFTWARE.
308754
307649
 
308755
307650
 
308756
307651
 
308757
- ### THIRD PARTY LICENSE #4 ###
307652
+ ### THIRD PARTY LICENSE #5 ###
308758
307653
 
308759
307654
  Permission is hereby granted, free of charge, to any
308760
307655
  person obtaining a copy of this software and associated
@@ -308782,7 +307677,7 @@ DEALINGS IN THE SOFTWARE.
308782
307677
 
308783
307678
 
308784
307679
 
308785
- ### THIRD PARTY LICENSE #5 ###
307680
+ ### THIRD PARTY LICENSE #6 ###
308786
307681
 
308787
307682
  Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors
308788
307683
 
@@ -308805,38 +307700,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
308805
307700
  SOFTWARE.
308806
307701
 
308807
307702
 
308808
- ### THIRD PARTY LICENSE #6 ###
308809
-
308810
- // Copyright (c) 2009 The RE2 Authors. All rights reserved.
308811
- //
308812
- // Redistribution and use in source and binary forms, with or without
308813
- // modification, are permitted provided that the following conditions are
308814
- // met:
308815
- //
308816
- // * Redistributions of source code must retain the above copyright
308817
- // notice, this list of conditions and the following disclaimer.
308818
- // * Redistributions in binary form must reproduce the above
308819
- // copyright notice, this list of conditions and the following disclaimer
308820
- // in the documentation and/or other materials provided with the
308821
- // distribution.
308822
- // * Neither the name of Google Inc. nor the names of its
308823
- // contributors may be used to endorse or promote products derived from
308824
- // this software without specific prior written permission.
308825
- //
308826
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
308827
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
308828
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
308829
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
308830
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
308831
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
308832
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
308833
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
308834
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
308835
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
308836
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
308837
-
308838
-
308839
-
308840
307703
  ### THIRD PARTY LICENSE #7 ###
308841
307704
 
308842
307705
  Copyright (c) 2012 Art.sy, Inc.