ClickHouse/docs/zh/query_language/functions/ext_dict_functions.md
Ivan Blinkov 790704d081
Restore some old manual anchors in docs (#9803)
* Simplify 404 page

* add es array_functions.md

* restore some old manual anchors

* update sitemaps

* trigger checks

* restore more old manual anchors

* refactor test.md + temporary disable failure again

* fix mistype
2020-03-22 12:14:59 +03:00

1.7 KiB
Raw Blame History

字典函数

有关连接和配置外部词典的信息,请参阅外部词典

dictGetUInt8, dictGetUInt16, dictGetUInt32, dictGetUInt64

dictGetInt8, dictGetInt16, dictGetInt32, dictGetInt64

dictGetFloat32, dictGetFloat64

dictGetDate, dictGetDateTime

dictGetUUID

dictGetString

dictGetT('dict_name', 'attr_name', id)

  • 使用id键获取dict_name字典中attr_name属性的值。dict_nameattr_name是常量字符串。id必须是UInt64。 如果字典中没有id键,则返回字典描述中指定的默认值。

dictGetTOrDefault

dictGetTOrDefault('dict_name', 'attr_name', id, default)

dictGetT函数相同,但默认值取自函数的最后一个参数。

dictIsIn

dictIsIn ('dict_name', child_id, ancestor_id)

  • 对于dict_name分层字典查找child_id键是否位于ancestor_id或匹配ancestor_id。返回UInt8。

dictGetHierarchy

dictGetHierarchy('dict_name', id)

  • 对于dict_name分层字典返回从id开始并沿父元素链继续的字典键数组。返回ArrayUInt64

dictHas

dictHas('dict_name', id)

  • 检查字典是否存在指定的id。如果不存在则返回0;如果存在则返回1。

来源文章