Skip to content

Add Float and Bool subtype support for Map OID#237

Open
Uladzimiro wants to merge 1 commit intoPNixx:masterfrom
Uladzimiro:fix-map-oid-float-bool-support
Open

Add Float and Bool subtype support for Map OID#237
Uladzimiro wants to merge 1 commit intoPNixx:masterfrom
Uladzimiro:fix-map-oid-float-bool-support

Conversation

@Uladzimiro
Copy link
Copy Markdown

@Uladzimiro Uladzimiro commented Mar 13, 2026

Problem

Map(String, Float32), Map(String, Float64), and Map(String, Bool) columns were not handled by the Map OID type. Float values were serialized with quotes in SQL (causing type errors), and Bool values were not cast correctly.

Solution

Add Float and Bool subtype detection in OID::Map#initialize, and handle them in deserialize and serialize.

Tests

Added specs covering:

  • Creating and reading Float32/Float64 map values
  • Creating and reading Bool map values with various input types (true/false, 1/0, "true"/"false")
  • insert_all with float and bool maps
  • Raw SQL insert to verify float values are not quoted
  • Direct deserialize calls with string inputs to verify type casting

  - Add Float32/Float64 subtype handling in Map OID
  - Add Bool subtype handling in Map OID
  - Fix Date deserialize crash when value already deserialized
  - Prevent TimeZoneConverter wrapping Map OID (fixes Hash crash)
  - Add comprehensive tests for new functionality

  Fixes serialization issues where Float/Bool values were quoted as strings,
  causing SYNTAX_ERROR in ClickHouse. Also fixes TypeError on Date re-parsing
  and 'Hash values are not supported' crash with Map(String, DateTime).
@Uladzimiro Uladzimiro force-pushed the fix-map-oid-float-bool-support branch from 257f3bf to 54aa0ee Compare March 13, 2026 22:52
@Uladzimiro Uladzimiro changed the title Fix Map OID support for Float and Bool subtypes Add Float and Bool subtype support for Map OID Mar 13, 2026
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.

1 participant