Skip to content

Commit

Permalink
[FLINK-1900] Fix Scala Table API Example in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed Apr 17, 2015
1 parent 354922b commit 8c5cd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import org.apache.flink.api.scala.table._
case class WC(word: String, count: Int)
val input = env.fromElements(WC("hello", 1), WC("hello", 1), WC("ciao", 1))
val expr = input.toTable
val result = expr.groupBy('word).select('word, 'count.sum).toSet[WC]
val result = expr.groupBy('word).select('word, 'count.sum as count).toSet[WC]
{% endhighlight %}

The expression DSL uses Scala symbols to refer to field names and we use code generation to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class JavaBatchTranslator extends PlanTranslator {
val outputNames = outputType.getFieldNames.toSeq

if (resultNames.toSet != outputNames.toSet) {
throw new ExpressionException(s"Expression result type $resultType does not have the same" +
throw new ExpressionException(s"Expression result type $resultType does not have the same " +
s"fields as output type $outputType")
}

Expand Down

0 comments on commit 8c5cd97

Please sign in to comment.