[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-28 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-176170046 Yes, I wanted to start a discussion about sticking with Scala as well. I'll open a PR for FLINK-3225 very soon and can take care of translating the nodes to Scala an

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-28 Thread twalthr
Github user twalthr commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-176150700 When I wrote my SQL prototype I also thought about using Java because Calcite is written in Java, but since it is easy to use Java classes from Scala and Scala has a muc

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-28 Thread ChengXiangLi
Github user ChengXiangLi commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-176144759 I didn't prefer Java or Scala, the reason why i writen this in Java is that, this part logic would be translated from Calcite RelNodes(which is in Java) and finally

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-28 Thread twalthr
Github user twalthr commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-176133567 @fhueske and @ChengXiangLi: Sorry but I have to discuss this PR again. Do we really want to have parts of the Table API written in Java and some other parts written in S

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-27 Thread ChengXiangLi
Github user ChengXiangLi closed the pull request at: https://github.com/apache/flink/pull/1544 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature i

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-27 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-175506270 Ah, just saw that you committed already. Very good :-) I think you can close this PR then. --- If your project is set up for it, you can reply to this email and have

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-27 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-175506011 Hi, you cannot push to the Apache mirror, only to the writable Apache repository: https://git-wip-us.apache.org/repos/asf/flink.git I added the Apache repository

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread ChengXiangLi
Github user ChengXiangLi commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-175365963 Just curious, about the merging the PR, the way i know is that, checkout the tableOnCalcite, apply the patch, commit and push to flink repo, is this the way how you

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread ChengXiangLi
Github user ChengXiangLi commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-175360681 @fhueske , yes, i just remove the method in `FlinkRelNode` as java interface only allow public method, just forgot to change the methods in implemented FlinkRelNode

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-175119125 @ChengXiangLi, actually I proposed to make all methods other than `translateToPlan()` private methods. If the Flink RelNodes directly return the DataSet program, we do n

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread twalthr
Github user twalthr commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174936146 Thanks for the refactoring. IMO I think we can remove the "Flink" prefix if we use DataSet/DataStream as prefix. Maybe it makes sense to add a `TranslationContext` param

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174908452 One more thing, we should rename the RelNodes to something like `DataSetFlatMap` to indicate that these nodes can only be used for the DataSet / Batch translation. We wi

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174900754 Just to minor comments from my side. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project doe

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread fhueske
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1544#discussion_r50807436 --- Diff: flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/FlinkRelNode.java --- @@ -0,0 +1,31 @@ +/* + * Licensed to

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-26 Thread fhueske
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1544#discussion_r50807009 --- Diff: flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/FlinkExchange.java --- @@ -0,0 +1,62 @@ +/* + * Licen

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-25 Thread ChengXiangLi
Github user ChengXiangLi commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174760809 Thanks for the comments, @fhueske and @twalthr . i've updated the PR. --- If your project is set up for it, you can reply to this email and have your reply appear

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-25 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174518788 Yes, my initial idea was also to separate between 1) translating to the correct job structure and 2) translation to actual DataSet program. So basically the same motivat

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-25 Thread twalthr
Github user twalthr commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174515248 Initially, I thought it makes sense to separate the code generation from the optimization (and thus from Calcite). So that we could replace Calcite easily at any time. B

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-25 Thread ChengXiangLi
Github user ChengXiangLi commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174479220 Hi, @fhueske , What about `Project` and `Agggregate`? they are translated to `FlinkMap` and `FlinkReduce` which includes `MapFunction` and `GroupReduceFunction`. To

[GitHub] flink pull request: [FLINK-3282] Add FlinkRelNode interface.

2016-01-25 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/1544#issuecomment-174471324 Thanks for this PR @ChengXiangLi. This PR assumes that the code generation happens during the Calcite translation process, because the interfaces return concrete