You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by bomeng <gi...@git.apache.org> on 2016/03/22 22:50:23 UTC

[GitHub] spark pull request: remove the unnecessary logical operation

GitHub user bomeng opened a pull request:

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

    remove the unnecessary logical operation

    ## What changes were proposed in this pull request?
    
    This will remove the unnecessary logical operations in the codegen for Filter. 
    
    ## How was this patch tested?
    
    I have run the test cases to verify that it will get the same results as before and the codegen.
    
    
    


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

    $ git pull https://github.com/bomeng/spark SPARK-14080

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

    https://github.com/apache/spark/pull/11900.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 #11900
    
----

----


---
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: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200070782
  
    Either way, we shouldn't' do string manipulation on the generated code. If this is a problem, fix it somewhere else.



---
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: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by bomeng <gi...@git.apache.org>.
Github user bomeng commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200534783
  
    It would probably be cosmic issue and java compiler could optimize this redundancy away. Close 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.
---

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


[GitHub] spark pull request: [SPARK-14080] [SQL] remove the unnecessary log...

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

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


---
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: [SPARK-14080] [SQL] remove the unnecessary log...

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

    https://github.com/apache/spark/pull/11900#issuecomment-200047099
  
    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: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200535824
  
    Thanks!



---
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: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by bomeng <gi...@git.apache.org>.
Github user bomeng commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200064157
  
    for example, test("Test to check we can use Long.MinValue") in the SQLQuerySuite.scala: 
    ```
        checkAnswer(
          sql(s"SELECT key FROM testData WHERE key > ${Long.MinValue}"),
          (1 to 100).map(Row(_)).toSeq
        )
    
    It will generate the codes as (partially) :
    /* 060 */       boolean filter_isNull3 = filter_isNull4;
    /* 061 */       Decimal filter_value3 = null;
    /* 062 */       if (!filter_isNull4) {
    /* 063 */         Decimal filter_tmpDecimal1 = filter_value4.clone();
    /* 064 */         
    /* 065 */         if (filter_tmpDecimal1.changePrecision(19, 0)) {
    /* 066 */           filter_value3 = filter_tmpDecimal1;
    /* 067 */         } else {
    /* 068 */           filter_isNull3 = true;
    /* 069 */         }
    /* 070 */         
    /* 071 */       }
    /* 072 */       if (!(!(filter_isNull3))) continue;
    /* 073 */       
    /* 074 */       /* (cast(cast(input[0, int] as decimal(10,0)) as decimal(19,0)) > -9223372036854775808) */
    /* 075 */       boolean filter_isNull6 = true;
    /* 076 */       boolean filter_value6 = false;
    /* 077 */       /* cast(cast(input[0, int] as decimal(10,0)) as decimal(19,0)) */
    /* 078 */       /* cast(input[0, int] as decimal(10,0)) */
    /* 079 */       boolean filter_isNull8 = false;
    /* 080 */       Decimal filter_value8 = null;
    
    See line 072. There are also bunch of similar test cases in SQLQuerySuite.scala will generate 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 pull request: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200060731
  
    What's the query? It's really weird to do this with string manipulation.



---
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: [SPARK-14080] [SQL] remove the unnecessary log...

Posted by bomeng <gi...@git.apache.org>.
Github user bomeng commented on the pull request:

    https://github.com/apache/spark/pull/11900#issuecomment-200067181
  
    Other test cases generate this issue in SQLQuerySuite.scala:
      test("SPARK-11303: filter should not be pushed down into sample")
      test("SPARK-3173 Timestamp support in the parser") 
    



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