Minor fixes by DinosL · Pull Request #23162 · duckdb/duckdb · GitHub
Skip to content

Minor fixes - #23162

Merged
Mytherin merged 5 commits into
duckdb:v1.5-variegatafrom
DinosL:minor_fixes
Jun 10, 2026
Merged

Mytherin merged 5 commits into
duckdb:v1.5-variegatafrom
DinosL:minor_fixes

Conversation

@DinosL

@DinosL DinosL commented Jun 9, 2026

Copy link
Copy Markdown
Member

Fixes: #23150 : json_transform truncating keys
Fixes: #23151 : Missing a check for failures when casting
Fixes: #23141 : All identifiers were rendered using WriteOptionallyQuoted except GROUP BY

@DinosL
DinosL marked this pull request as draft June 9, 2026 13:59
@DinosL
DinosL marked this pull request as ready for review June 9, 2026 13:59

@Tishj Tishj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, all of this looks correct to me 👍

@Mytherin
Mytherin merged commit 2a534ab into duckdb:v1.5-variegata Jun 10, 2026
180 of 187 checks passed
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Resolved (rerere-applied, matching the full-merge resolution):
    extension/json/json_functions/json_transform.cpp
    src/function/cast/variant/from_variant.cpp
    src/parser/tableref/pivotref.cpp
    test/sql/json/scalar/test_json_transform.test
    test/sql/json/test_json_serialize_sql.test
    test/sql/types/variant/try_cast_from_variant.test
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Fixes: duckdb#23150 : `json_transform`
truncating keys
Fixes: duckdb#23151 : Missing a check
for failures when casting
Fixes: duckdb#23141 : All identifiers
were rendered using `WriteOptionallyQuoted` except `GROUP BY`
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Brings this change from the v1.5-variegata release branch. It overlapped
with the main/v2.0 line; the conflicts were resolved as follows:

- `extension/json/json_functions/json_transform.cpp`: kept main's structure and incorporated the v1.5 change.
- `src/function/cast/variant/from_variant.cpp`: kept main's structure and incorporated the v1.5 change.
- `src/parser/tableref/pivotref.cpp`: kept main's structure and incorporated the v1.5 change.
- `test/sql/json/scalar/test_json_transform.test`: took v1.5-variegata's test changes.
- `test/sql/json/test_json_serialize_sql.test`: took v1.5-variegata's test changes.
- `test/sql/types/variant/try_cast_from_variant.test`: took v1.5-variegata's test changes.
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Brings this change from the v1.5-variegata release branch; it overlapped with
the main/v2.0 line and was resolved as follows:

- `extension/json/json_functions/json_transform.cpp`: kept main's structure, incorporating the v1.5 change.
- `src/function/cast/variant/from_variant.cpp`: kept main's structure, incorporating the v1.5 change.
- `src/parser/tableref/pivotref.cpp`: kept main's structure, incorporating the v1.5 change.
- `test/sql/json/scalar/test_json_transform.test`: took v1.5-variegata's test changes.
- `test/sql/json/test_json_serialize_sql.test`: took v1.5-variegata's test changes.
- `test/sql/types/variant/try_cast_from_variant.test`: took v1.5-variegata's test changes.
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Brings this change from the v1.5-variegata release branch; it overlapped with
the main/v2.0 line and was resolved as follows:

- `extension/json/json_functions/json_transform.cpp`: kept main's structure, incorporating the v1.5 change.
- `src/function/cast/variant/from_variant.cpp`: kept main's structure, incorporating the v1.5 change.
- `src/parser/tableref/pivotref.cpp`: serialized PIVOT GROUP BY entries via WriteOptionallyQuoted on the Identifier's raw name (groups[i].GetIdentifierName()), matching main's Identifier type.
- `test/sql/json/scalar/test_json_transform.test`: took v1.5-variegata's test changes.
- `test/sql/json/test_json_serialize_sql.test`: took v1.5-variegata's test changes.
- `test/sql/types/variant/try_cast_from_variant.test`: took v1.5-variegata's test changes.

Compile adaptation (applied at this origin so the increment builds): serialized PIVOT GROUP BY via WriteOptionallyQuoted(groups[i].GetIdentifierName()) for main's Identifier type.
krlmlr pushed a commit to krlmlr/duckdb that referenced this pull request Jun 21, 2026
Merge the v1.5-variegata release branch (323 commits since the 40721d5
merge-base) into the main/v2.0 line. ~55 files conflicted, almost entirely
because release-branch backports re-landed fixes that main had implemented
independently (often against a newer API), plus a few genuine feature/security
additions only on the release branch.

Conflict resolutions (grouped):

Already-in-main (took main, dropped the duplicate backport):
- external_file_cache refactor: main split the monolithic files into
  external_file_cache/; variegata's memleak/generation/disablement commits are
  the same upstream work (PR duckdb#22857, duckdb#22961) against the old layout -> dropped.
- autocomplete transform_expression.cpp: the empty-subscript guard was promoted
  into the core PEG parser (src/parser/peg/.../transform_expression.cpp) -> dropped.
- query_profiler.cpp: main re-architected the profiler; the null-deref fix
  variegata added to the old switch already exists in RenderProfilingNodeTree.
- list_select.cpp: the OOB child_idx guard already exists in main.
- bind_pivot.cpp duckdb#21931: main's restructured ExtractUnpivotEntries already
  guards against binding a non-existent expr.
- bind_operator_expression.cpp duckdb#23375: main reuses the current binder via an
  inside_try flag, so lambda bindings are already in scope inside TRY(...);
  variegata's TryOperatorBinder + explicit lambda propagation is unnecessary.
  (variegata's lambda-in-TRY tests are kept to prove this.)
- arrow_type_extension.cpp Bool8: main's VectorIterator/Writer already resolve
  dict/constant/sliced sources via ToUnifiedFormat.

Ported variegata's fix into main's newer API:
- geometry_stats.cpp: ported strip_geometry_cast (CRS-erasing cast look-through)
  to GetChildren()/GetReturnType()/GetValue(); CanPruneXY relax-pruning merged.
- alprd_scan.hpp / rle.cpp: ported variegata's out-of-bounds-read hardening
  (bounds checks + IOExceptions) onto main's GetDatabase()/GetBlockHandle()/
  GetDataMutable() API and member-pointer RLE scan state.
- variant_binary_decoder.cpp: kept variegata's bounds-checked
  (data, offset, data_size) decode signatures (the merged header), folded in
  main's TIMESTAMPTZNS handling and includes.
- multi_file_column_mapper.cpp duckdb#23354: kept main's static MapColumnMap
  (MultiFileLocalIndex) and added variegata's IsInvalidMapKeyDefault NULL-MAP-key
  guard.
- json: kept main's 3-field DefaultMacro layout + json_copy_strftime macros, but
  folded in variegata's "reject NULL json key" behavior (json_group_object macro
  + AddKeyValuePairs throw).

Took main's newer architecture (variegata's old-API version superseded):
- physical_table_scan.cpp: main's TableFunctionGetMetricsInput get_metrics.
- parquet_reader.hpp/.cpp: main's row_groups_read/skipped + prefetch cost model
  (subsumes variegata's row_groups_scanned); resolved a diff3-garbled hunk.
- parquet_writer.cpp: main's options/transform handling within variegata's
  MatchesTypes two-loop InitializePreprocessing structure.
- date_part.cpp: main's executor-count-removal kept; took variegata's 3-param
  PropagateSimpleDatePartStatistics<MIN,MAX,T> calls (matches merged definition).
- struct_data.cpp: variegata's AppendChild (adopted across the merged appenders).

Config / version data (union or main):
- version_map.json + regenerated storage_info: union of v1.5.4 (68/7) and
  v2.0.0 (69/8); latest/default follow v2.0.
- extension .cmake pins: kept main's v2.0-compatible tags + APPLY_PATCHES.
- force_storage.json: kept main's sections, added variegata's geometry_shred_more.
- NotifyExternalRepositories.yml / enable_verification_for_debug.json: honored
  main's deletion/restructuring.

Tests: kept variegata's lambda-in-TRY cases, PIVOT special-key serialization,
and PRAGMA enable_verification additions.

--- Compile & behaviour adaptations (so the merge builds and the full suite is green) ---

- Parquet metrics (duckdb#23140): exposed variegata's row-group scan metrics through
  main's TableFunctionGetMetricsInput API (single ParquetScanGetMetrics reading
  row_groups_read/skipped); dropped the duplicate old-API ParquetGetMetrics.
- geometry_stats.cpp (duckdb#23140): looked through CRS-erasing GEOMETRY casts via
  BoundCastExpression::Child() (the child member is private on main).
- geometry_parquet_pushdown.test (duckdb#23140): ported to main's profiler API
  (SET tracked_metrics with dotted names + JSON navigation), asserting the
  deterministic row_groups_scanned (total_row_groups_to_scan is a racy per-thread count).
- parquet_writer.cpp (duckdb#23234): bound the transform-data re-initialization to
  main's ParquetWriterOptions::sql_types (options.sql_types).
- Arrow AppendChild (duckdb#23190): AppendChild() takes a const Vector& and References
  it into a mutable local before the extension's duckdb_to_arrow cast, so the
  struct/array appenders can pass main's const children.
- pivotref.cpp (duckdb#23162): serialized PIVOT GROUP BY via
  WriteOptionallyQuoted(groups[i].GetIdentifierName()) for main's Identifier type.
- date_part.cpp (duckdb#23254): kept variegata's infinity-aware
  PropagateSimpleDatePartStatistics body but used main's authoritative
  second/minute/week/ms/us/ns upper bounds (59/53/...), not the leap-second 60/54.
- alprd_corrupted_dict_size.test (duckdb#23100): main's stricter exceptions_count guard
  fires first for the corrupt fixture, so the test now expects main's
  "ALPRD exceptions_count exceeds vector size" message (both guards kept).
kaka11chen pushed a commit to kaka11chen/astrovela_vane that referenced this pull request Aug 14, 2026
Fixes: duckdb/duckdb#23150 : `json_transform`
truncating keys
Fixes: duckdb/duckdb#23151 : Missing a check
for failures when casting
Fixes: duckdb/duckdb#23141 : All identifiers
were rendered using `WriteOptionallyQuoted` except `GROUP BY`

Upstream-Commit: duckdb/duckdb@2a534ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants