Introduce default rows limit in addition to max rows.  Default is 1k.

scala.util.Try returns either a Failure(exception) or a Success(result).
Nothing in this return type dictates that you have to swallow all
exceptions.   Using ADTs to handle errors are much better than try / catch
in general.

On Mon, Sep 15, 2014 at 9:46 AM, rjmac <notifications@github.com> wrote:

> In
> src/main/scala/com/socrata/querycoordinator/QueryCoordinatorConfig.scala:
>
> > @@ -18,6 +18,7 @@ class QueryCoordinatorConfig(config: Config, root: String) {
> >    val schemaTimeout = config.getMilliseconds(k("get-schema-timeout")).longValue.millis
> >    val queryTimeout = config.getMilliseconds(k("query-timeout")).longValue.millis
> >    val maxRows = try { Some(config.getInt(k("max-rows"))) } catch { case _: ConfigException.Missing => None}
>
> That is not true. You can also get a wrong type exception. Anyway, it's
> bad practice to catch more than you're willing to handle, whether or not
> more than you're willing to handle can be thrown. Try is a misfeature and
> should basically never be used.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/socrata/query-coordinator/pull/13/files#r17553353>.
>



-- 
Evan Chan   |   Principal Engineer, Socrata     |    @evanfchan
*Socrata <http://www.socrata.com/> *| The Data Experience Company™
*Socrata isn't about worldly success, but about changing the world
successfully. This is why I'm excited to be here.*
*What does Socrata do? <https://www.youtube.com/watch?v=yyz86MlkriQ> *(watch
our 2 min video)