Closed groobyming closed 4 months ago
@nooberfsh Hi, nooberfsh It seems that we can use Row instead, but there are two issues:
Code:
#[tokio::test]
async fn main() {
let cli = ClientBuilder::new("admin", "localhost")
.port(8080)
.catalog("iceberg")
.build()
.unwrap();
let sql = "SELECT * FROM iceberg.test.test_table LIMIT 1";
let result = cli.get_all::<Row>(sql.to_string()).await.unwrap().into_vec();
println!("result size:{}", result.len());
println!("result is {:#?}", result)
}
Error:
prusto
does not support some trino types yet, e.g. timestamp with timezone, when prusto
see these unsupported types it just return EmptyData
. The right way I think it should return some error instead. You can cast
the unsupported column into supported column as a workaround.
It will lose the column names
You can use split to retain column names and types.
prusto
does not support some trino types yet, e.g. timestamp with timezone, whenprusto
see these unsupported types it just returnEmptyData
. The right way I think it should return some error instead. You cancast
the unsupported column into supported column as a workaround.It will lose the column names
You can use split to retain column names and types.
Thanks 😀
The
get_all
method requires that the generic typeT
must implement the Presto trait. This can be limiting; for example, when Trino queries table data in Hive, there might be tens of thousands of tables. Do I need to define tens of thousands of structs similar to the following first?