Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf serialisation is missing for GetIndexedFieldExpr #5323

Closed
ahmedriza opened this issue Feb 17, 2023 · 0 comments · Fixed by #5324
Closed

Protobuf serialisation is missing for GetIndexedFieldExpr #5323

ahmedriza opened this issue Feb 17, 2023 · 0 comments · Fixed by #5324
Labels
bug Something isn't working

Comments

@ahmedriza
Copy link
Contributor

Describe the bug
The protobuf serialisation is missing for GetIndexedFieldExpr which causes ballista to fail to execute SQL queries that index fields of nested types.

To Reproduce

Use the attached parquet file:

and run the following code

#[tokio::test]
async fn test_ballista_sql() {
    let config = BallistaConfig::builder().build().unwrap();
    let ctx = BallistaContext::standalone(&config, 10).await.unwrap();
    ctx.register_parquet("t", "list.parquet", ParquetReadOptions::default()).await.unwrap();
    let df = ctx.sql("select id, a[1], a[2], a[3] from t").await.unwrap();
    df.show().await.unwrap();
}

This will fail with

Error: Arrow error: External error: Execution error: Job F5d0DAb failed: Error planning job F5d0DAb: DataFusionError(Internal("physical_plan::to_proto() unsupported expression GetIndexedFieldExpr { arg: Column { name: \"a\", index: 0 }, key: Int64(1) }"))

Expected behavior

Should produce the following output:

+----+--------+--------+--------+
| id | t.a[1] | t.a[2] | t.a[3] |
+----+--------+--------+--------+
| 1  | 1.71   | 2.71   | 3.71   |
+----+--------+--------+--------+

Additional context
This is due to the missing protobuf serialisations for GetIndexedFieldExpr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant