You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Peilin-Yang <gi...@git.apache.org> on 2016/08/25 17:35:31 UTC

[GitHub] zeppelin pull request #1363: [ZEPPELIN-1371]add text/numeric conversion supp...

GitHub user Peilin-Yang opened a pull request:

    https://github.com/apache/zeppelin/pull/1363

    [ZEPPELIN-1371]add text/numeric conversion support to table display

    ### What is this PR for?
    We people in Twitter have great demand of adding a flexible drop down menu for the columns in the tables which enables the text/numeric conversion.
    This is because people want some columns to be of string type which, for example, fits to the underlying DB definition.
    
    
    ### What type of PR is it?
    [Improvement | Feature]
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1371
    
    ### How should this be tested?
    
    1. Click on the dropdown menu would convert the text/number of that column.
    2. Other functionalities esp. the sorting function should not be affected.
    
    ### Screenshots (if appropriate)
    https://drive.google.com/a/twitter.com/file/d/0B9QN74Rceec8djV6UXpUeFNyUWM/view?ts=57bf2c11
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? Probably a noticeable change in UI
    * Does this needs documentation? No
    


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

    $ git pull https://github.com/Peilin-Yang/zeppelin ypeilin/table_num_cell_format

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

    https://github.com/apache/zeppelin/pull/1363.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 #1363
    
----
commit b92e92ff8821a58c47d7510818ec518414499c83
Author: Peilin Yang <pe...@twitter.com>
Date:   2016-08-25T17:06:23Z

    add text/numeric conversion support to table display

----


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug I just found that Handsontable has its intrinsic data type detection/conversion which we can rely on for the type conversion and is thus safer. More details at http://docs.handsontable.com/0.28.0/Options.html#type 
    I think it is more convenient to this and make the data type on column basis so we do not worry about each individual cell.
    With the dropdown menu we provide users are more aware of the fact that the data type is based on column, not the cell.
    Does this make any sense?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug I have trouble with the rebase:( ... can you help a little bit?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug merged your PR.
    Do you think now it is the good time to merge this one?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @bzz I agree


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang Very useful feature!!
    let me know if i can help in taking this PR forward


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    Well, consider it alone, yes it is.


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    So cool - this should solve sorting issue for numeric columns! Thank you @Peilin-Yang!
    
    One question - do you guys think it could be possible to detect numeric columns automatically using some heuristics and apply proper renderer on table creation time, rather than make user choose? 


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug thanks for your advice!
    I updated the contents of PR so that it includes the use cases of this change.
    Please let me know whether they make any sense.


---
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.
---

[GitHub] zeppelin pull request #1363: [ZEPPELIN-1371]add text/numeric conversion supp...

Posted by Peilin-Yang <gi...@git.apache.org>.
GitHub user Peilin-Yang reopened a pull request:

    https://github.com/apache/zeppelin/pull/1363

    [ZEPPELIN-1371]add text/numeric conversion support to table display

    ### What is this PR for?
    We people in Twitter have great demand of adding a flexible drop down menu for the columns in the tables which enables the text/numeric conversion.
    This is because people want some columns to be of string type which, for example, fits to the underlying DB definition.
    
    
    ### What type of PR is it?
    [Improvement | Feature]
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1371
    
    ### How should this be tested?
    
    1. Click on the dropdown menu would convert the text/number of that column.
    2. Other functionalities esp. the sorting function should not be affected.
    
    ### Screenshots (if appropriate)
    https://drive.google.com/a/twitter.com/file/d/0B9QN74Rceec8djV6UXpUeFNyUWM/view?ts=57bf2c11
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? Probably a noticeable change in UI
    * Does this needs documentation? No
    


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

    $ git pull https://github.com/Peilin-Yang/zeppelin ypeilin/table_num_cell_format

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

    https://github.com/apache/zeppelin/pull/1363.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 #1363
    
----
commit b92e92ff8821a58c47d7510818ec518414499c83
Author: Peilin Yang <pe...@twitter.com>
Date:   2016-08-25T17:06:23Z

    add text/numeric conversion support to table display

----


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    Let's merge #1371 first, and then it makes perfect sense to adjust this one to match user expectations of sorting changes according to column type (so it lets user override auto-detection). 
    
    @corneadoug what do you think?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    I made several changes for this commit:
    
    1. put the style from notebook.css to paragraph.css
    2. do not make any assumption/auto-detection of the original type of the data. Basically I drop the changes made in #1371 
    3.  now the data type is column based. I added the validators for numbers and dates. Cells that fail to be converted to the required type will be shown with red background.
    
     


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang I tested this PR and found one bug.
    * Change a column that wouldn't order properly to Numerical type (balance in bank table for example)
    * Order that column in descending order
    * Switch the graph type (let's say bar chart)
    * Switch Back to Table Viz
    * The previous column still has the Numerical type, however if you try ordering again, it won't order properly


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    Go it! It would be really nice to have such defaults for numbers, that make them sort numerically.
    
    As for letting user change it - it sounds good, am it looks like the main use case for it is basically, removing commas? 


---
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.
---

[GitHub] zeppelin pull request #1363: [ZEPPELIN-1371]add text/numeric conversion supp...

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

    https://github.com/apache/zeppelin/pull/1363


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug I have fixed the bug you mentioned. Testing was done and it seems ok.


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    Added another PR #1371 that may have impact on this one.
    i.e. if you guys think that one is reasonable then this one should be adjusted so that when user changes the datatype of the column the sorting order is changing at the same time.


---
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.
---

[GitHub] zeppelin pull request #1363: [ZEPPELIN-1371]add text/numeric conversion supp...

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

    https://github.com/apache/zeppelin/pull/1363


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang Yes, you will need to rebase first though


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang Thanks for the contribution.
    Small tip: Instead of hosting your screenshot, you can drop the image directly in the input of the PR description and the image will be hosted by github and shown.
    
    Could you add more information on what is the benefit of changing the text/numeric conversion?
    There is no example on what is happening when you actually switch the type and why it is useful.


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang Thanks for the ping, I will look into that.
    Any specific reason to drop #1371?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @Peilin-Yang Actually it's a bit hard for me to help since I can't rebase for you (Don't have the rights on your branch), but I can see that it is a pretty messy conflict you got.
    
    For the Rebase process, you need to do a:
    ```
    git fetch apache-github
    git rebase apache-github/master
    ```
    (apache-github being a remote for this official repo)
    
    At the first round of conflicts on `paragraph.controller.js`, I would advise to copy paste the file from master, and replace your local file with conflict with it.
    Then to copy paste the changes of your first commit into it (you can see the first commit diff [Here](https://github.com/apache/zeppelin/pull/1492/commits/b92e92ff8821a58c47d7510818ec518414499c83))
    
    After that first round, the other conflicts should be easier


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @bzz Actually I am currently look into that and I think it is possible because numbers are automatically detected and that is why the commas are inserted.
    But I think even we could have the initial sorting for numbers it is still nice to let the users change it on the fly.


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    @corneadoug can we get this reviewed?


---
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.
---

[GitHub] zeppelin issue #1363: [ZEPPELIN-1371]add text/numeric conversion support to ...

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

    https://github.com/apache/zeppelin/pull/1363
  
    Let's try to rebase this one, and review it


---
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.
---