Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pull latest from apache spark #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
pull latest from apache spark #6
Changes from 1 commit
645c3a870f6f969a48c65511d492cf95d72ce58e9952035d1941b2703edcc40ad0de99b373a88d06258715d57f9f6ac7c3465c665dd83c2027e88fac04dc27204b02be617508c8f254583302c3b7d41475f42c28a6e2bd3f19228eadce5ee82900048ff8809ee913e6bc7a3ec4b1389603f57a6d7eac9d4896411ef77003e72914fa3ec50ab6071a7e9e67b3e1fb85785772600eea12ae720dda46f25c2da7bfac25bba58017cdf2e52e5977771c739bf76dd9e86e6e7d05d02ca1a7b954040f878d3b60ad3c9a946881b49740954d5ce617d57daf1076009b1e28840e43061481f54acd8813fa982ef2bcc4ab37035d3acf3201ae2c5af7dcbff280c3689bc8e8633e53ba6d69634e177791d0c256704c23369c3cad29a40dd06483dc9ae2c6aa356e1772d3dbf2a7c37fcda340e0676238447d5f7dbdba4a0add926e9c47906461aa0eba28a3acb78bcad283e3c3d59525c569fe38ab927e22e74267bed24801a235f4ac19f4ac6747d2f53d2b6f581d485391fed8e020ff8c27fe6ba1d5427888fa866416e71ac3a62694d535d1560489f6871cc874c4e26e33bc67d18276c6ca990f0b713e0234f7818fff0f907f1c546d37e1e99b7187eb650a8ff776b2073bf9d42afd7266d9d0e2ef4c59ba8c86d4eace4dc079420db88d02515e4afc7e68c3f3daa09473263f1840852e58fa19acdf21931d069d250832c9a1680c9a87afd45f805363f642a6a4bfcd07cb323310981d9f13f0fe06493c23385e8a48296f38529d88301fad06dec37992142b17eec0a4bf46098e0b030b5e3bd8e76679a9256840f72743de64958043304b1a51f877276c2d599bd2f010251a7dafd70fbd5365b48978ab5e6f2f4d89c71450e3644dddf2f241eaabf643649dbbd887f52b6a89421f6c236652943c578c59202479431a3d005ab2943b461d956d88241d95fb6496d2a294125475f6bdf9eacd9d8d9e8f26d9670f891984971d1de28c4bd576ae6c6773f06eb76fc2b6585c42fd27e1f384ce2d24b90c020f96997b77ba302d4d849392b7057ca9ef86917f400c100d317eef246c890c35d1c193ade1a84e5faba9f82066a130c1884204c9de357d82dea9ca6f8ef33991974d1d65b75e6637a78f5f3bda63ee7996828213dedf8b874c08e2cb39e80d1614485453455c6037ed06c2d89490a1d8d10ef4f3750ed64bb1fda07783b6f0f1015f53f32a20acb32a14c72369c23c81File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
## What changes were proposed in this pull request? This PR unifies DataFrame and Dataset by migrating existing DataFrame operations to Dataset and make `DataFrame` a type alias of `Dataset[Row]`. Most Scala code changes are source compatible, but Java API is broken as Java knows nothing about Scala type alias (mostly replacing `DataFrame` with `Dataset<Row>`). There are several noticeable API changes related to those returning arrays: 1. `collect`/`take` - Old APIs in class `DataFrame`: ```scala def collect(): Array[Row] def take(n: Int): Array[Row] ``` - New APIs in class `Dataset[T]`: ```scala def collect(): Array[T] def take(n: Int): Array[T] def collectRows(): Array[Row] def takeRows(n: Int): Array[Row] ``` Two specialized methods `collectRows` and `takeRows` are added because Java doesn't support returning generic arrays. Thus, for example, `DataFrame.collect(): Array[T]` actually returns `Object` instead of `Array<T>` from Java side. Normally, Java users may fall back to `collectAsList` and `takeAsList`. The two new specialized versions are added to avoid performance regression in ML related code (but maybe I'm wrong and they are not necessary here). 1. `randomSplit` - Old APIs in class `DataFrame`: ```scala def randomSplit(weights: Array[Double], seed: Long): Array[DataFrame] def randomSplit(weights: Array[Double]): Array[DataFrame] ``` - New APIs in class `Dataset[T]`: ```scala def randomSplit(weights: Array[Double], seed: Long): Array[Dataset[T]] def randomSplit(weights: Array[Double]): Array[Dataset[T]] ``` Similar problem as above, but hasn't been addressed for Java API yet. We can probably add `randomSplitAsList` to fix this one. 1. `groupBy` Some original `DataFrame.groupBy` methods have conflicting signature with original `Dataset.groupBy` methods. To distinguish these two, typed `Dataset.groupBy` methods are renamed to `groupByKey`. Other noticeable changes: 1. Dataset always do eager analysis now We used to support disabling DataFrame eager analysis to help reporting partially analyzed malformed logical plan on analysis failure. However, Dataset encoders requires eager analysi during Dataset construction. To preserve the error reporting feature, `AnalysisException` now takes an extra `Option[LogicalPlan]` argument to hold the partially analyzed plan, so that we can check the plan tree when reporting test failures. This plan is passed by `QueryExecution.assertAnalyzed`. ## How was this patch tested? Existing tests do the work. ## TODO - [ ] Fix all tests - [ ] Re-enable MiMA check - [ ] Update ScalaDoc (`since`, `group`, and example code) Author: Cheng Lian <[email protected]> Author: Yin Huai <[email protected]> Author: Wenchen Fan <[email protected]> Author: Cheng Lian <[email protected]> Closes apache#11443 from liancheng/ds-to-df.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.