Skip to content
Snippets Groups Projects
  1. Jun 23, 2017
    • Xiao Li's avatar
      [SPARK-21164][SQL] Remove isTableSample from Sample and isGenerated from Alias... · 03eb6117
      Xiao Li authored
      [SPARK-21164][SQL] Remove isTableSample from Sample and isGenerated from Alias and AttributeReference
      
      ## What changes were proposed in this pull request?
      `isTableSample` and `isGenerated ` were introduced for SQL Generation respectively by https://github.com/apache/spark/pull/11148 and https://github.com/apache/spark/pull/11050
      
      Since SQL Generation is removed, we do not need to keep `isTableSample`.
      
      ## How was this patch tested?
      The existing test cases
      
      Author: Xiao Li <gatorsmile@gmail.com>
      
      Closes #18379 from gatorsmile/CleanSample.
      03eb6117
    • Dilip Biswal's avatar
      [SPARK-20417][SQL] Move subquery error handling to checkAnalysis from Analyzer · 13c2a4f2
      Dilip Biswal authored
      ## What changes were proposed in this pull request?
      Currently we do a lot of validations for subquery in the Analyzer. We should move them to CheckAnalysis which is the framework to catch and report Analysis errors. This was mentioned as a review comment in SPARK-18874.
      
      ## How was this patch tested?
      Exists tests + A few tests added to SQLQueryTestSuite.
      
      Author: Dilip Biswal <dbiswal@us.ibm.com>
      
      Closes #17713 from dilipbiswal/subquery_checkanalysis.
      13c2a4f2
    • Ong Ming Yang's avatar
      [MINOR][DOCS] Docs in DataFrameNaFunctions.scala use wrong method · 4cc62951
      Ong Ming Yang authored
      ## What changes were proposed in this pull request?
      
      * Following the first few examples in this file, the remaining methods should also be methods of `df.na` not `df`.
      * Filled in some missing parentheses
      
      ## How was this patch tested?
      
      N/A
      
      Author: Ong Ming Yang <me@ongmingyang.com>
      
      Closes #18398 from ongmingyang/master.
      4cc62951
    • Tathagata Das's avatar
      [SPARK-21192][SS] Preserve State Store provider class configuration across StreamingQuery restarts · 2ebd0838
      Tathagata Das authored
      ## What changes were proposed in this pull request?
      
      If the SQL conf for StateStore provider class is changed between restarts (i.e. query started with providerClass1 and attempted to restart using providerClass2), then the query will fail in a unpredictable way as files saved by one provider class cannot be used by the newer one.
      
      Ideally, the provider class used to start the query should be used to restart the query, and the configuration in the session where it is being restarted should be ignored.
      
      This PR saves the provider class config to OffsetSeqLog, in the same way # shuffle partitions is saved and recovered.
      
      ## How was this patch tested?
      new unit tests
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #18402 from tdas/SPARK-21192.
      2ebd0838
    • wangzhenhua's avatar
      [SPARK-21180][SQL] Remove conf from stats functions since now we have conf in LogicalPlan · b803b66a
      wangzhenhua authored
      ## What changes were proposed in this pull request?
      
      After wiring `SQLConf` in logical plan ([PR 18299](https://github.com/apache/spark/pull/18299)), we can remove the need of passing `conf` into `def stats` and `def computeStats`.
      
      ## How was this patch tested?
      
      Covered by existing tests, plus some modified existing tests.
      
      Author: wangzhenhua <wangzhenhua@huawei.com>
      Author: Zhenhua Wang <wzh_zju@163.com>
      
      Closes #18391 from wzhfy/removeConf.
      b803b66a
    • Takeshi Yamamuro's avatar
      [SPARK-21144][SQL] Print a warning if the data schema and partition schema... · f3dea607
      Takeshi Yamamuro authored
      [SPARK-21144][SQL] Print a warning if the data schema and partition schema have the duplicate columns
      
      ## What changes were proposed in this pull request?
      The current master outputs unexpected results when the data schema and partition schema have the duplicate columns:
      ```
      withTempPath { dir =>
        val basePath = dir.getCanonicalPath
        spark.range(0, 3).toDF("foo").write.parquet(new Path(basePath, "foo=1").toString)
        spark.range(0, 3).toDF("foo").write.parquet(new Path(basePath, "foo=a").toString)
        spark.read.parquet(basePath).show()
      }
      
      +---+
      |foo|
      +---+
      |  1|
      |  1|
      |  a|
      |  a|
      |  1|
      |  a|
      +---+
      ```
      This patch added code to print a warning when the duplication found.
      
      ## How was this patch tested?
      Manually checked.
      
      Author: Takeshi Yamamuro <yamamuro@apache.org>
      
      Closes #18375 from maropu/SPARK-21144-3.
      f3dea607
    • jinxing's avatar
      [SPARK-21047] Add test suites for complicated cases in ColumnarBatchSuite · 153dd49b
      jinxing authored
      ## What changes were proposed in this pull request?
      Current ColumnarBatchSuite has very simple test cases for `Array` and `Struct`. This pr wants to add  some test suites for complicated cases in ColumnVector.
      
      Author: jinxing <jinxing6042@126.com>
      
      Closes #18327 from jinxing64/SPARK-21047.
      153dd49b
    • Tathagata Das's avatar
      [SPARK-21145][SS] Added StateStoreProviderId with queryRunId to reload... · fe24634d
      Tathagata Das authored
      [SPARK-21145][SS] Added StateStoreProviderId with queryRunId to reload StateStoreProviders when query is restarted
      
      ## What changes were proposed in this pull request?
      StateStoreProvider instances are loaded on-demand in a executor when a query is started. When a query is restarted, the loaded provider instance will get reused. Now, there is a non-trivial chance, that the task of the previous query run is still running, while the tasks of the restarted run has started. So for a stateful partition, there may be two concurrent tasks related to the same stateful partition, and there for using the same provider instance. This can lead to inconsistent results and possibly random failures, as state store implementations are not designed to be thread-safe.
      
      To fix this, I have introduced a `StateStoreProviderId`, that unique identifies a provider loaded in an executor. It has the query run id in it, thus making sure that restarted queries will force the executor to load a new provider instance, thus avoiding two concurrent tasks (from two different runs) from reusing the same provider instance.
      
      Additional minor bug fixes
      - All state stores related to query run is marked as deactivated in the `StateStoreCoordinator` so that the executors can unload them and clear resources.
      - Moved the code that determined the checkpoint directory of a state store from implementation-specific code (`HDFSBackedStateStoreProvider`) to non-specific code (StateStoreId), so that implementation do not accidentally get it wrong.
        - Also added store name to the path, to support multiple stores per sql operator partition.
      
      *Note:* This change does not address the scenario where two tasks of the same run (e.g. speculative tasks) are concurrently running in the same executor. The chance of this very small, because ideally speculative tasks should never run in the same executor.
      
      ## How was this patch tested?
      Existing unit tests + new unit test.
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #18355 from tdas/SPARK-21145.
      fe24634d
  2. Jun 22, 2017
    • Wang Gengliang's avatar
      [SPARK-21174][SQL] Validate sampling fraction in logical operator level · b8a743b6
      Wang Gengliang authored
      ## What changes were proposed in this pull request?
      
      Currently the validation of sampling fraction in dataset is incomplete.
      As an improvement, validate sampling fraction in logical operator level:
      1) if with replacement: fraction should be nonnegative
      2) else: fraction should be on interval [0, 1]
      Also add test cases for the validation.
      
      ## How was this patch tested?
      integration tests
      
      gatorsmile cloud-fan
      Please review http://spark.apache.org/contributing.html before opening a pull request.
      
      Author: Wang Gengliang <ltnwgl@gmail.com>
      
      Closes #18387 from gengliangwang/sample_ratio_validate.
      b8a743b6
    • Bryan Cutler's avatar
      [SPARK-13534][PYSPARK] Using Apache Arrow to increase performance of DataFrame.toPandas · e4469760
      Bryan Cutler authored
      ## What changes were proposed in this pull request?
      Integrate Apache Arrow with Spark to increase performance of `DataFrame.toPandas`.  This has been done by using Arrow to convert data partitions on the executor JVM to Arrow payload byte arrays where they are then served to the Python process.  The Python DataFrame can then collect the Arrow payloads where they are combined and converted to a Pandas DataFrame.  All non-complex data types are currently supported, otherwise an `UnsupportedOperation` exception is thrown.
      
      Additions to Spark include a Scala package private method `Dataset.toArrowPayloadBytes` that will convert data partitions in the executor JVM to `ArrowPayload`s as byte arrays so they can be easily served.  A package private class/object `ArrowConverters` that provide data type mappings and conversion routines.  In Python, a public method `DataFrame.collectAsArrow` is added to collect Arrow payloads and an optional flag in `toPandas(useArrow=False)` to enable using Arrow (uses the old conversion by default).
      
      ## How was this patch tested?
      Added a new test suite `ArrowConvertersSuite` that will run tests on conversion of Datasets to Arrow payloads for supported types.  The suite will generate a Dataset and matching Arrow JSON data, then the dataset is converted to an Arrow payload and finally validated against the JSON data.  This will ensure that the schema and data has been converted correctly.
      
      Added PySpark tests to verify the `toPandas` method is producing equal DataFrames with and without pyarrow.  A roundtrip test to ensure the pandas DataFrame produced by pyspark is equal to a one made directly with pandas.
      
      Author: Bryan Cutler <cutlerb@gmail.com>
      Author: Li Jin <ice.xelloss@gmail.com>
      Author: Li Jin <li.jin@twosigma.com>
      Author: Wes McKinney <wes.mckinney@twosigma.com>
      
      Closes #15821 from BryanCutler/wip-toPandas_with_arrow-SPARK-13534.
      e4469760
    • Lubo Zhang's avatar
      [SPARK-20599][SS] ConsoleSink should work with (batch) · e55a105a
      Lubo Zhang authored
      ## What changes were proposed in this pull request?
      
      Currently, if we read a batch and want to display it on the console sink, it will lead a runtime exception.
      
      Changes:
      
      - In this PR, we add a match rule to check whether it is a ConsoleSinkProvider, we will display the Dataset
       if using console format.
      
      ## How was this patch tested?
      
      spark.read.schema().json(path).write.format("console").save
      
      Author: Lubo Zhang <lubo.zhang@intel.com>
      Author: lubozhan <lubo.zhang@intel.com>
      
      Closes #18347 from lubozhan/dev.
      e55a105a
    • actuaryzhang's avatar
      [SQL][DOC] Fix documentation of lpad · 97b307c8
      actuaryzhang authored
      ## What changes were proposed in this pull request?
      Fix incomplete documentation for `lpad`.
      
      Author: actuaryzhang <actuaryzhang10@gmail.com>
      
      Closes #18367 from actuaryzhang/SQLDoc.
      97b307c8
    • Shixiong Zhu's avatar
      [SPARK-21167][SS] Decode the path generated by File sink to handle special characters · d66b143e
      Shixiong Zhu authored
      ## What changes were proposed in this pull request?
      
      Decode the path generated by File sink to handle special characters.
      
      ## How was this patch tested?
      
      The added unit test.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #18381 from zsxwing/SPARK-21167.
      d66b143e
  3. Jun 21, 2017
    • hyukjinkwon's avatar
      [SPARK-21147][SS] Throws an analysis exception when a user-specified schema is... · 7a00c658
      hyukjinkwon authored
      [SPARK-21147][SS] Throws an analysis exception when a user-specified schema is given in socket/rate sources
      
      ## What changes were proposed in this pull request?
      
      This PR proposes to throw an exception if a schema is provided by user to socket source as below:
      
      **socket source**
      
      ```scala
      import org.apache.spark.sql.types._
      
      val userSpecifiedSchema = StructType(
        StructField("name", StringType) ::
        StructField("area", StringType) :: Nil)
      val df = spark.readStream.format("socket").option("host", "localhost").option("port", 9999).schema(userSpecifiedSchema).load
      df.printSchema
      ```
      
      Before
      
      ```
      root
       |-- value: string (nullable = true)
      ```
      
      After
      
      ```
      org.apache.spark.sql.AnalysisException: The socket source does not support a user-specified schema.;
        at org.apache.spark.sql.execution.streaming.TextSocketSourceProvider.sourceSchema(socket.scala:199)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceSchema(DataSource.scala:192)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo$lzycompute(DataSource.scala:87)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo(DataSource.scala:87)
        at org.apache.spark.sql.execution.streaming.StreamingRelation$.apply(StreamingRelation.scala:30)
        at org.apache.spark.sql.streaming.DataStreamReader.load(DataStreamReader.scala:150)
        ... 50 elided
      ```
      
      **rate source**
      
      ```scala
      spark.readStream.format("rate").schema(spark.range(1).schema).load().printSchema()
      ```
      
      Before
      
      ```
      root
       |-- timestamp: timestamp (nullable = true)
       |-- value: long (nullable = true)`
      ```
      
      After
      
      ```
      org.apache.spark.sql.AnalysisException: The rate source does not support a user-specified schema.;
        at org.apache.spark.sql.execution.streaming.RateSourceProvider.sourceSchema(RateSourceProvider.scala:57)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceSchema(DataSource.scala:192)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo$lzycompute(DataSource.scala:87)
        at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo(DataSource.scala:87)
        at org.apache.spark.sql.execution.streaming.StreamingRelation$.apply(StreamingRelation.scala:30)
        at org.apache.spark.sql.streaming.DataStreamReader.load(DataStreamReader.scala:150)
        ... 48 elided
      ```
      
      ## How was this patch tested?
      
      Unit test in `TextSocketStreamSuite` and `RateSourceSuite`.
      
      Author: hyukjinkwon <gurwls223@gmail.com>
      
      Closes #18365 from HyukjinKwon/SPARK-21147.
      7a00c658
    • Xingbo Jiang's avatar
      [SPARK-17851][SQL][TESTS] Make sure all test sqls in catalyst pass checkAnalysis · cad88f17
      Xingbo Jiang authored
      ## What changes were proposed in this pull request?
      
      Currently we have several tens of test sqls in catalyst will fail at `SimpleAnalyzer.checkAnalysis`, we should make sure they are valid.
      
      This PR makes the following changes:
      1. Apply `checkAnalysis` on plans that tests `Optimizer` rules, but don't require the testcases for `Parser`/`Analyzer` pass `checkAnalysis`;
      2. Fix testcases for `Optimizer` that would have fall.
      ## How was this patch tested?
      
      Apply `SimpleAnalyzer.checkAnalysis` on plans in `PlanTest.comparePlans`, update invalid test cases.
      
      Author: Xingbo Jiang <xingbo.jiang@databricks.com>
      Author: jiangxingbo <jiangxb1987@gmail.com>
      
      Closes #15417 from jiangxb1987/cptest.
      cad88f17
    • Marcos P's avatar
      [MINOR][DOC] modified issue link and updated status · e92befcb
      Marcos P authored
      ## What changes were proposed in this pull request?
      
      This PR aims to clarify some outdated comments that i found at **spark-catalyst** and **spark-sql** pom files. Maven bug still happening and in order to track it I have updated the issue link and also the status of the issue.
      
      Author: Marcos P <mpenate@stratio.com>
      
      Closes #18374 from mpenate/fix/mng-3559-comment.
      e92befcb
    • sureshthalamati's avatar
      [SPARK-10655][SQL] Adding additional data type mappings to jdbc DB2dialect. · 9ce714dc
      sureshthalamati authored
      This patch adds DB2 specific data type mappings for decfloat, real, xml , and timestamp with time zone (DB2Z specific type)  types on read and for byte, short data types  on write to the to jdbc data source DB2 dialect. Default mapping does not work for these types when reading/writing from DB2 database.
      
      Added docker test, and a JDBC unit test case.
      
      Author: sureshthalamati <suresh.thalamati@gmail.com>
      
      Closes #9162 from sureshthalamati/db2dialect_enhancements-spark-10655.
      9ce714dc
  4. Jun 20, 2017
    • Reynold Xin's avatar
      [SPARK-21103][SQL] QueryPlanConstraints should be part of LogicalPlan · b6b10882
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      QueryPlanConstraints should be part of LogicalPlan, rather than QueryPlan, since the constraint framework is only used for query plan rewriting and not for physical planning.
      
      ## How was this patch tested?
      Should be covered by existing tests, since it is a simple refactoring.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #18310 from rxin/SPARK-21103.
      b6b10882
    • Wenchen Fan's avatar
      [SPARK-21150][SQL] Persistent view stored in Hive metastore should be case preserving · e862dc90
      Wenchen Fan authored
      ## What changes were proposed in this pull request?
      
      This is a regression in Spark 2.2. In Spark 2.2, we introduced a new way to resolve persisted view: https://issues.apache.org/jira/browse/SPARK-18209 , but this makes the persisted view non case-preserving because we store the schema in hive metastore directly. We should follow data source table and store schema in table properties.
      
      ## How was this patch tested?
      
      new regression test
      
      Author: Wenchen Fan <wenchen@databricks.com>
      
      Closes #18360 from cloud-fan/view.
      e862dc90
  5. Jun 19, 2017
    • Xianyang Liu's avatar
      [MINOR] Fix some typo of the document · 0a4b7e4f
      Xianyang Liu authored
      ## What changes were proposed in this pull request?
      
      Fix some typo of the document.
      
      ## How was this patch tested?
      
      Existing tests.
      
      Please review http://spark.apache.org/contributing.html before opening a pull request.
      
      Author: Xianyang Liu <xianyang.liu@intel.com>
      
      Closes #18350 from ConeyLiu/fixtypo.
      0a4b7e4f
    • Dongjoon Hyun's avatar
      [MINOR][BUILD] Fix Java linter errors · ecc56313
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      This PR cleans up a few Java linter errors for Apache Spark 2.2 release.
      
      ## How was this patch tested?
      
      ```bash
      $ dev/lint-java
      Using `mvn` from path: /usr/local/bin/mvn
      Checkstyle checks passed.
      ```
      
      We can check the result at Travis CI, [here](https://travis-ci.org/dongjoon-hyun/spark/builds/244297894).
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #18345 from dongjoon-hyun/fix_lint_java_2.
      ecc56313
    • Yong Tang's avatar
      [SPARK-19975][PYTHON][SQL] Add map_keys and map_values functions to Python · e5387018
      Yong Tang authored
      ## What changes were proposed in this pull request?
      
      This fix tries to address the issue in SPARK-19975 where we
      have `map_keys` and `map_values` functions in SQL yet there
      is no Python equivalent functions.
      
      This fix adds `map_keys` and `map_values` functions to Python.
      
      ## How was this patch tested?
      
      This fix is tested manually (See Python docs for examples).
      
      Author: Yong Tang <yong.tang.github@outlook.com>
      
      Closes #17328 from yongtang/SPARK-19975.
      e5387018
    • Xiao Li's avatar
      [SPARK-21132][SQL] DISTINCT modifier of function arguments should not be silently ignored · 9413b84b
      Xiao Li authored
      ### What changes were proposed in this pull request?
      We should not silently ignore `DISTINCT` when they are not supported in the function arguments. This PR is to block these cases and issue the error messages.
      
      ### How was this patch tested?
      Added test cases for both regular functions and window functions
      
      Author: Xiao Li <gatorsmile@gmail.com>
      
      Closes #18340 from gatorsmile/firstCount.
      9413b84b
  6. Jun 18, 2017
  7. Jun 16, 2017
  8. Jun 15, 2017
    • Xianyang Liu's avatar
      [SPARK-21072][SQL] TreeNode.mapChildren should only apply to the children node. · 87ab0cec
      Xianyang Liu authored
      ## What changes were proposed in this pull request?
      
      Just as the function name and comments of `TreeNode.mapChildren` mentioned, the function should be apply to all currently node children. So, the follow code should judge whether it is the children node.
      
      https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala#L342
      
      ## How was this patch tested?
      
      Existing tests.
      
      Author: Xianyang Liu <xianyang.liu@intel.com>
      
      Closes #18284 from ConeyLiu/treenode.
      87ab0cec
    • Xiao Li's avatar
      [SPARK-21112][SQL] ALTER TABLE SET TBLPROPERTIES should not overwrite COMMENT · 5d35d5c1
      Xiao Li authored
      ### What changes were proposed in this pull request?
      `ALTER TABLE SET TBLPROPERTIES` should not overwrite `COMMENT` even if the input property does not have the property of `COMMENT`. This PR is to fix the issue.
      
      ### How was this patch tested?
      Covered by the existing tests.
      
      Author: Xiao Li <gatorsmile@gmail.com>
      
      Closes #18318 from gatorsmile/fixTableComment.
      5d35d5c1
    • ALeksander Eskilson's avatar
      [SPARK-18016][SQL][CATALYST] Code Generation: Constant Pool Limit - Class Splitting · b32b2123
      ALeksander Eskilson authored
      ## What changes were proposed in this pull request?
      
      This pull-request exclusively includes the class splitting feature described in #16648. When code for a given class would grow beyond 1600k bytes, a private, nested sub-class is generated into which subsequent functions are inlined. Additional sub-classes are generated as the code threshold is met subsequent times. This code includes 3 changes:
      
      1. Includes helper maps, lists, and functions for keeping track of sub-classes during code generation (included in the `CodeGenerator` class). These helper functions allow nested classes and split functions to be initialized/declared/inlined to the appropriate locations in the various projection classes.
      2. Changes `addNewFunction` to return a string to support instances where a split function is inlined to a nested class and not the outer class (and so must be invoked using the class-qualified name). Uses of `addNewFunction` throughout the codebase are modified so that the returned name is properly used.
      3. Removes instances of the `this` keyword when used on data inside generated classes. All state declared in the outer class is by default global and accessible to the nested classes. However, if a reference to global state in a nested class is prepended with the `this` keyword, it would attempt to reference state belonging to the nested class (which would not exist), rather than the correct variable belonging to the outer class.
      
      ## How was this patch tested?
      
      Added a test case to the `GeneratedProjectionSuite` that increases the number of columns tested in various projections to a threshold that would previously have triggered a `JaninoRuntimeException` for the Constant Pool.
      
      Note: This PR does not address the second Constant Pool issue with code generation (also mentioned in #16648): excess global mutable state. A second PR may be opened to resolve that issue.
      
      Author: ALeksander Eskilson <alek.eskilson@cerner.com>
      
      Closes #18075 from bdrillard/class_splitting_only.
      b32b2123
    • Xiao Li's avatar
      [SPARK-20980][SQL] Rename `wholeFile` to `multiLine` for both CSV and JSON · 20514281
      Xiao Li authored
      ### What changes were proposed in this pull request?
      The current option name `wholeFile` is misleading for CSV users. Currently, it is not representing a record per file. Actually, one file could have multiple records. Thus, we should rename it. Now, the proposal is `multiLine`.
      
      ### How was this patch tested?
      N/A
      
      Author: Xiao Li <gatorsmile@gmail.com>
      
      Closes #18202 from gatorsmile/renameCVSOption.
      20514281
    • Reynold Xin's avatar
      [SPARK-21092][SQL] Wire SQLConf in logical plan and expressions · fffeb6d7
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      It is really painful to not have configs in logical plan and expressions. We had to add all sorts of hacks (e.g. pass SQLConf explicitly in functions). This patch exposes SQLConf in logical plan, using a thread local variable and a getter closure that's set once there is an active SparkSession.
      
      The implementation is a bit of a hack, since we didn't anticipate this need in the beginning (config was only exposed in physical plan). The implementation is described in `SQLConf.get`.
      
      In terms of future work, we should follow up to clean up CBO (remove the need for passing in config).
      
      ## How was this patch tested?
      Updated relevant tests for constraint propagation.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #18299 from rxin/SPARK-21092.
      fffeb6d7
  9. Jun 14, 2017
  10. Jun 13, 2017
    • lianhuiwang's avatar
      [SPARK-20986][SQL] Reset table's statistics after PruneFileSourcePartitions rule. · 8b5b2e27
      lianhuiwang authored
      ## What changes were proposed in this pull request?
      After PruneFileSourcePartitions rule, It needs reset table's statistics because PruneFileSourcePartitions can filter some unnecessary partitions. So the statistics need to be changed.
      
      ## How was this patch tested?
      add unit test.
      
      Author: lianhuiwang <lianhuiwang09@gmail.com>
      
      Closes #18205 from lianhuiwang/SPARK-20986.
      8b5b2e27
    • liuxian's avatar
      [SPARK-21016][CORE] Improve code fault tolerance for converting string to number · 7ba8bf28
      liuxian authored
      ## What changes were proposed in this pull request?
      When converting `string` to `number`(int, long or double),  if the string has a space before or after,will lead to unnecessary mistakes.
      
      ## How was this patch tested?
      unit test
      
      Author: liuxian <liu.xian3@zte.com.cn>
      
      Closes #18238 from 10110346/lx-wip-0608.
      7ba8bf28
Loading