我一直在尝试在另一个对象列内的对象列中添加一列,但无法这样做(对于嵌套对象)。
在对象内添加一列是直截了当的。如何在嵌套对象内添加一层深(或 N 层深)的列?
create table my_table (name string, age integer, book object as (isbn string));
示例行:{"age": 34, "book": {"isbn": "1"}, "name": "my_name"}
我试图在书对象列中添加对象列“作者”,但以下更改语句失败
alter table my_table add column person['book['author']'] object as (authorId as integer)
alter table my_table add column person['book']['author'] object as (authorId as integer)
alter table my_table add column person['book[author]'] object as (authorId as integer)
alter table my_table add column person[book['author']] object as (authorId as integer)
在嵌套对象中添加列的正确语法是什么?
亲切的问候。