You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by wuchong <gi...@git.apache.org> on 2016/08/15 06:04:04 UTC

[GitHub] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

GitHub user wuchong opened a pull request:

    https://github.com/apache/flink/pull/2372

    [FLINK-4281] [table] Wrap all Calcite Exceptions in Flink Exceptions

    Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your changes.
    
    - [x] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [x] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed
    
    Wrap all calcite exceptions to Flink Exceptions in `FlinkPlannerImpl`. I can't find other exceptions thrown by Calcite, if any I will wrap it later.


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

    $ git pull https://github.com/wuchong/flink FLINK-4281

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

    https://github.com/apache/flink/pull/2372.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 #2372
    
----
commit 4c233c0d3847a8a484ef34aee703c61c159c69c5
Author: Jark Wu <wu...@alibaba-inc.com>
Date:   2016-08-15T05:54:09Z

    [FLINK-4281] [table] Wrap all Calcite Exceptions in Flink Exceptions

----


---
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] flink issue #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions in Flink...

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

    https://github.com/apache/flink/pull/2372
  
    Thanks @wuchong. 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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

Posted by mushketyk <gi...@git.apache.org>.
Github user mushketyk commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2372#discussion_r74723595
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/FlinkPlannerImpl.scala ---
    @@ -68,12 +68,16 @@ class FlinkPlannerImpl(
         }
       }
     
    -  @throws(classOf[SqlParseException])
    +  @throws(classOf[FlinkSqlParseException])
    --- End diff --
    
    Since **FlinkRelConversionException** is an unchecked exception, should we add it to **throws**?


---
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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

Posted by wuchong <gi...@git.apache.org>.
Github user wuchong commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2372#discussion_r74747473
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/FlinkPlannerImpl.scala ---
    @@ -68,12 +68,16 @@ class FlinkPlannerImpl(
         }
       }
     
    -  @throws(classOf[SqlParseException])
    +  @throws(classOf[FlinkSqlParseException])
    --- End diff --
    
    Do you mean `FlinkSqlParseException` here?  
    Yeah, you are right, we should remove it from throws. 


---
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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2372#discussion_r74772260
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/exceptions.scala ---
    @@ -37,3 +37,16 @@ case class ValidationException(msg: String) extends RuntimeException(msg)
       * Exception for unwanted method calling on unresolved expression.
       */
     case class UnresolvedException(msg: String) extends RuntimeException(msg)
    +
    +/**
    +  * Exceptions for all errors occurring during sql parse phase
    +  */
    +case class FlinkSqlParseException(msg: String) extends RuntimeException(msg)
    +
    +/**
    +  * Exception for errors when attempting conversion to a set of
    +  * [[org.apache.calcite.rel.RelNode]]s.
    +  */
    +case class FlinkRelConversionException(msg: String) extends RuntimeException(msg)
    --- End diff --
    
    Wouldn't be a general `TableException` enough 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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

Posted by mushketyk <gi...@git.apache.org>.
Github user mushketyk commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2372#discussion_r74723604
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/FlinkPlannerImpl.scala ---
    @@ -85,23 +89,27 @@ class FlinkPlannerImpl(
         }
         catch {
           case e: RuntimeException =>
    -        throw new CValidationException(e)
    +        throw ValidationException(e.getMessage)
         }
         validatedSqlNode
       }
     
    -  @throws(classOf[RelConversionException])
    +  @throws(classOf[FlinkRelConversionException])
    --- End diff --
    
    Same as above.


---
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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2372#discussion_r74771464
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/exceptions.scala ---
    @@ -37,3 +37,16 @@ case class ValidationException(msg: String) extends RuntimeException(msg)
       * Exception for unwanted method calling on unresolved expression.
       */
     case class UnresolvedException(msg: String) extends RuntimeException(msg)
    +
    +/**
    +  * Exceptions for all errors occurring during sql parse phase
    +  */
    +case class FlinkSqlParseException(msg: String) extends RuntimeException(msg)
    --- End diff --
    
    I think we should not include Flink in every class name. `SqlParserException` would be better to be consistent with `ExpressionParserException`.


---
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] flink pull request #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions i...

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

    https://github.com/apache/flink/pull/2372


---
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] flink issue #2372: [FLINK-4281] [table] Wrap all Calcite Exceptions in Flink...

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

    https://github.com/apache/flink/pull/2372
  
    @twalthr  @mushketyk review comments addressed, and fix the conflicts. 


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