eldenmoon commented on code in PR #3669:
URL: https://github.com/apache/doris-website/pull/3669#discussion_r3263293556


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md:
##########
@@ -578,3 +578,5 @@ DESCRIBE ${table_name} PARTITION ($partition_name);
    - 没有区别,两者等价。
 2. 为什么我的查询/索引没有生效?
    - 请检查是否对路径做了正确的 CAST、是否因为类型冲突被提升为 JSONB、或是否误以为给 VARIANT“整体”建的索引可用于子列。
+3. 为什么 DECIMAL 写入 VARIANT 列时出现小数位/精度丢失?
+   - 写入 VARIANT 列时,在推断子列类型时不会推断为 DECIMAL,数值会以 DOUBLE 存储,因而可能丢失末位小数。即使通过 Schema 
Template 将子路径显式声明为 DECIMAL(例如 `pm25 VARIANT<'xxx': DECIMAL(6, 2)>`),写入路径也会先解析为 
DOUBLE 再转换为 DECIMAL,仍不能完全保证精度。

Review Comment:
   补充一下建议用"number" : "99999.99999999999" 这样的形式保证精度不丢失



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to