Details
-
Bug
-
Status: Closed
-
Not a Priority
-
Resolution: Won't Fix
-
1.12.0
-
None
-
None
Description
When defining the following table in the sql-client-defaults.yaml file:
- name: sink
type: sink-table
connector:
type: filesystem
path: "gs://robert-playground/sqlout.csv"
format:
type: csv
fields:
- name: stringfield
type: VARCHAR
- name: customer
type: source-table
You get this error message
Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue. at org.apache.flink.table.client.SqlClient.main(SqlClient.java:213) Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Could not create execution context. at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:818) at org.apache.flink.table.client.gateway.local.LocalExecutor.openSession(LocalExecutor.java:230) at org.apache.flink.table.client.SqlClient.start(SqlClient.java:108) at org.apache.flink.table.client.SqlClient.main(SqlClient.java:201) Caused by: org.apache.flink.table.api.TableException: Property with key 'schema' could not be found. This is a bug because the validation logic should have checked that before. at org.apache.flink.table.descriptors.DescriptorProperties.lambda$exceptionSupplier$47(DescriptorProperties.java:1569) at java.util.Optional.orElseThrow(Optional.java:290) at org.apache.flink.table.descriptors.DescriptorProperties.getTableSchema(DescriptorProperties.java:695) at org.apache.flink.table.catalog.CatalogTableImpl.fromProperties(CatalogTableImpl.java:97) at org.apache.flink.table.client.gateway.local.ExecutionContext.createTableSink(ExecutionContext.java:397) at org.apache.flink.table.client.gateway.local.ExecutionContext.lambda$initializeCatalogs$8(ExecutionContext.java:580) at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeCatalogs(ExecutionContext.java:575) at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeTableEnvironment(ExecutionContext.java:512) at org.apache.flink.table.client.gateway.local.ExecutionContext.<init>(ExecutionContext.java:171) at org.apache.flink.table.client.gateway.local.ExecutionContext.<init>(ExecutionContext.java:124) at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:807) ... 3 more
As a user, I would expect a friendlier error message that explains what and where something is missing. It is also confusing that the exception says "This is a bug because the validation logic should have checked that before.".