https://pinot.apache.org/ logo
Join Slack
Powered by
# general
  • d

    Damiano

    04/28/2020, 9:49 PM
    can i not insert data via INSERT INTO ?
  • d

    Damiano

    04/28/2020, 9:49 PM
    i am trying insert into test (strategy_id, amount) values (1, 10.5)
  • d

    Damiano

    04/28/2020, 9:49 PM
    but i get an error
  • d

    Damiano

    04/28/2020, 9:49 PM
    via UI
  • k

    Kishore G

    04/28/2020, 9:50 PM
    no,
  • k

    Kishore G

    04/28/2020, 9:50 PM
    it's a derived data store
  • d

    Damiano

    04/28/2020, 9:50 PM
    ProcessingException(errorCode: 150,
    `message: PQLParsingError: java.lang.RuntimeException: Unable to convert SqlNode: INSERT INTO`test` (
    strategy_id
    ,
    amount
    )`
    VALUES ROW(1, 10.5) to PinotQuery.Unknown node type: INSERT
    at org.apache.pinot.sql.parsers.CalciteSqlParser.compileCalciteSqlToPinotQuery(CalciteSqlParser.java: 282)
    at org.apache.pinot.sql.parsers.CalciteSqlParser.compileToPinotQuery(CalciteSqlParser.java: 91)
    at org.apache.pinot.sql.parsers.CalciteSqlCompiler.compileToBrokerRequest(CalciteSqlCompiler.java: 33)
    at org.apache.pinot.controller.api.resources.PinotQueryResource.getQueryResponse(PinotQueryResource.java: 158)
    at org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java: 131)
    at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43)
    at java.lang.reflect.Method.invoke(Method.java: 498)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java: 52)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java: 124)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java: 167)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java: 219)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java: 79))
  • k

    Kishore G

    04/28/2020, 9:51 PM
    which means you first write to some other source such as Kafka or Blob store (S3, GCS, HDFS) etc and Pinot can ingest from those sources using the respective API's
  • d

    Damiano

    04/28/2020, 9:54 PM
    correct?
  • d

    Damiano

    04/29/2020, 4:30 PM
    Hello, i read that multivalue aggregations mean that we have something like SELECT min(field1), max(field2), max(field3) and so one... so basically more accregations function... so first question is that correct? second question...is there a way to accept two column as input of an aggregator? for example MAX(field1, field2) ... yeah, i know reading that way it could sounds stupid... but maybe we need to follow specific logics inside the aggregator and for this reason accepting more columns as input could be useful.
  • m

    Mayank

    04/29/2020, 4:30 PM
    Hi, Pinot does support multiple aggregations in one query, but that is not multi-value aggregation
  • d

    Damiano

    04/29/2020, 4:31 PM
    do we have aggregators that accept more columns?
  • d

    Damiano

    04/29/2020, 4:31 PM
    @User could you explain it ? i mean.. multiple aggregations is when we have select count(one), count(two) and so on...right?
  • d

    Damiano

    04/29/2020, 4:32 PM
    multi-value aggregation should be myaggr(field1, field2)
  • d

    Damiano

    04/29/2020, 4:32 PM
    no?
  • m

    Mayank

    04/29/2020, 4:32 PM
    sum(m1), sum(m2)
    -> multiple aggregations
  • m

    Mayank

    04/29/2020, 4:33 PM
    myAggr(m1, m2)
    -> multi-arg aggregations (only distinct takes multiple args, and a new one theta-sketch based index is in PR).
  • m

    Mayank

    04/29/2020, 4:33 PM
    multi-value
    -> This refers to columns where a row can have multiple values.
  • m

    Mayank

    04/29/2020, 4:35 PM
    BTW, I until now the execution stack assumed that aggrs take single column (with execption of distinct). I recently enhanced code so that this is no longer a limitation, and now it becomes really easy to add aggrs with multi-args
  • m

    Mayank

    04/29/2020, 4:35 PM
    If you are interested, here's a doc from @User https://app.gitbook.com/@apache-pinot/s/apache-pinot-cookbook/developers-and-contributors/extending-pinot/custom-aggregation-function on how to add your custom aggr
  • d

    Damiano

    04/29/2020, 4:36 PM
    @User yeah i was talking with Kishore yesterday
  • d

    Damiano

    04/29/2020, 4:36 PM
    but one moment when you said "multi-value" what do you really mean "a row can have multiple values" ?
  • d

    Damiano

    04/29/2020, 4:36 PM
    i am a bit confused on it
  • d

    Damiano

    04/29/2020, 4:37 PM
    however i am building something like myAggr(m1,m2)
  • d

    Damiano

    04/29/2020, 4:37 PM
    starting from code like: https://github.com/apache/incubator-pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AvgAggregationFunction.java
  • d

    Damiano

    04/29/2020, 4:37 PM
    so basically something like Avg(m1, m2)
  • d

    Damiano

    04/29/2020, 4:38 PM
    (it is obviously an example...but just to clarify what i am doing)
  • m

    Mayank

    04/29/2020, 4:38 PM
    I think you have few questions, whose answers might be unrelated concepts. Let me go over them one by one.
  • m

    Mayank

    04/29/2020, 4:39 PM
    First multi-valued columns
  • m

    Mayank

    04/29/2020, 4:40 PM
    These are columns that can take multiple values. Consider a schema with columns (company, locations).
1...127128129...160Latest