gstamatakis opened a new issue, #229:
URL: https://github.com/apache/incubator-wayang/issues/229
Greetings,
I'm facing the following error when attempting to execute a single JOIN
operation in Postgres.
First and foremost I'm assuming that a JOIN operator can be placed in
Postgres, if not please feel free to close this issue as off-topic.
More specifically, I'm attempting to load 2 Postgres tables and join on
their primary key.
I'm manually restricting the JOIN Operator to run on a `Postgres.platform()`
and both Postgres.readTable operations also placed in Postgres. The result is a
WayangException that informed me that no plans could be produced (see attached
logs).
The following code chunk is the Wayang code I'm trying to execute.
```
/* Builder to prepare and execute the plan */
val planBuilder = new PlanBuilder(wayangContext, jobName = "ExampleJob")
/* Tables/Tuples fetching functions */
val createTableSourceKeyword = new PostgresTableSource("keyword", "id",
"keyword", "phonetic_code")
val createTableSourceMovieKeyword = new
PostgresTableSource("movie_keyword", "id", "movie_id", "keyword_id")
// Left relation
val left =
planBuilder.readTable(createTableSourceKeyword).withName("load_left").withTargetPlatforms(planner.place("load_left"))
.filter(_.getString(1) == "character-name-in-title", sqlUdf = "keyword
= 'character-name-in-title'", selectivity =
1.0).withName("filter1").withTargetPlatforms(planner.place("filter1"))
// Right relation
val right =
planBuilder.readTable(createTableSourceMovieKeyword).withName("load_right").withTargetPlatforms(planner.place("load_right"))
// Execute the JOIN and return the results
left
.join[Record, Int](thisKeyUdf = _.getInt(0), that = right, thatKeyUdf
= row =>
row.getInt(0)).withName("join1").withTargetPlatforms(planner.place("join1"))
//Fetch all items but only keep a few to avoid memory issues
.collect()
```
Logs
[wayang_logs.txt](https://github.com/apache/incubator-wayang/files/8699336/wayang_logs.txt)
Stacktrace
```
Exception in thread "main"
org.apache.wayang.core.api.exception.WayangException: Could not find a single
execution plan.
at
org.apache.wayang.core.optimizer.enumeration.PlanEnumerator.enumerate(PlanEnumerator.java:305)
at
org.apache.wayang.core.api.Job.createInitialExecutionPlan(Job.java:417)
at org.apache.wayang.core.api.Job.doExecute(Job.java:290)
at
org.apache.wayang.core.util.OneTimeExecutable.tryExecute(OneTimeExecutable.java:41)
at
org.apache.wayang.core.util.OneTimeExecutable.execute(OneTimeExecutable.java:54)
at org.apache.wayang.core.api.Job.execute(Job.java:244)
at
org.apache.wayang.core.api.WayangContext.execute(WayangContext.java:120)
at
org.apache.wayang.core.api.WayangContext.execute(WayangContext.java:108)
at
org.apache.wayang.api.PlanBuilder.buildAndExecute(PlanBuilder.scala:102)
at org.apache.wayang.api.DataQuanta.collect(DataQuanta.scala:755)
at org.athenarc.flow.Query1Flow.execute(Query1Flow.scala:47)
at
org.athenarc.orchestrator.SimpleOrchestrator.run(SimpleOrchestrator.scala:28)
at org.athenarc.execution.Query1Execution$.run(Query1Execution.scala:18)
at org.athenarc.Main$.$anonfun$main$1(Main.scala:50)
at
scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:285)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:141)
at scala.collection.TraversableLike.map(TraversableLike.scala:285)
at scala.collection.TraversableLike.map$(TraversableLike.scala:278)
at
scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:53)
at scala.collection.SetLike.map(SetLike.scala:105)
at scala.collection.SetLike.map$(SetLike.scala:105)
at scala.collection.AbstractSet.map(Set.scala:53)
at org.athenarc.Main$.main(Main.scala:50)
at org.athenarc.Main.main(Main.scala)
```
--
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]