You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by Juslwk <gi...@git.apache.org> on 2016/10/05 07:33:55 UTC

[GitHub] metamodel pull request #132: MSSQL datetime format language neutral

GitHub user Juslwk opened a pull request:

    https://github.com/apache/metamodel/pull/132

    MSSQL datetime format language neutral

    Currently, creating a date time condition filter, the format is hardcoded yyyy-MM-dd
    yyyy-MM-dd for US language setting
    yyyy-dd-MM for British settings
    yyyy-MMM-dd or yyyyMMdd for universal settings
    we would need to change the hardcoded part to yyyyMMdd or yyy-MMM-dd so that it would work on any language settings.


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

    $ git pull https://github.com/Juslwk/metamodel master

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

    https://github.com/apache/metamodel/pull/132.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 #132
    
----
commit 4301d461171d2e291f7eefcdae49d10788d5fdb9
Author: Juslwk <ju...@fusionex.local>
Date:   2016-10-05T07:31:18Z

    MSSQL datetime format language neutral
    
    yyyy-MM-dd for US language setting
    yyyy-dd-MM for British settings
    yyyyMMdd for universal settings

----


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    Ideally you would create another PR, but given the tiny nature of the change, I think this is probably OK.
    
    But I do have a question on it: Have you tested it? Is currency values in deed returned as double values? Do they properly aggregate in a MAX statement or similar? The code of it seems fine, but I would judge it based on integration test results.


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    OK cool, I will merge.


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    Hi, yes currency is returned as double. This is the documentation from salesforce:
    [Object Reference for Salesforce and Force.com - Currency](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/field_types.htm#i1435541)
    I've tested all the aggregation on our own program, connecting to Salesforce via metamodel, and looks good. I didn't do your integration test though.. I'm not sure why but my tests always fails at cassandra, saying it cant start up the server within the specified time, so most of the time I just skip tests and build, then test on our own program.


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    @LosD Thanks for testing the testWorkingWithDates for us, I'm glad I didnt break anything. 
    I don't know why Cassandra fails for me too. It fails on a clean fork as well! It also creates a .toDelete here.


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    For the salesforce change, should I have made a new pull request instead of merging with this? so sorry my mistake... I'm not so familiar with github... 
    Do I revert and then make a new branch on my github and then create a new pull request??


---
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] metamodel pull request #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132


---
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] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    The code looks good to me, but I did not verify on any actual DB. Anyone with a MS SQL db that could integration test 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.
---

[GitHub] metamodel issue #132: MSSQL datetime format language neutral

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

    https://github.com/apache/metamodel/pull/132
  
    I believe the integration tests @kaspersorensen is talking about are the one in the JDBC module which are configured by copying the `example-metamodel-integrationtest-configuration.properties` file to `~/metamodel-integrationtest-configuration.properties`, then uncommenting and configuring the `jdbc.sqlserver.` properties. Please note that you will need the AdventureWorks database.
    
    However, I wouldn't bother, unless you also feel like fixing the tests. There's failures relating to tables not being in the "correct" order in the schema, times being compared using exact string matches (SQL Server timestamps can change by +/- 3ms), and other failures<sup>1</sup>.
    
    The good news is that, testWorkingWithDates was happy when I tried, so I guess that means that your change didn't break anything.
    
    It's weird that Cassandra fails for you, by the way. My only issue is that the test dumps a `.toDelete` file in the Cassandra folder that I need to nuke for the license check to stay happy.
    
    <sup>1</sup> One of them might be a real issue, though. `new Query().select("Name")` fails with "Not capable of parsing SELECT token: Name") on line 185. Doesn't seem related to your change, 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.
---