Iceberg Table: Insert into Struct Field with column variables is not working

Hi ,
1.Created a iceberg table with struct field:
CREATE TABLE t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”

(Feild struct<CH_1 DOUBLE,CH_2 DOUBLE>);
2. Inserted the data into the struct field with Json string literals. It works
insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
SELECT CONVERT_FROMJSON(‘{“CH_1”:4.5,“CH_2”:5.5}’);

  1. When used Named Struct to insert dint worked.
    insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
    select Named_struct(cast(4.5 as Double),cast(5.5 as Double));
    Error: NAMED_STRUCT does not support operand types (DOUBLE,DOUBLE)

  2. columns are not supported.
    insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
    SELECT CONVERT_FROMJSON(concat(‘{“CH_1”:’,cast(CH_1 as Double), ‘,“CH_2”:’,cast(CH_2 as Double),‘}’)) from
    t13345DataLake.“sandbox-dev”.test.data.“processed_default”;
    error:
    Using CONVERT_FROM(*, ‘JSON’) is only supported against string literals and direct table references of types VARCHAR and VARBINARY.

insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
select NAMED_STRUCT(cast(CH_1 as Double),cast(CH_2 as Double)) as field from t13345DataLake.“sandbox-dev”.test.data.“processed_default”;
error:
NAMED_STRUCT does not support operand types (DOUBLE,DOUBLE)

         Is there any way to insert table columns into struct fields. Is struct field is functional in dremio?.

dremio version: 24.3.7-202406042011090043-c57dfdf8

Thanks,
Pavan

[@Julian_Kiryakov] [@balaji.ramaswamy] please let me know any option available.

@pavankumargundeti Let me quickly try and example on my end and see if it works

Are you trying this via Dremio or a different tool?

Dermio UI only i am trying it.

@pavankumargundeti Let me check this internally as the command works fine on spark-sql

create TABLE test_Struct (c1 int, c2 VARCHAR(20), c3 struct<c4:int, c5:VARCHAR(20)>) using iceberg;
Time taken: 2.018 seconds

INSERT INTO test_Struct select 1,'Stefan Edberg', named_struct('c3',2,'c4','Ivan Lendl');
Time taken: 2.938 seconds

Thanks for the update. Is there any documentation on the insert ?. This looks different from what i got in help doc.

@pavankumargundeti This is a spark/Hive command. Let me see if this is supported in Dremio