Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
267 commits
Select commit Hold shift + click to select a range
6bf88ef
fix failing slow tests
Tishj Aug 20, 2023
5adeb14
fix unused variable error
Tishj Aug 20, 2023
e2c5ff7
cascade the deletes in python test fixture
Tishj Aug 20, 2023
141dccf
skip the foreign key export test for now
Tishj Aug 21, 2023
dd2f99e
remove semicolon
Tishj Aug 21, 2023
bc82756
performance-move tidy fix
Tishj Aug 22, 2023
89d7eb7
remove some code that can never be hit
Tishj Aug 22, 2023
5fa7218
the dependencies of the CreateInfo were getting lost, wasn't getting …
Tishj Aug 22, 2023
87c6c6c
Merge branch 'main' into macro_function_dependencies
Tishj Aug 22, 2023
187e056
implement format (de) serialize for DependencyList
Tishj Aug 22, 2023
dc9dced
wrap the reference up in an object in the serialize/deserialize code
Tishj Aug 23, 2023
30c3712
fix test with recursive view
Tishj Aug 23, 2023
b8a97d3
another broken view test
Tishj Aug 23, 2023
03947de
identified problem, dependencies are not guaranteed to already be des…
Tishj Aug 23, 2023
f200206
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Aug 24, 2023
d666516
dont Lookup in deserialize
Tishj Aug 29, 2023
81e134d
separate into logical and physical dependencies, so we can delay the …
Tishj Aug 29, 2023
ee3f390
converting inside of SchemaCatalogEntry::Create...
Tishj Aug 29, 2023
1336a39
also TableCatalogEntry
Tishj Aug 29, 2023
b698e16
checkpoint manager
Tishj Aug 29, 2023
6b26e68
hate switch cases without a return
Tishj Aug 29, 2023
0498eb0
add temporary skip_reload so the test doesn't break
Tishj Aug 29, 2023
3458069
do not register table referenced in CREATE ENUM .. AS (<TABLE>) as a …
Tishj Aug 29, 2023
ba1185f
deal with foreign keys in ordering
Tishj Aug 29, 2023
26ff415
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Aug 30, 2023
dff2677
fix stupid bug
Tishj Aug 30, 2023
ae6c7c8
use the Catalog to perform the conversion from logical -> physical de…
Tishj Aug 30, 2023
b43ac1e
increase storage version
Tishj Aug 31, 2023
918ec75
use the Catalog everywhere to do the lookup, cross-catalog dependenci…
Tishj Aug 31, 2023
4760269
remove duplicate include
Tishj Aug 31, 2023
d311f0c
tidy fix
Tishj Aug 31, 2023
35ff944
tidy fix
Tishj Aug 31, 2023
de049cb
apply patch for sqlite_scanner
Tishj Aug 31, 2023
782c0b3
use case-insensitive compare
Tishj Sep 1, 2023
d49f8dc
remove comment
Tishj Sep 1, 2023
01f7d7d
fix some issues
Tishj Sep 1, 2023
0946c6e
re-add mode skip/unskip | attach doesn't play nicely with serialized …
Tishj Sep 1, 2023
994062c
clean up the old table before importing
Tishj Sep 1, 2023
5b72248
fix up broken test
Tishj Sep 1, 2023
899f519
remove client context, not needed as we always have a DuckCatalog here
Tishj Sep 1, 2023
0bf1336
remove duplicate includes
Tishj Sep 1, 2023
404e3da
Merge branch 'main' into macro_function_dependencies
Tishj Sep 2, 2023
79988b6
attach another db whos contents should not be exported/imported
Tishj Sep 2, 2023
3bff7cc
push sequences first, they can't have dependencies, but tables might …
Tishj Sep 2, 2023
132f83c
push the dependencies of sequences as well (can only be schema)
Tishj Sep 2, 2023
709d3e3
fix issue
Tishj Sep 2, 2023
aa9edff
separate out the ordering logic into a function
Tishj Sep 4, 2023
d82f3a8
make a copy of the dependencies/dependents map so we can alter it. Th…
Tishj Sep 4, 2023
c4a5e96
Merge branch 'main' into macro_function_dependencies
Tishj Sep 4, 2023
837566c
Merge branch 'main' into macro_function_dependencies
Tishj Sep 5, 2023
3b12f86
removing some unused code
Tishj Sep 5, 2023
73a28d2
uncovered files
Tishj Sep 5, 2023
6bc0c16
uncovered files
Tishj Sep 5, 2023
dfaceed
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 8, 2023
5e90eea
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 11, 2023
9984bbf
merged with main
Tishj Sep 11, 2023
3a340f4
add include for catalogtype, rename some wrongly named structs
Tishj Sep 11, 2023
5663efd
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 11, 2023
11830c9
adjust coverage, the catalog lookup code should be moved to CatalogEn…
Tishj Sep 11, 2023
4595659
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 16, 2023
8966240
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 16, 2023
ce8eacc
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 18, 2023
47176cc
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 21, 2023
6a20af8
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 21, 2023
4b39a1e
make LogicalDependencyList a default value
Tishj Sep 26, 2023
6219482
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 26, 2023
95bef0a
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Sep 27, 2023
a782f63
update serialization code
Tishj Sep 27, 2023
692daad
Merge remote-tracking branch 'upstream/main' into macro_function_depe…
Tishj Oct 2, 2023
38e6e33
Merge remote-tracking branch 'upstream/feature' into macro_function_d…
Tishj Oct 5, 2023
2236b89
make the == operator const, fixes compilation error
Tishj Oct 5, 2023
3c6925a
Merge remote-tracking branch 'upstream/feature' into macro_function_d…
Tishj Oct 19, 2023
b2bcd57
Merge remote-tracking branch 'upstream/feature' into macro_function_d…
Tishj Oct 20, 2023
bea69f7
get rid of the need for a ClientContext in every StandardEntry constr…
Tishj Oct 20, 2023
6f4e593
convert to PhysicalDependency before locking the catalog set, avoids …
Tishj Oct 20, 2023
b3ea558
dont lookup the catalog (so attach doesnt error), we already have the…
Tishj Oct 20, 2023
6454167
remove sqlite_scanner patch
Tishj Oct 20, 2023
d58e213
remove unused contexts
Tishj Oct 20, 2023
52d961f
remove unused catalog argument
Tishj Oct 20, 2023
4a19ff8
move the ConvertToPhysical to DependencyManager
Tishj Oct 26, 2023
378b196
Merge remote-tracking branch 'upstream/feature' into dependency_manag…
Tishj Oct 30, 2023
3f2eeff
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Oct 30, 2023
f3d2b23
Merge branch 'dependency_manager_logical_dependencies' into dependenc…
Tishj Oct 31, 2023
77231c0
working export order - if CatalogTransaction is provided
Tishj Nov 1, 2023
c5ace5e
only check FK info for tables
Tishj Nov 1, 2023
cd38d05
add extra handling to escape endless loop between owned sequence<->table
Tishj Nov 1, 2023
de1ee70
add debugging for dependencies/dependents in ExportOrder, add test wi…
Tishj Nov 1, 2023
270dca9
Merge remote-tracking branch 'upstream/feature' into dependency_manag…
Tishj Nov 2, 2023
046899a
fix up all issues, making all tests pass - not super happy with the o…
Tishj Nov 2, 2023
448ccbc
do not skip creating dependency sets for schemas
Tishj Nov 2, 2023
279e74b
filter out cross catalog dependencies, it's much more cumbersome to d…
Tishj Nov 2, 2023
ef5eeb8
fix compilation error
Tishj Nov 2, 2023
c35cab1
remove duplicate includes
Tishj Nov 3, 2023
8af7c7a
fix tidy issues
Tishj Nov 3, 2023
5cfd646
identified issue with the DependencyType - we don't preserve ownershi…
Tishj Nov 3, 2023
07278a2
replaced DependencyType with DependencyFlags - we can now represent b…
Tishj Nov 3, 2023
475d4ca
fix export of owned sequences
Tishj Nov 3, 2023
56a9558
disallow ALTER if we have an INDEX dependency for now
Tishj Nov 3, 2023
5d0da76
wip: attempted to add new dependencies created by ALTER statements
Tishj Nov 6, 2023
5d966d5
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 22, 2023
d0a45e7
fixed issues
Tishj Nov 22, 2023
7bc4318
WIP
Tishj Nov 23, 2023
2d8baa6
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 23, 2023
291f49c
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 23, 2023
9345cf6
fixed up GetExportOrder
Tishj Nov 23, 2023
840dc60
disallow alter with index depending on us for now
Tishj Nov 23, 2023
c605a6c
fix bind logical type
Tishj Nov 23, 2023
82bc108
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Nov 24, 2023
f95f7b6
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 24, 2023
87ca6ec
fix include
Tishj Nov 24, 2023
b5e8b20
duplicate includes
Tishj Nov 24, 2023
e7b2a0a
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 24, 2023
1bacc56
fix expected error
Tishj Nov 24, 2023
f1081ad
update storage_version.db
Tishj Nov 25, 2023
4ae264c
remove old file
Tishj Nov 25, 2023
8767c55
add missing include
Tishj Nov 25, 2023
afa334a
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 26, 2023
888fcb8
tidy issues
Tishj Nov 26, 2023
c3fddfc
dont skip internal schemas, missed 'information_schema' this way
Tishj Nov 26, 2023
fa25b6f
Merge branch 'dependency_set' into dependency_manager_powered_export
Tishj Nov 29, 2023
4938a85
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Dec 11, 2023
9a00035
remove redundant code
Tishj Dec 11, 2023
44d4553
remove PhysicalDependencyList in its entirety
Tishj Dec 11, 2023
550b0d5
remove included system header
Tishj Dec 11, 2023
1acc63d
remove mode skip, this should be fixed
Tishj Dec 11, 2023
dc6956d
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Dec 15, 2023
856c58b
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Jan 26, 2024
55d8e99
fix issue related to USER type in BindCreate
Tishj Jan 26, 2024
6708a60
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Feb 5, 2024
777bab8
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Feb 14, 2024
6717bf2
.
Tishj Feb 14, 2024
35a6494
fix up broken test
Tishj Feb 14, 2024
844e15d
fix copy from database, now uses the same export order as EXPORT DATA…
Tishj Feb 14, 2024
0ff15dd
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Feb 14, 2024
40dc16e
regenerate storage db, comments got inbetween so 107 is reserved now
Tishj Feb 14, 2024
788ae5b
no longer required
Tishj Feb 19, 2024
928d671
unused variable
Tishj Feb 19, 2024
c623623
reserve once
Tishj Feb 19, 2024
d9df9f1
add DUCKDB_API, just in case
Tishj Feb 19, 2024
4835161
use an unordered map of catalog sets instead, less fragile to future …
Tishj Feb 19, 2024
3384c7d
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Feb 23, 2024
f461019
remove the dependencies from AlterObject for now, unused. Not sure ho…
Tishj Feb 27, 2024
1730d7a
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Mar 1, 2024
9d4b1ed
add test for cross-catalog views
Tishj Mar 13, 2024
be12207
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Mar 13, 2024
d481d82
add a check that it also errors if names dont match
Tishj Mar 13, 2024
be71695
remove fixme in concurrent catalog usage that can not be done, there …
Tishj Mar 13, 2024
8260738
no need to create new methods for this
Tishj Mar 13, 2024
cdbf3c5
no need for this to be a pointer
Tishj Mar 13, 2024
184c47f
update enums
Tishj Mar 14, 2024
f752c10
dont generate enum utils for this
Tishj Mar 14, 2024
5d7e578
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Mar 14, 2024
e8a46bb
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Mar 20, 2024
cd3af36
revert change to how catalog sets are stored
Tishj Mar 23, 2024
c8491a4
remove unnecessary changes
Tishj Mar 23, 2024
aab530d
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Mar 24, 2024
c8a7278
Execute and capture results of substrait adbc proto blobs
pdet Mar 25, 2024
9d5b126
Store plan+length instead of query result
pdet Mar 26, 2024
01c0b93
defer allocation in read_json
Mar 27, 2024
ed83a32
remove redundant check
Mar 27, 2024
df6a7dc
[Untested] Move BindCreateIndex on the Binder
philippmd Mar 27, 2024
7d0e98c
fix(jdbc): 1-index bytes
Mause Mar 27, 2024
dc6f82b
Improve basetableref binding of CTEs
kryonix Mar 28, 2024
a051aca
Give preference to manually set filesystems
pdet Mar 28, 2024
0c4650d
Merge remote-tracking branch 'origin/main' into preference_fsspec
pdet Mar 28, 2024
d9cf407
comment should not be there
pdet Mar 28, 2024
4f64f3a
Merge branch 'main' into read_json_defer_allocation
Mar 28, 2024
b192f5c
also defer allocation of reconstruct buffers
Mar 28, 2024
3ec757d
enable default serialization for optional_idx, add option to skip def…
Maxxen Mar 28, 2024
1c0f08b
allocate within lock before claiming read
Mar 29, 2024
f47eae4
Merge branch 'main' into read_json_defer_allocation
Mar 29, 2024
80d13c8
clang-tidy: enable check to avoid const-cast and remove unnecessary u…
Mytherin Mar 29, 2024
e4973ff
check if last read requested before allocating/reading
Mar 29, 2024
6452dda
Use templates to avoid const_cast here
Mytherin Mar 29, 2024
af1ba84
Merge pull request #11400 from pdet/preference_fsspec
Mytherin Mar 29, 2024
8cd5b4f
Remove redundant default descriptions
szarnyasg Mar 29, 2024
0c7b3e4
Remove another const cast
Mytherin Mar 29, 2024
43677ea
Merge pull request #11405 from Maxxen/more-serialization
Mytherin Mar 29, 2024
e6a3be3
Keep the virtual method on DuckCatalog but call Binder
philippmd Mar 29, 2024
cba97f7
Give preference to quoted candidates
pdet Mar 29, 2024
0e1b7d4
Globals should be constant
Mytherin Mar 29, 2024
b7d63db
Need const_cast here
Mytherin Mar 29, 2024
8a52829
Merge branch 'constcast' into constglobals
Mytherin Mar 29, 2024
56c7db3
Format
Mytherin Mar 29, 2024
a5e9f57
CI: Also label PRs as 'stale' and close them when there's no activity
szarnyasg Mar 29, 2024
e6ea2f3
Merge pull request #11420 from szarnyasg/stale-prs
Mytherin Mar 29, 2024
66d37f5
Merge branch 'main' into read_json_defer_allocation
Mar 29, 2024
881973e
Compilation fixes
Mytherin Mar 29, 2024
bbe8aeb
make sure we auto-detect piped json
Mar 29, 2024
317f301
Merge pull request #11421 from Mause/bugfix/jdbc-one-index-bytes
Mytherin Mar 29, 2024
5d1baa5
Merge pull request #11415 from szarnyasg/remove-redundant-defaults
Mytherin Mar 29, 2024
62bd243
More tidy fixes
Mytherin Mar 29, 2024
e6929cf
Merge pull request #11414 from Mytherin/constcast
Mytherin Mar 29, 2024
738a939
Issue #11419: Quantile Order By
hawkfish Mar 29, 2024
935e97f
Convert casing after change to const
Mytherin Mar 29, 2024
14215f2
add readonly to duckdb_databases()
stephaniewang526 Mar 29, 2024
5d2698d
add test
stephaniewang526 Mar 29, 2024
72ba048
nit
stephaniewang526 Mar 29, 2024
023d78c
add ESCAPE '\' to filters to handle escape char passed by power query
Mar 30, 2024
69fcab5
add space
Mar 30, 2024
17b01af
Enable more cpp core guidelines
Mytherin Mar 30, 2024
903f14e
Merge pull request #11424 from Mytherin/constglobals
Mytherin Mar 30, 2024
04a6660
Merge pull request #11428 from hawkfish/quantile-orderby
Mytherin Mar 30, 2024
86e0f9e
Merge pull request #11418 from pdet/newline_csv
Mytherin Mar 30, 2024
e57cfff
cppcoreguidelines-rvalue-reference-param-not-moved
Mytherin Mar 30, 2024
92fc9b7
More clang-tidy fixes
Mytherin Mar 30, 2024
a5c8bcc
Fix #11393 - improve error message when trying to use a lateral join …
Mytherin Mar 30, 2024
cd79e64
address comment
stephaniewang526 Mar 30, 2024
8b81f21
clang-tidy: enable cppcoreguidelines-virtual-class-destructor
Mytherin Mar 30, 2024
afef088
Merge pull request #11437 from Mytherin/virtualdestructor
Mytherin Mar 31, 2024
224b3a2
Remove an unnecessary line from bind_insert.cpp
huachaohuang Mar 31, 2024
d09fc5d
Add support for ".edit" or "\e"
Mytherin Mar 31, 2024
472271c
Merge pull request #11436 from Mytherin/improvelateralerror
Mytherin Mar 31, 2024
f0c47c1
Merge pull request #11429 from motherduckdb/ddb-databases-readonly
Mytherin Mar 31, 2024
6380dd3
Replace DConstants::INVALID_INDEX with optional_idx in more places
Mytherin Mar 31, 2024
c32bd0b
Move FunctionBinder to optional_idx
Mytherin Mar 31, 2024
6073877
Load last history entry if we are typing "\e" on a blank line, and im…
Mytherin Apr 1, 2024
51082f1
Fix #11246: Use SetConsoleCP function to set input to UTF8 when reading
Mytherin Apr 1, 2024
6ced59e
Fix missing opener propagation
quentingodeau Apr 1, 2024
7d9235e
fix: fixed clang-cl build
bodand Apr 1, 2024
dd884e1
removing abort() because google refuses to use exceptions
hannes Apr 2, 2024
ea18a4d
Skip ccache for R.yml
carlopi Apr 1, 2024
a4be579
Merge pull request #11454 from quentingodeau/hotfix/opener-propagation
Mytherin Apr 2, 2024
5d53077
Merge pull request #11452 from Mytherin/windowsunicoderead
Mytherin Apr 2, 2024
df19560
Merge pull request #11447 from Mytherin/editshell
Mytherin Apr 2, 2024
6a6a102
Merge pull request #11456 from bodand/main
Mytherin Apr 2, 2024
f41419f
Merge pull request #11443 from huachaohuang/patch-1
Mytherin Apr 2, 2024
87c85df
Merge branch 'main' into read_json_defer_allocation
Apr 2, 2024
6a04ef7
forgot to add test file
Apr 2, 2024
28b19aa
throw if an invalid struct is encountered
Tishj Apr 2, 2024
dee1a57
More optional_idx
Mytherin Apr 2, 2024
2dcef55
Merge pull request #11459 from carlopi/skip_ccache_r
Mytherin Apr 2, 2024
13f2724
Merge pull request #11399 from kryonix/cte_fix
Mytherin Apr 2, 2024
acc5e79
Merge pull request #11402 from philippmd/bind-create-index-on-binder
Mytherin Apr 2, 2024
310e11f
Merge pull request #11358 from pdet/substrait_adbc
Mytherin Apr 2, 2024
2be8c43
Merge pull request #11458 from hannes/zapabortre2
Mytherin Apr 2, 2024
392ecc7
Merge pull request #11378 from lnkuiper/read_json_defer_allocation
Mytherin Apr 2, 2024
da90a8b
Reduce memory usage of DeleteInfo - rows are stored on a per-vector b…
Mytherin Apr 2, 2024
4f607b1
this same rule applies to UNION, we dont accept union types with no f…
Tishj Apr 2, 2024
b7211b1
Avoid storing rows in DeleteInfo when the deleted rows are consecutive
Mytherin Apr 2, 2024
3afa934
Merge pull request #11432 from guenp/guenp/add-escape-to-filter
Mytherin Apr 2, 2024
01a4e7f
Bump to post-portfile change for duckdb_azure
carlopi Apr 2, 2024
f13b9c0
Revert "Move BindCreateIndex from Catalog to Binder"
Mytherin Apr 2, 2024
02df5a5
Merge pull request #11476 from carlopi/fix_lzma
Mytherin Apr 2, 2024
4842b82
Merge pull request #11470 from Mytherin/deletememoryusage
Mytherin Apr 2, 2024
4da84dd
Merge pull request #11466 from Mytherin/moreoptionalidx
Mytherin Apr 2, 2024
0b4caed
Merge pull request #11478 from duckdb/revert-11402-bind-create-index-…
Mytherin Apr 3, 2024
5345a49
Merge pull request #11464 from Tishj/arrow_invalid_struct
Mytherin Apr 3, 2024
4b72786
Merge pull request #11408 from Tishj/logical_dependency
Mytherin Apr 3, 2024
19f3361
Merge remote-tracking branch 'upstream/main' into dependency_manager_…
Tishj Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: '-*,clang-diagnostic-*,bugprone-*,performance-*,google-explicit-constructor,google-build-using-namespace,google-runtime-int,misc-definitions-in-headers,modernize-use-nullptr,modernize-use-override,-bugprone-macro-parentheses,readability-braces-around-statements,-bugprone-branch-clone,readability-identifier-naming,hicpp-exception-baseclass,misc-throw-by-value-catch-by-reference,-bugprone-signed-char-misuse,-bugprone-misplaced-widening-cast,-bugprone-sizeof-expression,-bugprone-narrowing-conversions,-bugprone-easily-swappable-parameters,google-global-names-in-headers,llvm-header-guard,misc-definitions-in-headers,modernize-use-emplace,modernize-use-bool-literals,-performance-inefficient-string-concatenation,-performance-no-int-to-ptr,readability-container-size-empty,cppcoreguidelines-pro-type-cstyle-cast,-llvm-header-guard,-performance-enum-size'
Checks: '-*,clang-diagnostic-*,bugprone-*,performance-*,google-explicit-constructor,google-build-using-namespace,google-runtime-int,misc-definitions-in-headers,modernize-use-nullptr,modernize-use-override,-bugprone-macro-parentheses,readability-braces-around-statements,-bugprone-branch-clone,readability-identifier-naming,hicpp-exception-baseclass,misc-throw-by-value-catch-by-reference,-bugprone-signed-char-misuse,-bugprone-misplaced-widening-cast,-bugprone-sizeof-expression,-bugprone-narrowing-conversions,-bugprone-easily-swappable-parameters,google-global-names-in-headers,llvm-header-guard,misc-definitions-in-headers,modernize-use-emplace,modernize-use-bool-literals,-performance-inefficient-string-concatenation,-performance-no-int-to-ptr,readability-container-size-empty,cppcoreguidelines-pro-type-cstyle-cast,-llvm-header-guard,-performance-enum-size,cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-slicing,cppcoreguidelines-rvalue-reference-param-not-moved,cppcoreguidelines-virtual-class-destructor'
WarningsAsErrors: '*'
HeaderFilterRegex: 'src/include/duckdb/.*'
FormatStyle: none
Expand Down Expand Up @@ -47,4 +47,6 @@ CheckOptions:
value: lower_case
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::duckdb::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams
value: true

2 changes: 1 addition & 1 deletion .github/config/out_of_tree_extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (NOT MINGW)
duckdb_extension_load(azure
LOAD_TESTS
GIT_URL https://github.com/duckdb/duckdb_azure
GIT_TAG 86f39d76157de970d16d6d6537bc90c0ee1c7d35
GIT_TAG 6620a32454c1eb2e455104d87262061d2464aad0
APPLY_PATCHES
)
endif()
Expand Down
11 changes: 7 additions & 4 deletions .github/config/uncovered_files.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
catalog/catalog.cpp 49
catalog/catalog_entry.cpp 11
catalog/catalog_entry_retriever.cpp 14
catalog/catalog_entry/duck_schema_entry.cpp 10
catalog/catalog_entry/duck_table_entry.cpp 7
catalog/catalog_entry/index_catalog_entry.cpp 2
Expand All @@ -12,7 +13,8 @@ catalog/catalog_search_path.cpp 9
catalog/catalog_set.cpp 20
catalog/catalog_transaction.cpp 3
catalog/default/default_functions.cpp 9
catalog/dependency_manager.cpp 5
catalog/dependency_manager.cpp 6
catalog/dependency_list.cpp 4
common/allocator.cpp 20
common/arrow/arrow_appender.cpp 23
common/arrow/appender/map_data.cpp 7
Expand Down Expand Up @@ -213,7 +215,7 @@ execution/operator/csv_scanner/parallel_csv_reader.cpp 54
execution/operator/persistent/physical_batch_copy_to_file.cpp 7
execution/operator/persistent/physical_batch_insert.cpp 43
execution/operator/persistent/physical_copy_to_file.cpp 2
execution/operator/persistent/physical_export.cpp 2
execution/operator/persistent/physical_export.cpp 53
execution/operator/persistent/physical_fixed_batch_copy.cpp 7
execution/operator/persistent/physical_insert.cpp 5
execution/operator/projection/physical_projection.cpp 16
Expand Down Expand Up @@ -342,6 +344,7 @@ extension/parquet/parquet_timestamp.cpp 12
extension/parquet/parquet_writer.cpp 9
extension/parquet/zstd_file_system.cpp 6
include/duckdb/catalog/catalog.hpp 3
include/duckdb/catalog/dependency_manager.hpp 2
include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp 3
include/duckdb/catalog/catalog_set.hpp 2
include/duckdb/catalog/mapping_value.hpp 2
Expand Down Expand Up @@ -686,13 +689,13 @@ planner/binder/statement/bind_copy.cpp 3
planner/binder/statement/bind_create.cpp 21
planner/binder/statement/bind_create_table.cpp 2
planner/binder/statement/bind_drop.cpp 20
planner/binder/statement/bind_export.cpp 3
planner/binder/statement/bind_export.cpp 17
planner/binder/statement/bind_insert.cpp 19
planner/binder/statement/bind_logical_plan.cpp 21
planner/binder/statement/bind_pragma.cpp 3
planner/binder/statement/bind_update.cpp 4
planner/binder/statement/bind_vacuum.cpp 3
planner/binder/tableref/bind_basetableref.cpp 15
planner/binder/tableref/bind_basetableref.cpp 17
planner/binder/tableref/bind_joinref.cpp 3
planner/binder/tableref/bind_pivot.cpp 6
planner/binder/tableref/bind_table_function.cpp 18
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/IssuesCloseStale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ jobs:
uses: actions/stale@v8
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
stale-pr-message: 'This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
close-issue-message: 'This issue was closed because it has been stale for 30 days with no activity.'
close-pr-message: 'This pull request was closed because it has been stale for 30 days with no activity.'
days-before-stale: 90
days-before-close: 30
operations-per-run: 500
stale-issue-label: stale
stale-pr-label: stale
6 changes: 0 additions & 6 deletions .github/workflows/R.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ jobs:
update-rtools: true
rtools-version: '42' # linker bug in 43 ^^

- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb' }}

- uses: ./.github/actions/build_extensions
with:
deploy_as: windows_amd64_rtools
Expand Down
3 changes: 3 additions & 0 deletions data/csv/quoted_newline.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
col1
"cell with
newline"
8 changes: 8 additions & 0 deletions data/json/11407.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"k": "v"
},
{
"k": "v2"
}
]
41 changes: 17 additions & 24 deletions extension/httpfs/httpfs_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,41 @@ static void LoadInternal(DatabaseInstance &instance) {

// Global HTTP config
// Single timeout value is used for all 4 types of timeouts, we could split it into 4 if users need that
config.AddExtensionOption("http_timeout", "HTTP timeout read/write/connection/retry (default 30000ms)",
LogicalType::UBIGINT, Value(30000));
config.AddExtensionOption("http_retries", "HTTP retries on I/O error (default 3)", LogicalType::UBIGINT, Value(3));
config.AddExtensionOption("http_retry_wait_ms", "Time between retries (default 100ms)", LogicalType::UBIGINT,
Value(100));
config.AddExtensionOption("http_timeout", "HTTP timeout read/write/connection/retry", LogicalType::UBIGINT,
Value(30000));
config.AddExtensionOption("http_retries", "HTTP retries on I/O error", LogicalType::UBIGINT, Value(3));
config.AddExtensionOption("http_retry_wait_ms", "Time between retries", LogicalType::UBIGINT, Value(100));
config.AddExtensionOption("force_download", "Forces upfront download of file", LogicalType::BOOLEAN, Value(false));
// Reduces the number of requests made while waiting, for example retry_wait_ms of 50 and backoff factor of 2 will
// result in wait times of 0 50 100 200 400...etc.
config.AddExtensionOption("http_retry_backoff",
"Backoff factor for exponentially increasing retry wait time (default 4)",
config.AddExtensionOption("http_retry_backoff", "Backoff factor for exponentially increasing retry wait time",
LogicalType::FLOAT, Value(4));
config.AddExtensionOption(
"http_keep_alive",
"Keep alive connections. Setting this to false can help when running into connection failures",
LogicalType::BOOLEAN, Value(true));
config.AddExtensionOption("enable_server_cert_verification",
"Enable server side certificate verification, defaults to False.", LogicalType::BOOLEAN,
Value(false));
config.AddExtensionOption("ca_cert_file",
"Path to a custom certificate file for self-signed certificates. By default not set.",
config.AddExtensionOption("enable_server_cert_verification", "Enable server side certificate verification.",
LogicalType::BOOLEAN, Value(false));
config.AddExtensionOption("ca_cert_file", "Path to a custom certificate file for self-signed certificates.",
LogicalType::VARCHAR, Value(""));
// Global S3 config
config.AddExtensionOption("s3_region", "S3 Region (default us-east-1)", LogicalType::VARCHAR, Value("us-east-1"));
config.AddExtensionOption("s3_region", "S3 Region", LogicalType::VARCHAR, Value("us-east-1"));
config.AddExtensionOption("s3_access_key_id", "S3 Access Key ID", LogicalType::VARCHAR);
config.AddExtensionOption("s3_secret_access_key", "S3 Access Key", LogicalType::VARCHAR);
config.AddExtensionOption("s3_session_token", "S3 Session Token", LogicalType::VARCHAR);
config.AddExtensionOption("s3_endpoint", "S3 Endpoint (empty for default endpoint)", LogicalType::VARCHAR);
config.AddExtensionOption("s3_url_style", "S3 URL style ('vhost' (default) or 'path')", LogicalType::VARCHAR,
Value("vhost"));
config.AddExtensionOption("s3_use_ssl", "S3 use SSL (default true)", LogicalType::BOOLEAN, Value(true));
config.AddExtensionOption("s3_endpoint", "S3 Endpoint", LogicalType::VARCHAR);
config.AddExtensionOption("s3_url_style", "S3 URL style", LogicalType::VARCHAR, Value("vhost"));
config.AddExtensionOption("s3_use_ssl", "S3 use SSL", LogicalType::BOOLEAN, Value(true));
config.AddExtensionOption("s3_url_compatibility_mode", "Disable Globs and Query Parameters on S3 URLs",
LogicalType::BOOLEAN, Value(false));

// S3 Uploader config
config.AddExtensionOption("s3_uploader_max_filesize",
"S3 Uploader max filesize (between 50GB and 5TB, default 800GB)", LogicalType::VARCHAR,
"800GB");
config.AddExtensionOption("s3_uploader_max_parts_per_file",
"S3 Uploader max parts per file (between 1 and 10000, default 10000)",
config.AddExtensionOption("s3_uploader_max_filesize", "S3 Uploader max filesize (between 50GB and 5TB)",
LogicalType::VARCHAR, "800GB");
config.AddExtensionOption("s3_uploader_max_parts_per_file", "S3 Uploader max parts per file (between 1 and 10000)",
LogicalType::UBIGINT, Value(10000));
config.AddExtensionOption("s3_uploader_thread_limit", "S3 Uploader global thread limit (default 50)",
LogicalType::UBIGINT, Value(50));
config.AddExtensionOption("s3_uploader_thread_limit", "S3 Uploader global thread limit", LogicalType::UBIGINT,
Value(50));

auto provider = make_uniq<AWSEnvironmentCredentialsProvider>(config);
provider->SetAll();
Expand Down
8 changes: 8 additions & 0 deletions extension/json/buffered_json_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ bool JSONFileHandle::RequestedReadsComplete() {
return requested_reads == actual_reads;
}

bool JSONFileHandle::LastReadRequested() const {
return last_read_requested;
}

idx_t JSONFileHandle::FileSize() const {
return file_size;
}
Expand All @@ -56,6 +60,10 @@ bool JSONFileHandle::CanSeek() const {
return can_seek;
}

bool JSONFileHandle::IsPipe() const {
return file_handle->IsPipe();
}

FileHandle &JSONFileHandle::GetHandle() {
return *file_handle;
}
Expand Down
2 changes: 2 additions & 0 deletions extension/json/include/buffered_json_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ struct JSONFileHandle {

void Reset();
bool RequestedReadsComplete();
bool LastReadRequested() const;

idx_t FileSize() const;
idx_t Remaining() const;

bool CanSeek() const;
bool IsPipe() const;

FileHandle &GetHandle();

Expand Down
20 changes: 13 additions & 7 deletions extension/json/include/json_scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#pragma once

#include "buffered_json_reader.hpp"
#include "json_enums.hpp"
#include "duckdb/common/multi_file_reader.hpp"
#include "duckdb/common/mutex.hpp"
#include "duckdb/common/pair.hpp"
#include "duckdb/common/types/type_map.hpp"
#include "duckdb/function/scalar/strftime_format.hpp"
#include "duckdb/function/table_function.hpp"
#include "json_enums.hpp"
#include "json_transform.hpp"

namespace duckdb {
Expand Down Expand Up @@ -226,14 +226,20 @@ struct JSONScanLocalState {

private:
bool ReadNextBuffer(JSONScanGlobalState &gstate);
bool ReadNextBufferInternal(JSONScanGlobalState &gstate, optional_idx &buffer_index, bool &file_done);
bool ReadNextBufferSeek(JSONScanGlobalState &gstate, optional_idx &buffer_index, bool &file_done);
bool ReadNextBufferNoSeek(JSONScanGlobalState &gstate, optional_idx &buffer_index, bool &file_done);
bool ReadNextBufferInternal(JSONScanGlobalState &gstate, AllocatedData &buffer, optional_idx &buffer_index,
bool &file_done);
bool ReadNextBufferSeek(JSONScanGlobalState &gstate, AllocatedData &buffer, optional_idx &buffer_index,
bool &file_done);
bool ReadNextBufferNoSeek(JSONScanGlobalState &gstate, AllocatedData &buffer, optional_idx &buffer_index,
bool &file_done);
AllocatedData AllocateBuffer(JSONScanGlobalState &gstate);
data_ptr_t GetReconstructBuffer(JSONScanGlobalState &gstate);

void SkipOverArrayStart();

void ReadAndAutoDetect(JSONScanGlobalState &gstate, optional_idx &buffer_index);
bool ReconstructFirstObject();
void ParseNextChunk();
void ReadAndAutoDetect(JSONScanGlobalState &gstate, AllocatedData &buffer, optional_idx &buffer_index);
bool ReconstructFirstObject(JSONScanGlobalState &gstate);
void ParseNextChunk(JSONScanGlobalState &gstate);

void ParseJSON(char *const json_start, const idx_t json_size, const idx_t remaining);
void ThrowObjectSizeError(const idx_t object_size);
Expand Down
9 changes: 5 additions & 4 deletions extension/json/include/json_serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ struct JsonSerializer : Serializer {
void PushValue(yyjson_mut_val *val);

public:
explicit JsonSerializer(yyjson_mut_doc *doc, bool skip_if_null, bool skip_if_empty)
explicit JsonSerializer(yyjson_mut_doc *doc, bool skip_if_null, bool skip_if_empty, bool skip_if_default)
: doc(doc), stack({yyjson_mut_obj(doc)}), skip_if_null(skip_if_null), skip_if_empty(skip_if_empty) {
serialize_enum_as_string = true;
serialize_default_values = true;
serialize_default_values = !skip_if_default;
}

template <class T>
static yyjson_mut_val *Serialize(T &value, yyjson_mut_doc *doc, bool skip_if_null, bool skip_if_empty) {
JsonSerializer serializer(doc, skip_if_null, skip_if_empty);
static yyjson_mut_val *Serialize(T &value, yyjson_mut_doc *doc, bool skip_if_null, bool skip_if_empty,
bool skip_if_default) {
JsonSerializer serializer(doc, skip_if_null, skip_if_empty, skip_if_default);
value.Serialize(serializer);
return serializer.GetRootObject();
}
Expand Down
20 changes: 15 additions & 5 deletions extension/json/json_functions/json_serialize_plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ namespace duckdb {
struct JsonSerializePlanBindData : public FunctionData {
bool skip_if_null = false;
bool skip_if_empty = false;
bool skip_if_default = false;
bool format = false;
bool optimize = false;

JsonSerializePlanBindData(bool skip_if_null_p, bool skip_if_empty_p, bool format_p, bool optimize_p)
: skip_if_null(skip_if_null_p), skip_if_empty(skip_if_empty_p), format(format_p), optimize(optimize_p) {
JsonSerializePlanBindData(bool skip_if_null_p, bool skip_if_empty_p, bool skip_if_default_p, bool format_p,
bool optimize_p)
: skip_if_null(skip_if_null_p), skip_if_empty(skip_if_empty_p), skip_if_default(skip_if_default_p),
format(format_p), optimize(optimize_p) {
}

public:
unique_ptr<FunctionData> Copy() const override {
return make_uniq<JsonSerializePlanBindData>(skip_if_null, skip_if_empty, format, optimize);
return make_uniq<JsonSerializePlanBindData>(skip_if_null, skip_if_empty, skip_if_default, format, optimize);
}
bool Equals(const FunctionData &other_p) const override {
return true;
Expand All @@ -48,6 +51,7 @@ static unique_ptr<FunctionData> JsonSerializePlanBind(ClientContext &context, Sc
// Optional arguments
bool skip_if_null = false;
bool skip_if_empty = false;
bool skip_if_default = false;
bool format = false;
bool optimize = false;

Expand All @@ -69,6 +73,11 @@ static unique_ptr<FunctionData> JsonSerializePlanBind(ClientContext &context, Sc
throw BinderException("json_serialize_plan: 'skip_empty' argument must be a boolean");
}
skip_if_empty = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
} else if (arg->alias == "skip_default") {
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
throw BinderException("json_serialize_plan: 'skip_default' argument must be a boolean");
}
skip_if_default = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
} else if (arg->alias == "format") {
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
throw BinderException("json_serialize_plan: 'format' argument must be a boolean");
Expand All @@ -83,7 +92,7 @@ static unique_ptr<FunctionData> JsonSerializePlanBind(ClientContext &context, Sc
throw BinderException(StringUtil::Format("json_serialize_plan: Unknown argument '%s'", arg->alias.c_str()));
}
}
return make_uniq<JsonSerializePlanBindData>(skip_if_null, skip_if_empty, format, optimize);
return make_uniq<JsonSerializePlanBindData>(skip_if_null, skip_if_empty, skip_if_default, format, optimize);
}

static bool OperatorSupportsSerialization(LogicalOperator &op, string &operator_name) {
Expand Down Expand Up @@ -144,7 +153,8 @@ static void JsonSerializePlanFunction(DataChunk &args, ExpressionState &state, V
throw InvalidInputException("Operator '%s' does not support serialization", operator_name);
}

auto plan_json = JsonSerializer::Serialize(*plan, doc, info.skip_if_null, info.skip_if_empty);
auto plan_json =
JsonSerializer::Serialize(*plan, doc, info.skip_if_null, info.skip_if_empty, info.skip_if_default);
yyjson_mut_arr_append(plans_arr, plan_json);
}

Expand Down
Loading