Binding a Decimal infinity to a compiled statement raises OverflowError
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 drivine/cypher/sql/parameters.py 中的 _jsonable(第 110 行)开始;issue 指出 Decimal 值在这里转换。比较对 Decimal("NaN") 和 float 无穷大的处理方式,然后追踪编译后语句的参数传递路径,直到到达此函数。完成标准是 Decimal 正无穷和负无穷都能绑定为 float 无穷大,且不会引发 OverflowError;issue 没有指定测试文件,因此请找到或添加覆盖此路径的测试。
由索引模型根据 Issue 内容生成。
描述
A parameter bound as Decimal("Infinity") or Decimal("-Infinity") to a statement compiled to SQL raises OverflowError: cannot convert Infinity to integer from drivine/cypher/sql/parameters.py:110 (_jsonable). This happens for any statement, before the compiler reads what the parameter is for.
The review of #120 found it with round(1234.5, $p) and p = Decimal("-Infinity"). It predates that change.
A float infinity is read as one. A Decimal infinity should be too: read it as a float infinity, as Decimal("NaN") is read as NaN, rather than converted to an integer.
drivine4j and drivine have no Decimal parameter type, so no port is needed.
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- 平均合并
- 1 小时 16 分钟
- 30 天内合并 PR
- 74
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
liberation-data/drivine-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
liberation-data/drivine-python#152 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
liberation-data/drivine-python#150 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/drivine-python#138 ·
维护者通常 1 天内回复
-
Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is null未关闭
难度 4/5 3-5 天 新手友好度 55/100
liberation-data/drivine-python#159 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 38/100
liberation-data/drivine-python#158 ·
维护者通常 1 天内回复
查看 liberation-data/drivine-python 的全部 Issue
相似的 Issue
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog check可能已有人在做 @ocelotl 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
open-telemetry/opentelemetry-python#5825 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
cuga-project/cuga-agent#1020 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
microsoft/playwright#43640 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
stac-utils/stac-fastapi-elasticsearch-opensearch#965 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复