cdiscbuilder 1.1.8__py3-none-any.whl → 1.1.9__py3-none-any.whl

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.
@@ -63,7 +63,15 @@ class SQLDerivation(BaseDerivation):
63
63
  # We perform the cut logic by creating a temporary DataFrame with the series
64
64
  # and running the SQL generation logic on it.
65
65
  temp_col = "_val"
66
- temp_df = pl.DataFrame({temp_col: series})
66
+
67
+ # Cast to Float64 for numeric comparisons (handles string source data)
68
+ try:
69
+ numeric_series = series.cast(pl.Float64)
70
+ except Exception:
71
+ # If cast fails, try to keep as-is (maybe it's already numeric)
72
+ numeric_series = series
73
+
74
+ temp_df = pl.DataFrame({temp_col: numeric_series})
67
75
  source = temp_col
68
76
 
69
77
  # Build CASE expression (logic lifted from original _derive_cut)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdiscbuilder
3
- Version: 1.1.8
3
+ Version: 1.1.9
4
4
  Summary: A package to convert ODM XML to SDTM/ADaM Datasets
5
5
  Author-email: Ming-Chun Chen <hellomingchun@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -7,7 +7,7 @@ cdiscbuilder/adam/adam_derivation/engine.py,sha256=5Wk_tc3c6nRKBiiL5gE7YXxvdPgXV
7
7
  cdiscbuilder/adam/adam_derivation/derivations/__init__.py,sha256=iu7xzlQF_uK_5nwYw5ovEsBDNdaX0S8oVFYYxcxheTc,213
8
8
  cdiscbuilder/adam/adam_derivation/derivations/base.py,sha256=thbi0UD17Z8hUA5G6np_wWDcFth-UmoY7moS2KzvIps,1242
9
9
  cdiscbuilder/adam/adam_derivation/derivations/function_derivation.py,sha256=mPBet5JR10RS9euaS9ZLE1GCMRS3Grp9Gc3hdiQOVDI,7167
10
- cdiscbuilder/adam/adam_derivation/derivations/sql_derivation.py,sha256=7vdi7qisIN4U3dft9AoPYkpUDlikR9bWu5ziTSdSCx8,23476
10
+ cdiscbuilder/adam/adam_derivation/derivations/sql_derivation.py,sha256=hKkMq17CrIvJrCC1Zl3J8FzMLbXdKGV9rS0nvG-DtRs,23797
11
11
  cdiscbuilder/adam/adam_derivation/functions/__init__.py,sha256=Cv4pLpgHTr9i2zf7owbpZwMyxm8JLFmX4J31dvX0jYg,1773
12
12
  cdiscbuilder/adam/adam_derivation/functions/get_bmi.py,sha256=RR1lQpRSDO4cEkhxjnPutAy_xfVvfEwmhYR90XK2eMM,229
13
13
  cdiscbuilder/adam/adam_derivation/loaders/__init__.py,sha256=eUnUKzyahIaLIqjn39sYzXvzPpfabZoipkPdQ5mA9IE,116
@@ -49,9 +49,9 @@ cdiscbuilder/sdtm/loader/load.py,sha256=30x9fAEjnuRq313SRq9I7mBwrWl4sEhiKkmrr9x1
49
49
  cdiscbuilder/sdtm/loader/tests/__init__.py,sha256=ujCd31KMb52gvkWkVBBogLBda3aiRmbqS0nRS-yTnk0,69
50
50
  cdiscbuilder/sdtm/loader/tests/test_load.py,sha256=yrXFQlzH_EkN6HxJc7ItFie8xqwrs2XxwNu2wGaxjok,11180
51
51
  cdiscbuilder/tlf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
- cdiscbuilder-1.1.8.dist-info/licenses/LICENSE,sha256=Da4Pm8tEdB1ycKkAkF2EwfHd-8l0wrJ_uwejzfBRHFE,1092
53
- cdiscbuilder-1.1.8.dist-info/METADATA,sha256=QL7D5R3de5fOEIAAyXSlET9qmuZh4CboDPNr0rDSVzI,356
54
- cdiscbuilder-1.1.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
55
- cdiscbuilder-1.1.8.dist-info/entry_points.txt,sha256=KsuiJD4hsfjRqDkdvWgLFPeQCz7QBl73RA665BmF0Pw,53
56
- cdiscbuilder-1.1.8.dist-info/top_level.txt,sha256=3x5ENgnXBENgXKp5Zsht_4_OmA5wLVvDuk0UEkYOGNw,13
57
- cdiscbuilder-1.1.8.dist-info/RECORD,,
52
+ cdiscbuilder-1.1.9.dist-info/licenses/LICENSE,sha256=Da4Pm8tEdB1ycKkAkF2EwfHd-8l0wrJ_uwejzfBRHFE,1092
53
+ cdiscbuilder-1.1.9.dist-info/METADATA,sha256=Hdye5GJKylL-i3uxFbgAaBBKRafHf2hPPPuA_It-dzk,356
54
+ cdiscbuilder-1.1.9.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
55
+ cdiscbuilder-1.1.9.dist-info/entry_points.txt,sha256=KsuiJD4hsfjRqDkdvWgLFPeQCz7QBl73RA665BmF0Pw,53
56
+ cdiscbuilder-1.1.9.dist-info/top_level.txt,sha256=3x5ENgnXBENgXKp5Zsht_4_OmA5wLVvDuk0UEkYOGNw,13
57
+ cdiscbuilder-1.1.9.dist-info/RECORD,,