snuyanzin commented on PR #23365:
URL: https://github.com/apache/flink/pull/23365#issuecomment-1708113247
One inconsistency I noticed between table and sql (probably minor):
e.g. there is a table with columns `a`, `b`, `c`
```sql
SELECT *, * FROM my_table;
```
results to
```
a b c a0 b0 c0
------- -------- -------- --------- --------- --------
```
in case of table api
```java
...
tableEnv.from("my_table").select(withAllColumns(), withAllColumns())
...
```
it just fails like
```
org.apache.flink.table.api.ValidationException: Ambiguous column name: a
at
org.apache.flink.table.operations.utils.ProjectionOperationFactory.lambda$validateAndGetUniqueNames$4(ProjectionOperationFactory.java:109)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at
org.apache.flink.table.operations.utils.ProjectionOperationFactory.validateAndGetUniqueNames(ProjectionOperationFactory.java:106)
at
org.apache.flink.table.operations.utils.ProjectionOperationFactory.create(ProjectionOperationFactory.java:74)
at
org.apache.flink.table.operations.utils.OperationTreeBuilder.projectInternal(OperationTreeBuilder.java:200)
at
org.apache.flink.table.operations.utils.OperationTreeBuilder.project(OperationTreeBuilder.java:174)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]