The issue is here is that the `onComplete` call is async (assuming
https://github.com/daggerrz/druid-scala-client is the library you're using)
It looks like `DruidClient#apply` returns a `Future`:
Ok. Thanks for clarifying
On Tuesday, May 7, 2019 at 9:28:20 PM UTC-5, jed.wesleysmith wrote:
>
> this is a moderated forum to prevent spam, you are now authorised to post
>
> On Wed, 8 May 2019 at 12:20, tushar pandit > wrote:
>
>> Yeah sorry. Somehow mty questions were not getting posted and
Scala is an expression oriented language, so the last thing you refer to is
returned.
def foo: Int = 3
returns 3. There is no need to use the return keyword, indeed its use can
complicate matters as you can create non-local returns, which I suspect is
what is confusing you in your example.
Yeah sorry. Somehow mty questions were not getting posted and accidentally
I clicked twice. It got posted three hours later. Sorry about that.
On Tuesday, May 7, 2019 at 9:14:53 PM UTC-5, jed.wesleysmith wrote:
>
> Tushar, this is a duplicate question. Please see the other one for a
> response,
now I need to return* this object
On Tuesday, May 7, 2019 at 9:18:26 PM UTC-5, tushar pandit wrote:
>
> Yeah. I am sorry to put it in a confusing manner. Yeah I am working with
> Druid in Scala, but my question is about Scala code itself. So consider I
> get some data from some data store (in
Yeah. I am sorry to put it in a confusing manner. Yeah I am working with
Druid in Scala, but my question is about Scala code itself. So consider I
get some data from some data store (in my case it is Druid), I get the
dataset in an object and now I need to pass this object to the calling
Tushar, this is a duplicate question. Please see the other one for a
response, and please try not to double post if possible, thanks!
On Wed, 8 May 2019 at 12:06, tushar pandit
wrote:
> Hi,
>
> I am trying to call function fetchFromDruid
>
> def main(args: Array[String]): Unit = {
> val res =
Tushar, this seems to be an issue with whatever Druid is. This mailing list
is for questions about Functional Programming in Scala, both in general and
more specifically the book with that title. If you ask your question in a
more relevant forum somebody may be able to provide you with an answer.
Hi,
I am trying to call function fetchFromDruid
def main(args: Array[String]): Unit = {
val res = fetchFromDruid()
// res comes as null here
}
def fetchFromDruid(): GroupByResponse {
implicit val executionContext = ExecutionContext.Implicits.global
val client =