喝温开水有什么好处| 周杰伦为什么喜欢昆凌| 咳嗽吃什么水果好| 补铁的药什么时候吃最好| 院长是什么级别| 葫芦代表什么寓意| 为什么会得甲状腺| 公安厅长是什么级别| 仔细的什么| 焦虑症吃什么药好| 手脚发麻是什么原因引起的| 肺动脉增宽是什么意思| 第一次需要注意什么| 增致牛仔属于什么档次| 瘦脱相是什么意思| 流感吃什么药| 籍贯写什么| 3岁属什么生肖| 认栽是什么意思| 什么东西可以代替阴茎| 青瓜炒什么好吃| 潴是什么意思| 北上广是什么意思| 猪拉稀用什么药最快| 农历8月是什么月| 艾灸肚脐眼有什么好处| 同事过生日送什么礼物| 什么是毛周角化| 瓜皮是什么意思| 人工降雨的原理是什么| 小姑独处是什么意思| 酉是什么生肖| 藤椒是什么| 超现实主义是什么意思| 什么食物铅含量高| 排卵期在什么时候| 蠓虫叮咬后涂什么药膏| 血口喷人是什么意思| 左肾尿盐结晶是什么意思| 羊刃格是什么意思| 梦到男孩子是什么意思| beetle是什么车| 什么叫| 医联体是什么意思| 半夜腿抽筋是什么原因| 拔智齿后要注意什么| 九月十三号是什么星座| 风邪是什么| 经常饿肚子会导致什么后果| 男生什么情况想种草莓| 殊胜是什么意思| 贺喜是什么意思| 老头疼是什么原因导致的| 维生素k2是什么| 门庭若什么| 久而久之下一句是什么| 吃什么紧致皮肤抗衰老| 中性粒细胞偏低是什么原因| 心律不齐房颤吃什么药| 想成为什么样的人| 虎属什么五行| 缺如是什么意思| 夜间睡觉口干口苦是什么原因| 谷草转氨酶偏低是什么原因| kiki是什么意思| 什么什么情深| 胰腺炎可以吃什么| 现代是什么时候| 低血糖的症状是什么| 脚心起水泡是什么病症| lemaire是什么品牌| 湛蓝湛蓝的什么| 女人喝甘草水有什么好处| 乏力是什么原因| 阑尾粪石是什么意思| 海藻是什么植物| 注意地看的词语是什么| rock什么意思| 梦见小婴儿是什么意思| mlb中文叫什么| 浙江大学什么专业最好| 黄眉大王是什么妖怪| 调理是什么意思| 活检和穿刺有什么区别| 发烧时不宜喝什么饮料| 指甲竖纹是什么原因| 宫颈细胞学检查是什么意思| 腾空是什么意思| 女人肾阴虚吃什么药| 吃了安宫牛黄丸要禁忌什么不能吃| 胃糜烂可以吃什么水果| male是什么意思| 手淫过度会导致什么| 梦见抓鱼是什么预兆| 宫颈病变是什么意思| 贫血的人来姨妈会有什么症状| 关节间隙变窄什么意思| 小孩脾胃虚弱吃什么药| 什么吹风机好用| 胃疼应该吃什么药| 土地出让金什么意思| 疑问是什么意思| 朝奉是什么意思| cc是什么意思啊| 飒的意思是什么| 为什么姓张的不用说免贵| 脑疝是什么意思| 黑米和紫米有什么区别| 彻夜难眠什么意思| 苹果像什么| 强光斑是什么意思| 阿迪达斯和三叶草有什么区别| 日午念什么| r值是什么| 白话文是什么意思| 罗刹是什么意思| 急忙的反义词是什么| act是什么| 什么时机塞给医生红包| 狗狗拉稀吃什么药| 治骨质疏松打什么针| 扁桃体发炎吃什么食物好| 鹏字五行属什么| 小别胜新婚什么意思| 网调是什么意思| 用什么锅炒菜对人体健康更有益| 瞳字五行属什么| zzy是什么意思| 瑾字属于五行属什么| hvp是什么病毒| 复方甘草酸苷片治什么病| 卷饼卷什么菜好吃| 静五行属性是什么| 铜锣湾有什么好玩的| 头层牛皮除牛反绒是什么意思| 哈字五行属什么| 头疼按什么穴位| robam是什么牌子| 卧推100公斤什么水平| 待字闺中什么意思| 喝什么解暑| 古惑仔为什么不拍了| 什么布料| 嗔恨心是什么意思| 1994年属什么生肖| 电瓶车什么牌子好| 脂肪肝有什么危害| 上传下达是什么意思| 花枝鼠吃什么| 胃窦充血水肿意味着什么| ut是什么| 送钱包的寓意是什么| 中成药是什么意思| 空气刘海适合什么脸型| 血常规挂什么科| 低压高会引起什么后果| 狗肉炖什么好吃| 2017年属鸡的是什么命| 稻谷是什么| 宫颈口大是什么原因| 你喜欢我什么| 正月十五是什么节| 黎山老母什么级别神仙| 嫣字五行属什么| 例假血是黑色的是什么原因| 夏天喝盐水有什么好处| 为什么都说头胎很重要| 耳朵有回音是什么原因| 治疗脚气用什么药| 害羞的反义词是什么| 欧舒丹属于什么档次| 排便困难拉不出来是什么原因| 肺活量5000什么水平| 手术室为什么那么冷| 包皮手术后吃什么伤口愈合快| 牙龈紫黑是什么原因| 什么颜色不显黑| 血压高吃什么食物好| 北京大裤衩建筑叫什么| 乌龟喜欢吃什么| 长沙有什么特产| 什么叫疝气| 一什么十什么的成语| 吃凉的胃疼吃什么药| 肢解是什么意思| 恐龙灭绝的原因是什么| 夏天适合种什么蔬菜| 属虎的守护神是什么菩萨| 咖啡渣子有什么用途| 赛诺菲是什么药| 渣是什么意思| 垣什么意思| 大天真香是什么意思| 公务员干什么工作| 舌头有齿痕是什么原因| 自汗是什么意思| 尿糖是什么意思| 农历三月是什么月| 什么魏什么赵| 急性牙髓炎吃什么药| 胃不好喝什么茶好| 血液生化检查能看出什么病| 做t是什么意思| sjb是什么意思| 吃什么能排结石| 先天性心脏病是什么原因造成的| 刺身什么意思| 子宫肌瘤长在什么位置| 皮肤自愈能力差缺什么| 中国第一大姓是什么| 什么什么相接| 焦虑症有什么症状| 西米是什么做成的| 左眼跳什么右眼跳什么| 科目三考什么内容| 紫癜是什么病严重吗| 返利是什么意思| 百分比是什么意思| 夹腿有什么坏处吗| 牙齿为什么发黄| gfr医学上是什么意思| 什么牙膏最好| 豸是什么意思| 黄金糕是什么做的| 梦见打篮球是什么意思| 疝气手术是什么| 雪芽是什么| 安全三原则是指什么| 国手什么意思| 卡路里是什么| 下面长痘痘是什么原因| 安是什么意思| iss是什么意思| 下九流指的是什么| 夜宵吃什么好| 血压为什么高| 静脉曲张手术后吃什么| 8月8号什么星座| 钛合金是什么材料| 办理结婚证需要什么材料| 小孩小腿疼是什么原因引起的| 虎的本命佛是什么佛| 古尔丹代价是什么| 小脑萎缩有什么症状| 脚起皮干裂是什么原因| lime是什么颜色| 痔疮可以吃什么| 痔疮是什么样的| blackpink什么意思| 槟榔什么味道| 子宫附件是什么意思| 发霉是什么菌| 子宫肌瘤吃什么食物好| 商业保险报销需要什么材料| 温州冬至吃什么| 花枝是什么食材| 甲亢病是什么病| 蛇的天敌是什么动物| 得艾滋病有什么症状| 浙江大学校长什么级别| 螯合是什么意思| 咳嗽能吃什么| 脖子粗挂什么科| 二黑是什么意思| 百度
Skip to content

四川3月空气质量报告出炉 空气质量佳优良天数占9成

Background and Motivation??

百度 每年新发卒中人数和因卒中死亡人数以万计。

Most compute engines (e.g. Trino and Apache Spark) support views. A view is a logical table that can be referenced by future queries. Views do not contain any data. Instead, the query stored by the view is executed every time the view is referenced by another query.

Each compute engine stores the metadata of the view in its proprietary format in the metastore of choice. Thus, views created from one engine can not be read or altered easily from another engine even when engines share the metastore as well as the storage system. This document standardizes the view metadata for ease of sharing the views across engines.

Goals??

  • A common metadata format for view metadata, similar to how Iceberg supports a common table format for tables.

Overview??

View metadata storage mirrors how Iceberg table metadata is stored and retrieved. View metadata is maintained in metadata files. All changes to view state create a new view metadata file and completely replace the old metadata using an atomic swap. Like Iceberg tables, this atomic swap is delegated to the metastore that tracks tables and/or views by name. The view metadata file tracks the view schema, custom properties, current and past versions, as well as other metadata.

Each metadata file is self-sufficient. It contains the history of the last few versions of the view and can be used to roll back the view to a previous version.

Metadata Location??

An atomic swap of one view metadata file for another provides the basis for making atomic changes. Readers use the version of the view that was current when they loaded the view metadata and are not affected by changes until they refresh and pick up a new metadata location.

Writers create view metadata files optimistically, assuming that the current metadata location will not be changed before the writer's commit. Once a writer has created an update, it commits by swapping the view's metadata file pointer from the base location to the new location.

Specification??

Terms??

  • Schema -- Names and types of fields in a view.
  • Version -- The state of a view at some point in time.

View Metadata??

The view version metadata file has the following fields:

Requirement Field name Description
required view-uuid A UUID that identifies the view, generated when the view is created. Implementations must throw an exception if a view's UUID does not match the expected UUID after refreshing metadata
required format-version An integer version number for the view format; must be 1
required location The view's base location; used to create metadata file locations
required schemas A list of known schemas
required current-version-id ID of the current version of the view (version-id)
required versions A list of known versions of the view [1]
required version-log A list of version log entries with the timestamp and version-id for every change to current-version-id
optional properties A string to string map of view properties [2]

Notes:

  1. The number of versions to retain is controlled by the view property: version.history.num-entries.
  2. Properties are used for metadata such as comment and for settings that affect view maintenance. This is not intended to be used for arbitrary metadata.

Versions??

Each version in versions is a struct with the following fields:

Requirement Field name Description
required version-id ID for the version
required schema-id ID of the schema for the view version
required timestamp-ms Timestamp when the version was created (ms from epoch)
required summary A string to string map of summary metadata about the version
required representations A list of representations for the view definition
optional default-catalog Catalog name to use when a reference in the SELECT does not contain a catalog
required default-namespace Namespace to use when a reference in the SELECT is a single identifier

When default-catalog is null or not set, the catalog in which the view is stored must be used as the default catalog.

Summary??

Summary is a string to string map of metadata about a view version. Common metadata keys are documented here.

Requirement Key Value
optional engine-name Name of the engine that created the view version
optional engine-version Version of the engine that created the view version

Representations??

View definitions can be represented in multiple ways. Representations are documented ways to express a view definition.

A view version can have more than one representation. All representations for a version must express the same underlying definition. Engines are free to choose the representation to use.

View versions are immutable. Once a version is created, it cannot be changed. This means that representations for a version cannot be changed. If a view definition changes (or new representations are to be added), a new version must be created.

Each representation is an object with at least one common field, type, that is one of the following:

  • sql: a SQL SELECT statement that defines the view

Representations further define metadata for each type.

SQL representation??

The SQL representation stores the view definition as a SQL SELECT, with metadata such as the SQL dialect.

A view version can have multiple SQL representations of different dialects, but only one SQL representation per dialect.

Requirement Field name Type Description
required type string Must be sql
required sql string A SQL SELECT statement
required dialect string The dialect of the sql SELECT statement (e.g., "trino" or "spark")

For example:

USE prod.default
CREATE OR REPLACE VIEW event_agg (
    event_count COMMENT 'Count of events',
    event_date) AS
SELECT
    COUNT(1), CAST(event_ts AS DATE)
FROM events
GROUP BY 2

This create statement would produce the following sql representation metadata:

Field name Value
type "sql"
sql "SELECT\n COUNT(1), CAST(event_ts AS DATE)\nFROM events\nGROUP BY 2"
dialect "spark"

If a create statement does not include column names or comments before AS, the fields should be omitted.

The event_count (with the Count of events comment) and event_date field aliases must be part of the view version's schema.

Version log??

The version log tracks changes to the view's current version. This is the view's history and allows reconstructing what version of the view would have been used at some point in time.

Note that this is not the version's creation time, which is stored in each version's metadata. A version can appear multiple times in the version log, indicating that the view definition was rolled back.

Each entry in version-log is a struct with the following fields:

Requirement Field name Description
required timestamp-ms Timestamp when the view's current-version-id was updated (ms from epoch)
required version-id ID that current-version-id was set to

Appendix A: An Example??

The JSON metadata file format is described using an example below.

Imagine the following sequence of operations:

USE prod.default
CREATE OR REPLACE VIEW event_agg (
    event_count COMMENT 'Count of events',
    event_date)
COMMENT 'Daily event counts'
AS
SELECT
    COUNT(1), CAST(event_ts AS DATE)
FROM events
GROUP BY 2

The metadata JSON file created looks as follows.

The path is intentionally similar to the path for Iceberg tables and uses a metadata directory.

s3://bucket/warehouse/default.db/event_agg/metadata/00001-(uuid).metadata.json
{
  "view-uuid": "fa6506c3-7681-40c8-86dc-e36561f83385",
  "format-version" : 1,
  "location" : "s3://bucket/warehouse/default.db/event_agg",
  "current-version-id" : 1,
  "properties" : {
    "comment" : "Daily event counts"
  },
  "versions" : [ {
    "version-id" : 1,
    "timestamp-ms" : 1573518431292,
    "schema-id" : 1,
    "default-catalog" : "prod",
    "default-namespace" : [ "default" ],
    "summary" : {
      "engine-name" : "Spark",
      "engine-version" : "3.3.2"
    },
    "representations" : [ {
      "type" : "sql",
      "sql" : "SELECT\n    COUNT(1), CAST(event_ts AS DATE)\nFROM events\nGROUP BY 2",
      "dialect" : "spark"
    } ]
  } ],
  "schemas": [ {
    "schema-id": 1,
    "type" : "struct",
    "fields" : [ {
      "id" : 1,
      "name" : "event_count",
      "required" : false,
      "type" : "int",
      "doc" : "Count of events"
    }, {
      "id" : 2,
      "name" : "event_date",
      "required" : false,
      "type" : "date"
    } ]
  } ],
  "version-log" : [ {
    "timestamp-ms" : 1573518431292,
    "version-id" : 1
  } ]
}

Each change creates a new metadata JSON file. In the below example, the underlying SQL is modified by specifying the fully-qualified table name.

USE prod.other_db;
CREATE OR REPLACE VIEW default.event_agg (
    event_count COMMENT 'Count of events',
    event_date)
COMMENT 'Daily event counts'
AS
SELECT
    COUNT(1), CAST(event_ts AS DATE)
FROM prod.default.events
GROUP BY 2

Updating the view produces a new metadata file that completely replaces the old:

s3://bucket/warehouse/default.db/event_agg/metadata/00002-(uuid).metadata.json
{
  "view-uuid": "fa6506c3-7681-40c8-86dc-e36561f83385",
  "format-version" : 1,
  "location" : "s3://bucket/warehouse/default.db/event_agg",
  "current-version-id" : 2,
  "properties" : {
    "comment" : "Daily event counts"
  },
  "versions" : [ {
    "version-id" : 1,
    "timestamp-ms" : 1573518431292,
    "schema-id" : 1,
    "default-catalog" : "prod",
    "default-namespace" : [ "default" ],
    "summary" : {
      "engine-name" : "Spark",
      "engine-version" : "3.3.2"
    },
    "representations" : [ {
      "type" : "sql",
      "sql" : "SELECT\n    COUNT(1), CAST(event_ts AS DATE)\nFROM events\nGROUP BY 2",
      "dialect" : "spark"
    } ]
  }, {
    "version-id" : 2,
    "timestamp-ms" : 1573518981593,
    "schema-id" : 1,
    "default-catalog" : "prod",
    "default-namespace" : [ "default" ],
    "summary" : {
      "engine-name" : "Spark",
      "engine-version" : "3.3.2"
    },
    "representations" : [ {
      "type" : "sql",
      "sql" : "SELECT\n    COUNT(1), CAST(event_ts AS DATE)\nFROM prod.default.events\nGROUP BY 2",
      "dialect" : "spark"
    } ]
  } ],
  "schemas": [ {
    "schema-id": 1,
    "type" : "struct",
    "fields" : [ {
      "id" : 1,
      "name" : "event_count",
      "required" : false,
      "type" : "int",
      "doc" : "Count of events"
    }, {
      "id" : 2,
      "name" : "event_date",
      "required" : false,
      "type" : "date"
    } ]
  } ],
  "version-log" : [ {
    "timestamp-ms" : 1573518431292,
    "version-id" : 1
  }, {
    "timestamp-ms" : 1573518981593,
    "version-id" : 2
  } ]
}

三个大是什么字 染色体由什么和什么组成 维生素c有什么好处 谢娜人气为什么那么高 vintage是什么牌子
唐僧的袈裟叫什么 脸上长闭口是什么原因导致的 刺猬为什么叫白仙 齐活儿是什么意思 子是什么属性
尿道感染吃什么药好得快 中性粒细胞百分比高是什么原因 微波炉加热用什么容器 子宫息肉有什么症状 外阴瘙痒是什么情况
为什么会一直放屁 省军区司令员是什么级别 怀孕阴道有什么变化 蚕长什么样 可乐喝多了有什么危害
3个火读什么hcv8jop1ns2r.cn 蛇最怕什么东西bjcbxg.com 什么是交感神经hcv7jop9ns5r.cn 爷爷的爸爸叫什么bjcbxg.com 2000年是什么生肖hcv9jop8ns0r.cn
参军意愿选什么比较好hcv8jop9ns3r.cn 孕妇吃什么会流产hcv9jop2ns3r.cn 手脱皮用什么药膏hcv9jop5ns8r.cn 脑壳疼是什么原因hcv9jop4ns6r.cn 缠腰蛇是什么原因引起的adwl56.com
小孩荨麻疹吃什么药sscsqa.com 不解之谜的意思是什么hcv9jop4ns4r.cn 白血球低吃什么补得快hcv7jop9ns7r.cn 有什么植物hcv9jop6ns9r.cn 逆钟向转位什么意思hcv9jop5ns0r.cn
方法是什么意思hcv8jop8ns1r.cn 118代表什么意思hcv9jop5ns1r.cn 说话不清楚去医院挂什么科hcv8jop2ns9r.cn 胡子白了是什么原因hcv9jop6ns3r.cn 咳嗽有痰吃什么好的快hcv8jop2ns8r.cn
百度