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

    Sidd

    05/11/2020, 5:05 PM
    Surprisingly, MySql doesn't flag it. Try this bogus query " SELECT CustomerName, sum(customerId) FROM Customers;" here -- https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all
    😁 1
  • j

    James Shao

    05/12/2020, 6:25 PM
    so I noticed that whenever we use timeConvert or other similar function in aggregation clause it always has some issue
  • j

    James Shao

    05/12/2020, 6:25 PM
    for example I do something like
    Copy code
    SELECT  timeConvert(ts, 'SECONDS', 'DAYS') FROM table LIMIT 100;
  • j

    James Shao

    05/12/2020, 6:25 PM
    it shows error as
    Copy code
    message: PQLParsingError: org.apache.pinot.pql.parsers.Pql2CompilationException: Aggregation
    function expects exact 1 argument
    at org.apache.pinot.pql.parsers.pql2.ast.FunctionCallAstNode.buildAggregationInfo(FunctionCallAstNode.java: 86)
    at org.apache.pinot.pql.parsers.pql2.ast.OutputColumnAstNode.updateBrokerRequest(OutputColumnAstNode.java: 36)
    at org.apache.pinot.pql.parsers.pql2.ast.BaseAstNode.sendBrokerRequestUpdateToChildren(BaseAstNode.java: 78)
    at org.apache.pinot.pql.parsers.pql2.ast.OutputColumnListAstNode.updateBrokerRequest(OutputColumnListAstNode.java: 45)
    at org.apache.pinot.pql.parsers.pql2.ast.BaseAstNode.sendBrokerRequestUpdateToChildren(BaseAstNode.java: 78)
    at org.apache.pinot.pql.parsers.pql2.ast.SelectAstNode.updateBrokerRequest(SelectAstNode.java: 118)
    at org.apache.pinot.pql.parsers.Pql2Compiler.compileToBrokerRequest(Pql2Compiler.java: 105)
    at org.apache.pinot.controller.api.resources.PqlQueryResource.getQueryResponse(PqlQueryResource.java: 104)
    at <http://org.apache.pinot.controller.api.resources.PqlQueryResource.post|org.apache.pinot.controller.api.resources.PqlQueryResource.post>(PqlQueryResource.java: 80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 62)
    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))
  • j

    James Shao

    05/12/2020, 6:27 PM
    I also noticed that newer version seems to rework this part of logics
  • j

    James Shao

    05/12/2020, 6:27 PM
    was this limitation is removed?
  • m

    Mayank

    05/12/2020, 6:29 PM
    Are you seeing this with latest code?
  • m

    Mayank

    05/12/2020, 6:30 PM
    And can you give me steps to introduce?
  • j

    James Shao

    05/12/2020, 6:30 PM
    not yet, I can test latest code in a bit
  • j

    James Shao

    05/12/2020, 6:30 PM
    using timeConvert(…) method like in the example above
  • j

    James Shao

    05/12/2020, 6:31 PM
    @User I saw your issue: https://github.com/apache/incubator-pinot/issues/5261
  • j

    James Shao

    05/12/2020, 6:31 PM
    was it done already?
  • m

    Mayank

    05/12/2020, 6:31 PM
    I added some code to support multiple arguments
  • m

    Mayank

    05/12/2020, 6:32 PM
    But that applies to aggregation functions only. Not sure why is that kicking in for timeConvert, as it is not an aggregation
  • j

    James Shao

    05/12/2020, 6:44 PM
    seems like functionCallAstNode got treated as aggregation node in this part of logic: https://github.com/apache/incubator-pinot/blob/master/pinot-common/src/main/java/org/apache/pinot/pql/parsers/pql2/ast/OutputColumnAstNode.java#L43
  • m

    Mayank

    05/12/2020, 6:46 PM
    ^^ has not changed in a while. So my guess is that new code exposed an existing bug
  • j

    James Shao

    05/12/2020, 6:46 PM
    seems like this pr should added support for using timeConvert or related method in selection, I can double check to see if we are on that particular version
  • m

    Mayank

    05/12/2020, 6:46 PM
    Also I do not see
    function expects exact 1 argument
    in the latest code (when grepping)
  • m

    Mayank

    05/12/2020, 6:48 PM
    Is you version recent (as in last 3 weeks or so)?
  • j

    James Shao

    05/12/2020, 6:48 PM
    not really, we are lacking in catching up with master
  • j

    James Shao

    05/12/2020, 6:48 PM
    thanks for all info and I will test out the latest version first
  • m

    Mayank

    05/12/2020, 6:49 PM
    Ok, then likely not related to any of my changes for supporting multiple args
  • j

    Jackie

    05/12/2020, 9:09 PM
    @User We use
    AggregationFunctionType.getAggregationFunctionType(String functionName)
    to identify whether the function is aggregation or transform. (Called in
    FunctionDefinitionRegistry.isAggFunc(String functionName)
    )
  • j

    Jackie

    05/12/2020, 9:09 PM
    So with the latest code it should have no issue
  • k

    Kenny Bastani

    05/13/2020, 4:34 PM
    New blog post! https://twitter.com/ApachePinot/status/1260603437844217856
    👏 5
    🎉 5
    👍 1
  • s

    Shounak Kulkarni

    05/14/2020, 5:16 AM
    hey all, how is horizontal pod autoscaling supposed to behave for pinot-servers? What I observed:
    When the server pod is auto scaled, the segments are not reassigned to the new server, running rebalance is required for that.
    When the server pods are scaled down, the ideal state still shows the segments on the terminated servers. They are not reassigned to live servers.
  • k

    Kishore G

    05/14/2020, 5:19 AM
    yes, rebalance command must be run manually. Automating it is easy, but most of the time users like to control this
  • k

    Kishore G

    05/14/2020, 5:20 AM
    The main reason is there are multiple replicas and a server failing is not a problem and Kuberenetes should restart that pod
  • s

    Shounak Kulkarni

    05/14/2020, 5:21 AM
    ok so the observations are inline with how its supposed to work right?
  • k

    Kishore G

    05/14/2020, 5:21 AM
    yes
    👍 1
1...133134135...160Latest