You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by lalinsky <gi...@git.apache.org> on 2016/08/10 14:45:56 UTC

[GitHub] spark pull request #14582: [SPARK-16997][SQL] Allow loading of JSON float va...

GitHub user lalinsky opened a pull request:

    https://github.com/apache/spark/pull/14582

    [SPARK-16997][SQL] Allow loading of JSON float values as TimestampType

    ## What changes were proposed in this pull request?
    
    This allows loading JSON like `{"ts": 1470840303.636409}` directly to a `TimestampType` field, without going through `DoubleType` and then casting it to `TimestampType`.
    
    ## How was this patch tested?
    
    Ran the relevant unit tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/exponea/spark SPARK-16997-json-float-timestamp

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14582.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14582
    
----
commit 4bcb043844af946404609627b798bea3cbdf4662
Author: Luk�\u0161 Lalinsk� <lu...@exponea.com>
Date:   2016-08-10T14:43:07Z

    [SPARK-16997][SQL] Allow loading of JSON float values as TimestampType

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    We could ask it to mailing-list if you strongly feel about this. For example, `from_json` function was also asked too to mailing list before getting merged.
    
    I think we should not add all the variants just for consistency and this is why I asked more interests. There are many variants for language-specific and application-specific and I usually stay against if there is an easy workaround and looks a kind of variant.
    
    I wouldn't stay against if there are more demands or interests for this. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by lalinsky <gi...@git.apache.org>.
Github user lalinsky commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    You were asking for more interest in the feature, there was no way I could answer that. :)
    
    Regarding the change itself, the system can already auto cast integer to a timestamp, but not a floating point number. Floating number timestamps are pretty common in a Python ecosystem, more so than integer ones. From my point of view, that's an inconsistent and surprising behavior, that I wanted to correct. I wouldn't send the patch if it didn't work for any number, but having it done for just one number type seemed wrong to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    Change itself looks simple but adding the behaviour is a different story. It introduces another code path to convert a data to timestamp. I simply suggested to close only because this looks inactive without an answer to my review comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by lalinsky <gi...@git.apache.org>.
Github user lalinsky commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    To me this looked like a simple change that would make Spark better, but I have closed the PR as requested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    @lalinsky is it still active? I would rather like to propose to close this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    I think it is easy to work around as you described in the JIRA. We can simply load and cast. I think we should consider this feature later if there are more demands or interests for this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14582: [SPARK-16997][SQL] Allow loading of JSON float va...

Posted by lalinsky <gi...@git.apache.org>.
Github user lalinsky closed the pull request at:

    https://github.com/apache/spark/pull/14582


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14582: [SPARK-16997][SQL] Allow loading of JSON float values as...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14582
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org