Skip to content
Snippets Groups Projects
  1. Jul 30, 2015
    • Yuhao Yang's avatar
      [SPARK-7368] [MLLIB] Add QR decomposition for RowMatrix · d31c618e
      Yuhao Yang authored
      jira: https://issues.apache.org/jira/browse/SPARK-7368
      Add QR decomposition for RowMatrix.
      
      I'm not sure what's the blueprint about the distributed Matrix from community and whether this will be a desirable feature , so I sent a prototype for discussion. I'll go on polish the code and provide ut and performance statistics if it's acceptable.
      
      The implementation refers to the [paper: https://www.cs.purdue.edu/homes/dgleich/publications/Benson%202013%20-%20direct-tsqr.pdf]
      Austin R. Benson, David F. Gleich, James Demmel. "Direct QR factorizations for tall-and-skinny matrices in MapReduce architectures", 2013 IEEE International Conference on Big Data, which is a stable algorithm with good scalability.
      
      Currently I tried it on a 400000 * 500 rowMatrix (16 partitions) and it can bring down the computation time from 8.8 mins (using breeze.linalg.qr.reduced)  to 2.6 mins on a 4 worker cluster. I think there will still be some room for performance improvement.
      
      Any trial and suggestion is welcome.
      
      Author: Yuhao Yang <hhbyyh@gmail.com>
      
      Closes #5909 from hhbyyh/qrDecomposition and squashes the following commits:
      
      cec797b [Yuhao Yang] remove unnecessary qr
      0fb1012 [Yuhao Yang] hierarchy R computing
      3fbdb61 [Yuhao Yang] update qr to indirect and add ut
      0d913d3 [Yuhao Yang] Merge remote-tracking branch 'upstream/master' into qrDecomposition
      39213c3 [Yuhao Yang] Merge remote-tracking branch 'upstream/master' into qrDecomposition
      c0fc0c7 [Yuhao Yang] Merge remote-tracking branch 'upstream/master' into qrDecomposition
      39b0b22 [Yuhao Yang] initial draft for discussion
      d31c618e
    • Liang-Chi Hsieh's avatar
      [SPARK-8838] [SQL] Add config to enable/disable merging part-files when merging parquet schema · 6175d6cf
      Liang-Chi Hsieh authored
      JIRA: https://issues.apache.org/jira/browse/SPARK-8838
      
      Currently all part-files are merged when merging parquet schema. However, in case there are many part-files and we can make sure that all the part-files have the same schema as their summary file. If so, we provide a configuration to disable merging part-files when merging parquet schema.
      
      In short, we need to merge parquet schema because different summary files may contain different schema. But the part-files are confirmed to have the same schema with summary files.
      
      Author: Liang-Chi Hsieh <viirya@appier.com>
      
      Closes #7238 from viirya/option_partfile_merge and squashes the following commits:
      
      71d5b5f [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      8816f44 [Liang-Chi Hsieh] For comments.
      dbc8e6b [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      afc2fa1 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      d4ed7e6 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      df43027 [Liang-Chi Hsieh] Get dataStatuses' partitions based on all paths.
      4eb2f00 [Liang-Chi Hsieh] Use given parameter.
      ea8f6e5 [Liang-Chi Hsieh] Correct the code comments.
      a57be0e [Liang-Chi Hsieh] Merge part-files if there are no summary files.
      47df981 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      4caf293 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into option_partfile_merge
      0e734e0 [Liang-Chi Hsieh] Use correct API.
      3b6be5b [Liang-Chi Hsieh] Fix key not found.
      4bdd7e0 [Liang-Chi Hsieh] Don't read footer files if we can skip them.
      8bbebcb [Liang-Chi Hsieh] Figure out how to test the config.
      bbd4ce7 [Liang-Chi Hsieh] Add config to enable/disable merging part-files when merging parquet schema.
      6175d6cf
    • Reynold Xin's avatar
      Fix flaky HashedRelationSuite · 5ba2d440
      Reynold Xin authored
      SparkEnv might not have been set in local unit tests.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7784 from rxin/HashedRelationSuite and squashes the following commits:
      
      435d64b [Reynold Xin] Fix flaky HashedRelationSuite
      5ba2d440
    • Reynold Xin's avatar
      Revert "[SPARK-9458] Avoid object allocation in prefix generation." · 4a8bb9d0
      Reynold Xin authored
      This reverts commit 9514d874.
      4a8bb9d0
    • zsxwing's avatar
      [SPARK-9335] [TESTS] Enable Kinesis tests only when files in extras/kinesis-asl are changed · 76f2e393
      zsxwing authored
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #7711 from zsxwing/SPARK-9335-test and squashes the following commits:
      
      c13ec2f [zsxwing] environs -> environ
      69c2865 [zsxwing] Merge remote-tracking branch 'origin/master' into SPARK-9335-test
      ef84a08 [zsxwing] Revert "Modify the Kinesis project to trigger ENABLE_KINESIS_TESTS"
      f691028 [zsxwing] Modify the Kinesis project to trigger ENABLE_KINESIS_TESTS
      7618205 [zsxwing] Enable Kinesis tests only when files in extras/kinesis-asl are changed
      76f2e393
    • Joseph Batchik's avatar
      [SPARK-8005][SQL] Input file name · 1221849f
      Joseph Batchik authored
      Users can now get the file name of the partition being read in. A thread local variable is in `SQLNewHadoopRDD` and is set when the partition is computed. `SQLNewHadoopRDD` is moved to core so that the catalyst package can reach it.
      
      This supports:
      
      `df.select(inputFileName())`
      
      and
      
      `sqlContext.sql("select input_file_name() from table")`
      
      Author: Joseph Batchik <josephbatchik@gmail.com>
      
      Closes #7743 from JDrit/input_file_name and squashes the following commits:
      
      abb8609 [Joseph Batchik] fixed failing test and changed the default value to be an empty string
      d2f323d [Joseph Batchik] updates per review
      102061f [Joseph Batchik] updates per review
      75313f5 [Joseph Batchik] small fixes
      c7f7b5a [Joseph Batchik] addeding input file name to Spark SQL
      1221849f
    • Yijie Shen's avatar
      [SPARK-9428] [SQL] Add test cases for null inputs for expression unit tests · e127ec34
      Yijie Shen authored
      JIRA: https://issues.apache.org/jira/browse/SPARK-9428
      
      Author: Yijie Shen <henry.yijieshen@gmail.com>
      
      Closes #7748 from yjshen/string_cleanup and squashes the following commits:
      
      e0c2b3d [Yijie Shen] update codegen in RegExpExtract and RegExpReplace
      26614d2 [Yijie Shen] MathFunctionSuite
      a402859 [Yijie Shen] complex_create, conditional and cast
      6e4e608 [Yijie Shen] arithmetic and cast
      52593c1 [Yijie Shen] null input test cases for StringExpressionSuite
      e127ec34
    • Reynold Xin's avatar
      HOTFIX: disable HashedRelationSuite. · 712465b6
      Reynold Xin authored
      712465b6
    • Davies Liu's avatar
      [SPARK-9116] [SQL] [PYSPARK] support Python only UDT in __main__ · e044705b
      Davies Liu authored
      Also we could create a Python UDT without having a Scala one, it's important for Python users.
      
      cc mengxr JoshRosen
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #7453 from davies/class_in_main and squashes the following commits:
      
      4dfd5e1 [Davies Liu] add tests for Python and Scala UDT
      793d9b2 [Davies Liu] Merge branch 'master' of github.com:apache/spark into class_in_main
      dc65f19 [Davies Liu] address comment
      a9a3c40 [Davies Liu] Merge branch 'master' of github.com:apache/spark into class_in_main
      a86e1fc [Davies Liu] fix serialization
      ad528ba [Davies Liu] Merge branch 'master' of github.com:apache/spark into class_in_main
      63f52ef [Davies Liu] fix pylint check
      655b8a9 [Davies Liu] Merge branch 'master' of github.com:apache/spark into class_in_main
      316a394 [Davies Liu] support Python UDT with UTF
      0bcb3ef [Davies Liu] fix bug in mllib
      de986d6 [Davies Liu] fix test
      83d65ac [Davies Liu] fix bug in StructType
      55bb86e [Davies Liu] support Pyt...
      e044705b
    • Alex Angelini's avatar
      Fix reference to self.names in StructType · f5dd1133
      Alex Angelini authored
      `names` is not defined in this context, I think you meant `self.names`.
      
      davies
      
      Author: Alex Angelini <alex.louis.angelini@gmail.com>
      
      Closes #7766 from angelini/fix_struct_type_names and squashes the following commits:
      
      01543a1 [Alex Angelini] Fix reference to self.names in StructType
      f5dd1133
  2. Jul 29, 2015
    • Reynold Xin's avatar
      [SPARK-9462][SQL] Initialize nondeterministic expressions in code gen fallback mode. · 27850af5
      Reynold Xin authored
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7767 from rxin/SPARK-9462 and squashes the following commits:
      
      ef3e2d9 [Reynold Xin] Removed println
      713ac3a [Reynold Xin] More unit tests.
      bb5c334 [Reynold Xin] [SPARK-9462][SQL] Initialize nondeterministic expressions in code gen fallback mode.
      27850af5
    • Reynold Xin's avatar
      [SPARK-9460] Avoid byte array allocation in StringPrefixComparator. · 07fd7d36
      Reynold Xin authored
      As of today, StringPrefixComparator converts the long values back to byte arrays in order to compare them. This patch optimizes this to compare the longs directly, rather than turning the longs into byte arrays and comparing them byte by byte (unsigned).
      
      This only works on little-endian architecture right now.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7765 from rxin/SPARK-9460 and squashes the following commits:
      
      e4908cc [Reynold Xin] Stricter randomized tests.
      4c8d094 [Reynold Xin] [SPARK-9460] Avoid byte array allocation in StringPrefixComparator.
      07fd7d36
    • Reynold Xin's avatar
      [SPARK-9458] Avoid object allocation in prefix generation. · 9514d874
      Reynold Xin authored
      In our existing sort prefix generation code, we use expression's eval method to generate the prefix, which results in object allocation for every prefix. We can use the specialized getters available on InternalRow directly to avoid the object allocation.
      
      I also removed the FLOAT prefix, opting for converting float directly to double.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7763 from rxin/sort-prefix and squashes the following commits:
      
      5dc2f06 [Reynold Xin] [SPARK-9458] Avoid object allocation in prefix generation.
      9514d874
    • Feynman Liang's avatar
      [SPARK-9440] [MLLIB] Add hyperparameters to LocalLDAModel save/load · a200e645
      Feynman Liang authored
      jkbradley MechCoder
      
      Resolves blocking issue for SPARK-6793. Please review after #7705 is merged.
      
      Author: Feynman Liang <fliang@databricks.com>
      
      Closes #7757 from feynmanliang/SPARK-9940-localSaveLoad and squashes the following commits:
      
      d0d8cf4 [Feynman Liang] Fix thisClassName
      0f30109 [Feynman Liang] Fix tests after changing LDAModel public API
      dc61981 [Feynman Liang] Add hyperparams to LocalLDAModel save/load
      a200e645
    • sethah's avatar
      [SPARK-6129] [MLLIB] [DOCS] Added user guide for evaluation metrics · 2a9fe4a4
      sethah authored
      Author: sethah <seth.hendrickson16@gmail.com>
      
      Closes #7655 from sethah/Working_on_6129 and squashes the following commits:
      
      253db2d [sethah] removed number formatting from example code
      b769cab [sethah] rewording threshold section
      d5dad4d [sethah] adding some explanations of concepts to the eval metrics user guide
      3a61ff9 [sethah] Removing unnecessary latex commands from metrics guide
      c9dd058 [sethah] Cleaning up and formatting metrics user guide section
      6f31c21 [sethah] All example code for metrics section done
      98813fe [sethah] Most java and python example code added. Further latex formatting
      53a24fc [sethah] Adding documentations of metrics for ML algorithms to user guide
      2a9fe4a4
    • Holden Karau's avatar
      [SPARK-9016] [ML] make random forest classifiers implement classification trait · 37c2d192
      Holden Karau authored
      Implement the classification trait for RandomForestClassifiers. The plan is to use this in the future to providing thresholding for RandomForestClassifiers (as well as other classifiers that implement that trait).
      
      Author: Holden Karau <holden@pigscanfly.ca>
      
      Closes #7432 from holdenk/SPARK-9016-make-random-forest-classifiers-implement-classification-trait and squashes the following commits:
      
      bf22fa6 [Holden Karau] Add missing imports for testing suite
      e948f0d [Holden Karau] Check the prediction generation from rawprediciton
      25320c3 [Holden Karau] Don't supply numClasses when not needed, assert model classes are as expected
      1a67e04 [Holden Karau] Use old decission tree stuff instead
      673e0c3 [Holden Karau] Merge branch 'master' into SPARK-9016-make-random-forest-classifiers-implement-classification-trait
      0d15b96 [Holden Karau] FIx typo
      5eafad4 [Holden Karau] add a constructor for rootnode + num classes
      fc6156f [Holden Karau] scala style fix
      2597915 [Holden Karau] take num classes in constructor
      3ccfe4a [Holden Karau] Merge in master, make pass numClasses through randomforest for training
      222a10b [Holden Karau] Increase numtrees to 3 in the python test since before the two were equal and the argmax was selecting the last one
      16aea1c [Holden Karau] Make tests match the new models
      b454a02 [Holden Karau] Make the Tree classifiers extends the Classifier base class
      77b4114 [Holden Karau] Import vectors lib
      37c2d192
    • Bimal Tandel's avatar
      [SPARK-8921] [MLLIB] Add @since tags to mllib.stat · 103d8cce
      Bimal Tandel authored
      Author: Bimal Tandel <bimal@bimal-MBP.local>
      
      Closes #7730 from BimalTandel/branch_spark_8921 and squashes the following commits:
      
      3ea230a [Bimal Tandel] Spark 8921 add @since tags
      103d8cce
    • Reynold Xin's avatar
      [SPARK-9448][SQL] GenerateUnsafeProjection should not share expressions across instances. · 86505962
      Reynold Xin authored
      We accidentally moved the list of expressions from the generated code instance to the class wrapper, and as a result, different threads are sharing the same set of expressions, which cause problems for expressions with mutable state.
      
      This pull request fixed that problem, and also added unit tests for all codegen classes, except GeneratedOrdering (which will never need any expressions since sort now only accepts bound references.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7759 from rxin/SPARK-9448 and squashes the following commits:
      
      c09b50f [Reynold Xin] [SPARK-9448][SQL] GenerateUnsafeProjection should not share expressions across instances.
      86505962
    • Feynman Liang's avatar
      [SPARK-6793] [MLLIB] OnlineLDAOptimizer LDA perplexity · 2cc212d5
      Feynman Liang authored
      Implements `logPerplexity` in `OnlineLDAOptimizer`. Also refactors inference code into companion object to enable future reuse (e.g. `predict` method).
      
      Author: Feynman Liang <fliang@databricks.com>
      
      Closes #7705 from feynmanliang/SPARK-6793-perplexity and squashes the following commits:
      
      6da2c99 [Feynman Liang] Remove get* from LDAModel public API
      8381da6 [Feynman Liang] Code review comments
      17f7000 [Feynman Liang] Documentation typo fixes
      2f452a4 [Feynman Liang] Remove auxillary DistributedLDAModel constructor
      a275914 [Feynman Liang] Prevent empty counts calls to variationalInference
      06d02d9 [Feynman Liang] Remove deprecated LocalLDAModel constructor
      afecb46 [Feynman Liang] Fix regression bug in sstats accumulator
      5a327a0 [Feynman Liang] Code review quick fixes
      998c03e [Feynman Liang] Fix style
      1cbb67d [Feynman Liang] Fix access modifier bug
      4362daa [Feynman Liang] Organize imports
      4f171f7 [Feynman Liang] Fix indendation
      2f049ce [Feynman Liang] Fix failing save/load tests
      7415e96 [Feynman Liang] Pick changes from big PR
      11e7c33 [Feynman Liang] Merge remote-tracking branch 'apache/master' into SPARK-6793-perplexity
      f8adc48 [Feynman Liang] Add logPerplexity, refactor variationalBound into a method
      cd521d6 [Feynman Liang] Refactor methods into companion class
      7f62a55 [Feynman Liang] --amend
      c62cb1e [Feynman Liang] Outer product for stats, revert Range slicing
      aead650 [Feynman Liang] Range slice, in-place update, reduce transposes
      2cc212d5
    • Josh Rosen's avatar
      [SPARK-9411] [SQL] Make Tungsten page sizes configurable · 1b0099fc
      Josh Rosen authored
      We need to make page sizes configurable so we can reduce them in unit tests and increase them in real production workloads.  These sizes are now controlled by a new configuration, `spark.buffer.pageSize`.  The new default is 64 megabytes.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #7741 from JoshRosen/SPARK-9411 and squashes the following commits:
      
      a43c4db [Josh Rosen] Fix pow
      2c0eefc [Josh Rosen] Fix MAXIMUM_PAGE_SIZE_BYTES comment + value
      bccfb51 [Josh Rosen] Lower page size to 4MB in TestHive
      ba54d4b [Josh Rosen] Make UnsafeExternalSorter's page size configurable
      0045aa2 [Josh Rosen] Make UnsafeShuffle's page size configurable
      bc734f0 [Josh Rosen] Rename configuration
      e614858 [Josh Rosen] Makes BytesToBytesMap page size configurable
      1b0099fc
    • Alexander Ulanov's avatar
      [SPARK-9436] [GRAPHX] Pregel simplification patch · b715933f
      Alexander Ulanov authored
      Pregel code contains two consecutive joins:
      ```
      g.vertices.innerJoin(messages)(vprog)
      ...
      g = g.outerJoinVertices(newVerts)
      { (vid, old, newOpt) => newOpt.getOrElse(old) }
      ```
      This can be simplified with one join. ankurdave proposed a patch based on our discussion in the mailing list: https://www.mail-archive.com/devspark.apache.org/msg10316.html
      
      Author: Alexander Ulanov <nashb@yandex.ru>
      
      Closes #7749 from avulanov/SPARK-9436-pregel and squashes the following commits:
      
      8568e06 [Alexander Ulanov] Pregel simplification patch
      b715933f
    • Reynold Xin's avatar
      [SPARK-9430][SQL] Rename IntervalType to CalendarIntervalType. · 5340dfaf
      Reynold Xin authored
      We want to introduce a new IntervalType in 1.6 that is based on only the number of microseoncds,
      so interval can be compared.
      
      Renaming the existing IntervalType to CalendarIntervalType so we can do that in the future.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7745 from rxin/calendarintervaltype and squashes the following commits:
      
      99f64e8 [Reynold Xin] One more line ...
      13466c8 [Reynold Xin] Fixed tests.
      e20f24e [Reynold Xin] [SPARK-9430][SQL] Rename IntervalType to CalendarIntervalType.
      5340dfaf
    • Iulian Dragos's avatar
      [SPARK-8977] [STREAMING] Defines the RateEstimator interface, and impements the RateController · 819be46e
      Iulian Dragos authored
      Based on #7471.
      
      - [x] add a test that exercises the publish path from driver to receiver
      - [ ] remove Serializable from `RateController` and `RateEstimator`
      
      Author: Iulian Dragos <jaguarul@gmail.com>
      Author: François Garillot <francois@garillot.net>
      
      Closes #7600 from dragos/topic/streaming-bp/rate-controller and squashes the following commits:
      
      f168c94 [Iulian Dragos] Latest review round.
      5125e60 [Iulian Dragos] Fix style.
      a2eb3b9 [Iulian Dragos] Merge remote-tracking branch 'upstream/master' into topic/streaming-bp/rate-controller
      475e346 [Iulian Dragos] Latest round of reviews.
      e9fb45e [Iulian Dragos] - Add a test for checkpointing - fixed serialization for RateController.executionContext
      715437a [Iulian Dragos] Review comments and added a `reset` call in ReceiverTrackerTest.
      e57c66b [Iulian Dragos] Added a couple of tests for the full scenario from driver to receivers, with several rate updates.
      b425d32 [Iulian Dragos] Removed DeveloperAPI, removed rateEstimator field, removed Noop rate estimator, changed logic for initialising rate estimator.
      238cfc6 [Iulian Dragos] Merge remote-tracking branch 'upstream/master' into topic/streaming-bp/rate-controller
      34a389d [Iulian Dragos] Various style changes and a first test for the rate controller.
      d32ca36 [François Garillot] [SPARK-8977][Streaming] Defines the RateEstimator interface, and implements the ReceiverRateController
      8941cf9 [Iulian Dragos] Renames and other nitpicks.
      162d9e5 [Iulian Dragos] Use Reflection for accessing truly private `executor` method and use the listener bus to know when receivers have registered (`onStart` is called before receivers have registered, leading to flaky behavior).
      210f495 [Iulian Dragos] Revert "Added a few tests that measure the receiver’s rate."
      0c51959 [Iulian Dragos] Added a few tests that measure the receiver’s rate.
      261a051 [Iulian Dragos] - removed field to hold the current rate limit in rate limiter - made rate limit a Long and default to Long.MaxValue (consequence of the above) - removed custom `waitUntil` and replaced it by `eventually`
      cd1397d [Iulian Dragos] Add a test for the propagation of a new rate limit from driver to receivers.
      6369b30 [Iulian Dragos] Merge pull request #15 from huitseeker/SPARK-8975
      d15de42 [François Garillot] [SPARK-8975][Streaming] Adds Ratelimiter unit tests w.r.t. spark.streaming.receiver.maxRate
      4721c7d [François Garillot] [SPARK-8975][Streaming] Add a mechanism to send a new rate from the driver to the block generator
      819be46e
    • Joseph Batchik's avatar
      [SPARK-746] [CORE] Added Avro Serialization to Kryo · 069a4c41
      Joseph Batchik authored
      Added a custom Kryo serializer for generic Avro records to reduce the network IO
      involved during a shuffle. This compresses the schema and allows for users to
      register their schemas ahead of time to further reduce traffic.
      
      Currently Kryo tries to use its default serializer for generic Records, which will include
      a lot of unneeded data in each record.
      
      Author: Joseph Batchik <joseph.batchik@cloudera.com>
      Author: Joseph Batchik <josephbatchik@gmail.com>
      
      Closes #7004 from JDrit/Avro_serialization and squashes the following commits:
      
      8158d51 [Joseph Batchik] updated per feedback
      c0cf329 [Joseph Batchik] implemented @squito suggestion for SparkEnv
      dd71efe [Joseph Batchik] fixed bug with serializing
      1183a48 [Joseph Batchik] updated codec settings
      fa9298b [Joseph Batchik] forgot a couple of fixes
      c5fe794 [Joseph Batchik] implemented @squito suggestion
      0f5471a [Joseph Batchik] implemented @squito suggestion to use a codec that is already in spark
      6d1925c [Joseph Batchik] fixed to changes suggested by @squito
      d421bf5 [Joseph Batchik] updated pom to removed versions
      ab46d10 [Joseph Batchik] Changed Avro dependency to be similar to parent
      f4ae251 [Joseph Batchik] fixed serialization error in that SparkConf cannot be serialized
      2b545cc [Joseph Batchik] started working on fixes for pr
      97fba62 [Joseph Batchik] Added a custom Kryo serializer for generic Avro records to reduce the network IO involved during a shuffle. This compresses the schema and allows for users to register their schemas ahead of time to further reduce traffic.
      069a4c41
    • Reynold Xin's avatar
      [SPARK-9127][SQL] Rand/Randn codegen fails with long seed. · 97906944
      Reynold Xin authored
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7747 from rxin/SPARK-9127 and squashes the following commits:
      
      e851418 [Reynold Xin] [SPARK-9127][SQL] Rand/Randn codegen fails with long seed.
      97906944
    • Wenchen Fan's avatar
      [SPARK-9251][SQL] do not order by expressions which still need evaluation · 708794e8
      Wenchen Fan authored
      as an offline discussion with rxin , it's weird to be computing stuff while doing sorting, we should only order by bound reference during execution.
      
      Author: Wenchen Fan <cloud0fan@outlook.com>
      
      Closes #7593 from cloud-fan/sort and squashes the following commits:
      
      7b1bef7 [Wenchen Fan] add test
      daf206d [Wenchen Fan] add more comments
      289bee0 [Wenchen Fan] do not order by expressions which still need evaluation
      708794e8
    • Davies Liu's avatar
      [SPARK-9281] [SQL] use decimal or double when parsing SQL · 15667a0a
      Davies Liu authored
      Right now, we use double to parse all the float number in SQL. When it's used in expression together with DecimalType, it will turn the decimal into double as well. Also it will loss some precision when using double.
      
      This PR change to parse float number to decimal or double, based on it's  using scientific notation or not, see https://msdn.microsoft.com/en-us/library/ms179899.aspx
      
      This is a break change, should we doc it somewhere?
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #7642 from davies/parse_decimal and squashes the following commits:
      
      1f576d9 [Davies Liu] Merge branch 'master' of github.com:apache/spark into parse_decimal
      5e142b6 [Davies Liu] fix scala style
      eca99de [Davies Liu] fix tests
      2afe702 [Davies Liu] Merge branch 'master' of github.com:apache/spark into parse_decimal
      f4a320b [Davies Liu] Update SqlParser.scala
      1c48e34 [Davies Liu] use decimal or double when parsing SQL
      15667a0a
    • Yijie Shen's avatar
      [SPARK-9398] [SQL] Datetime cleanup · 6309b934
      Yijie Shen authored
      JIRA: https://issues.apache.org/jira/browse/SPARK-9398
      
      Author: Yijie Shen <henry.yijieshen@gmail.com>
      
      Closes #7725 from yjshen/date_null_check and squashes the following commits:
      
      b4eade1 [Yijie Shen] inline daysToMonthEnd
      d09acc1 [Yijie Shen] implement getLastDayOfMonth to avoid repeated evaluation
      d857ec3 [Yijie Shen] add null check in DateExpressionSuite
      6309b934
  3. Jul 28, 2015
    • Josh Rosen's avatar
      [SPARK-9419] ShuffleMemoryManager and MemoryStore should track memory on a... · ea49705b
      Josh Rosen authored
      [SPARK-9419] ShuffleMemoryManager and MemoryStore should track memory on a per-task, not per-thread, basis
      
      Spark's ShuffleMemoryManager and MemoryStore track memory on a per-thread basis, which causes problems in the handful of cases where we have tasks that use multiple threads. In PythonRDD, RRDD, ScriptTransformation, and PipedRDD we consume the input iterator in a separate thread in order to write it to an external process.  As a result, these RDD's input iterators are consumed in a different thread than the thread that created them, which can cause problems in our memory allocation tracking. For example, if allocations are performed in one thread but deallocations are performed in a separate thread then memory may be leaked or we may get errors complaining that more memory was allocated than was freed.
      
      I think that the right way to fix this is to change our accounting to be performed on a per-task instead of per-thread basis.  Note that the current per-thread tracking has caused problems in the past; SPARK-3731 (#2668) fixes a memory leak in PythonRDD that was caused by this issue (that fix is no longer necessary as of this patch).
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #7734 from JoshRosen/memory-tracking-fixes and squashes the following commits:
      
      b4b1702 [Josh Rosen] Propagate TaskContext to writer threads.
      57c9b4e [Josh Rosen] Merge remote-tracking branch 'origin/master' into memory-tracking-fixes
      ed25d3b [Josh Rosen] Address minor PR review comments
      44f6497 [Josh Rosen] Fix long line.
      7b0f04b [Josh Rosen] Fix ShuffleMemoryManagerSuite
      f57f3f2 [Josh Rosen] More thread -> task changes
      fa78ee8 [Josh Rosen] Move Executor's cleanup into Task so that TaskContext is defined when cleanup is performed
      5e2f01e [Josh Rosen] Fix capitalization
      1b0083b [Josh Rosen] Roll back fix in PySpark, which is no longer necessary
      2e1e0f8 [Josh Rosen] Use TaskAttemptIds to track shuffle memory
      c9e8e54 [Josh Rosen] Use TaskAttemptIds to track unroll memory
      ea49705b
    • Wenchen Fan's avatar
      [SPARK-8608][SPARK-8609][SPARK-9083][SQL] reset mutable states of... · 429b2f0d
      Wenchen Fan authored
      [SPARK-8608][SPARK-8609][SPARK-9083][SQL] reset mutable states of nondeterministic expression before evaluation and fix PullOutNondeterministic
      
      We will do local projection for LocalRelation, and thus reuse the same Expression object among multiply evaluations. We should reset the mutable states of Expression before evaluate it.
      
      Fix `PullOutNondeterministic` rule to make it work for `Sort`.
      
      Also got a chance to cleanup the dataframe test suite.
      
      Author: Wenchen Fan <cloud0fan@outlook.com>
      
      Closes #7674 from cloud-fan/show and squashes the following commits:
      
      888934f [Wenchen Fan] fix sort
      c0e93e8 [Wenchen Fan] local DataFrame with random columns should return same value when call `show`
      429b2f0d
    • Yin Huai's avatar
      [SPARK-9422] [SQL] Remove the placeholder attributes used in the aggregation buffers · 3744b7fd
      Yin Huai authored
      https://issues.apache.org/jira/browse/SPARK-9422
      
      Author: Yin Huai <yhuai@databricks.com>
      
      Closes #7737 from yhuai/removePlaceHolder and squashes the following commits:
      
      ec29b44 [Yin Huai]  Remove placeholder attributes.
      3744b7fd
    • Josh Rosen's avatar
      [SPARK-9421] Fix null-handling bugs in UnsafeRow.getDouble, getFloat(), and get(ordinal, dataType) · e78ec1a8
      Josh Rosen authored
      UnsafeRow.getDouble and getFloat() return NaN when called on columns that are null, which is inconsistent with the behavior of other row classes (which is to return 0.0).
      
      In addition, the generic get(ordinal, dataType) method should always return null for a null literal, but currently it handles nulls by calling the type-specific accessors.
      
      This patch addresses both of these issues and adds a regression test.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #7736 from JoshRosen/unsafe-row-null-fixes and squashes the following commits:
      
      c8eb2ee [Josh Rosen] Fix test in UnsafeRowConverterSuite
      6214682 [Josh Rosen] Fixes to null handling in UnsafeRow
      e78ec1a8
    • Reynold Xin's avatar
      [SPARK-9418][SQL] Use sort-merge join as the default shuffle join. · 6662ee21
      Reynold Xin authored
      Sort-merge join is more robust in Spark since sorting can be made using the Tungsten sort operator.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7733 from rxin/smj and squashes the following commits:
      
      61e4d34 [Reynold Xin] Fixed test case.
      5ffd731 [Reynold Xin] Fixed JoinSuite.
      a137dc0 [Reynold Xin] [SPARK-9418][SQL] Use sort-merge join as the default shuffle join.
      6662ee21
    • Reynold Xin's avatar
      [SPARK-9420][SQL] Move expressions in sql/core package to catalyst. · b7f54119
      Reynold Xin authored
      Since catalyst package already depends on Spark core, we can move those expressions
      into catalyst, and simplify function registry.
      
      This is a followup of #7478.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #7735 from rxin/SPARK-8003 and squashes the following commits:
      
      2ffbdc3 [Reynold Xin] [SPARK-8003][SQL] Move expressions in sql/core package to catalyst.
      b7f54119
    • Tathagata Das's avatar
      [STREAMING] [HOTFIX] Ignore ReceiverTrackerSuite flaky test · c5ed3695
      Tathagata Das authored
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #7738 from tdas/ReceiverTrackerSuite-hotfix and squashes the following commits:
      
      00f0ee1 [Tathagata Das] ignore flaky test
      c5ed3695
    • Josh Rosen's avatar
      [SPARK-9393] [SQL] Fix several error-handling bugs in ScriptTransform operator · 59b92add
      Josh Rosen authored
      SparkSQL's ScriptTransform operator has several serious bugs which make debugging fairly difficult:
      
      - If exceptions are thrown in the writing thread then the child process will not be killed, leading to a deadlock because the reader thread will block while waiting for input that will never arrive.
      - TaskContext is not propagated to the writer thread, which may cause errors in upstream pipelined operators.
      - Exceptions which occur in the writer thread are not propagated to the main reader thread, which may cause upstream errors to be silently ignored instead of killing the job.  This can lead to silently incorrect query results.
      - The writer thread is not a daemon thread, but it should be.
      
      In addition, the code in this file is extremely messy:
      
      - Lots of fields are nullable but the nullability isn't clearly explained.
      - Many confusing variable names: for instance, there are variables named `ite` and `iterator` that are defined in the same scope.
      - Some code was misindented.
      - The `*serdeClass` variables are actually expected to be single-quoted strings, which is really confusing: I feel that this parsing / extraction should be performed in the analyzer, not in the operator itself.
      - There were no unit tests for the operator itself, only end-to-end tests.
      
      This pull request addresses these issues, borrowing some error-handling techniques from PySpark's PythonRDD.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #7710 from JoshRosen/script-transform and squashes the following commits:
      
      16c44e2 [Josh Rosen] Update some comments
      983f200 [Josh Rosen] Use unescapeSQLString instead of stripQuotes
      6a06a8c [Josh Rosen] Clean up handling of quotes in serde class name
      494cde0 [Josh Rosen] Propagate TaskContext to writer thread
      323bb2b [Josh Rosen] Fix error-swallowing bug
      b31258d [Josh Rosen] Rename iterator variables to disambiguate.
      88278de [Josh Rosen] Split ScriptTransformation writer thread into own class.
      8b162b6 [Josh Rosen] Add failing test which demonstrates exception masking issue
      4ee36a2 [Josh Rosen] Kill script transform subprocess when error occurs in input writer.
      bd4c948 [Josh Rosen] Skip launching of external command for empty partitions.
      b43e4ec [Josh Rosen] Clean up nullability in ScriptTransformation
      fa18d26 [Josh Rosen] Add basic unit test for script transform with 'cat' command.
      59b92add
    • Davies Liu's avatar
      [SPARK-9247] [SQL] Use BytesToBytesMap for broadcast join · 21825529
      Davies Liu authored
      This PR introduce BytesToBytesMap to UnsafeHashedRelation, use it in executor for better performance.
      
      It serialize all the key and values from java HashMap, put them into a BytesToBytesMap while deserializing. All the values for a same key are stored continuous to have better memory locality.
      
      This PR also address the comments for #7480 , do some clean up.
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #7592 from davies/unsafe_map2 and squashes the following commits:
      
      42c578a [Davies Liu] Merge branch 'master' of github.com:apache/spark into unsafe_map2
      fd09528 [Davies Liu] remove thread local cache and update docs
      1c5ad8d [Davies Liu] fix test
      5eb1b5a [Davies Liu] address comments in #7480
      46f1f22 [Davies Liu] fix style
      fc221e0 [Davies Liu] use BytesToBytesMap for broadcast join
      21825529
    • MechCoder's avatar
      [SPARK-7105] [PYSPARK] [MLLIB] Support model save/load in GMM · 198d181d
      MechCoder authored
      This PR introduces save / load for GMM's in python API.
      
      Also I refactored `GaussianMixtureModel` and inherited it from `JavaModelWrapper` with model being `GaussianMixtureModelWrapper`, a wrapper which provides convenience methods to `GaussianMixtureModel` (due to serialization and deserialization issues) and I moved the creation of gaussians to the scala backend.
      
      Author: MechCoder <manojkumarsivaraj334@gmail.com>
      
      Closes #7617 from MechCoder/python_gmm_save_load and squashes the following commits:
      
      9c305aa [MechCoder] [SPARK-7105] [PySpark] [MLlib] Support model save/load in GMM
      198d181d
    • Joseph Batchik's avatar
      [SPARK-8003][SQL] Added virtual column support to Spark · b88b868e
      Joseph Batchik authored
      Added virtual column support by adding a new resolution role to the query analyzer. Additional virtual columns can be added by adding case expressions to [the new rule](https://github.com/JDrit/spark/blob/virt_columns/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala#L1026) and my modifying the [logical plan](https://github.com/JDrit/spark/blob/virt_columns/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala#L216) to resolve them.
      
      This also solves [SPARK-8003](https://issues.apache.org/jira/browse/SPARK-8003)
      
      This allows you to perform queries such as:
      ```sql
      select spark__partition__id, count(*) as c from table group by spark__partition__id;
      ```
      
      Author: Joseph Batchik <josephbatchik@gmail.com>
      Author: JD <jd@csh.rit.edu>
      
      Closes #7478 from JDrit/virt_columns and squashes the following commits:
      
      7932bf0 [Joseph Batchik] adding spark__partition__id to hive as well
      f8a9c6c [Joseph Batchik] merging in master
      e49da48 [JD] fixes for @rxin's suggestions
      60e120b [JD] fixing test in merge
      4bf8554 [JD] merging in master
      c68bc0f [Joseph Batchik] Adding function register ability to SQLContext and adding a function for spark__partition__id()
      b88b868e
    • Eric Liang's avatar
      [SPARK-9391] [ML] Support minus, dot, and intercept operators in SparkR RFormula · 8d5bb528
      Eric Liang authored
      Adds '.', '-', and intercept parsing to RFormula. Also splits RFormulaParser into a separate file.
      
      Umbrella design doc here: https://docs.google.com/document/d/10NZNSEurN2EdWM31uFYsgayIPfCFHiuIu3pCWrUmP_c/edit?usp=sharing
      
      mengxr
      
      Author: Eric Liang <ekl@databricks.com>
      
      Closes #7707 from ericl/string-features-2 and squashes the following commits:
      
      8588625 [Eric Liang] exclude complex types for .
      8106ffe [Eric Liang] comments
      a9350bb [Eric Liang] s/var/val
      9c50d4d [Eric Liang] Merge branch 'string-features' into string-features-2
      581afb2 [Eric Liang] Merge branch 'master' into string-features
      08ae539 [Eric Liang] Merge branch 'string-features' into string-features-2
      f99131a [Eric Liang] comments
      cecec43 [Eric Liang] Merge branch 'string-features' into string-features-2
      0bf3c26 [Eric Liang] update docs
      4592df2 [Eric Liang] intercept supports
      7412a2e [Eric Liang] Fri Jul 24 14:56:51 PDT 2015
      3cf848e [Eric Liang] fix the parser
      0556c2b [Eric Liang] Merge branch 'string-features' into string-features-2
      c302a2c [Eric Liang] fix tests
      9d1ac82 [Eric Liang] Merge remote-tracking branch 'upstream/master' into string-features
      e713da3 [Eric Liang] comments
      cd231a9 [Eric Liang] Wed Jul 22 17:18:44 PDT 2015
      4d79193 [Eric Liang] revert to seq + distinct
      169a085 [Eric Liang] tweak functional test
      a230a47 [Eric Liang] Merge branch 'master' into string-features
      72bd6f3 [Eric Liang] fix merge
      d841cec [Eric Liang] Merge branch 'master' into string-features
      5b2c4a2 [Eric Liang] Mon Jul 20 18:45:33 PDT 2015
      b01c7c5 [Eric Liang] add test
      8a637db [Eric Liang] encoder wip
      a1d03f4 [Eric Liang] refactor into estimator
      8d5bb528
Loading