https://pinot.apache.org/ logo
Join Slack
Powered by
# pql-sql-regression
  • s

    Sidd

    10/12/2020, 6:45 PM
    the bad news is that I don't know how this is even happened in June. @User, as part of query context changes, was there ever a time where server briefly moved to PinotQuery (as part of conversion of broker request to QueryContext) and we mistakenly started using filter from PinotQuery
  • s

    Sidd

    10/12/2020, 6:45 PM
    latest code doesn't reproduce this issue
  • m

    Mayank

    10/12/2020, 6:46 PM
    I think we should just focus on:
    Copy code
    1. Does the issue exist in prod - if so, mitigate/fix quickly.
    2. Does the issue happen in latest code - fix forward
  • m

    Mayank

    10/12/2020, 6:46 PM
    We don't need to debug old code
  • s

    Sidd

    10/12/2020, 6:46 PM
    it doesn't happen
  • m

    Mayank

    10/12/2020, 6:46 PM
    latest code or prod or both?
  • k

    Kishore G

    10/12/2020, 6:46 PM
    +100 to what Mayank said
  • s

    Sidd

    10/12/2020, 6:47 PM
    latest code (in IntellIJ) after downloading segments and also on prod via pinot-query --sql --show-metadata
  • m

    Mayank

    10/12/2020, 6:54 PM
    Do we have test that compares pql with sql filter? If not, perhaps we can add
  • s

    Sidd

    10/12/2020, 6:54 PM
    we do
  • s

    Sidd

    10/12/2020, 6:54 PM
    PqlSqlCompatibilityTest
  • s

    Sidd

    10/12/2020, 6:54 PM
    does exactly this
  • s

    Sidd

    10/12/2020, 6:54 PM
    it didn't fail for the above queries
  • m

    Mayank

    10/12/2020, 6:56 PM
    ok
  • m

    Mayank

    10/12/2020, 6:56 PM
    I see it does not have complex filter predicates. perhaps, add some
  • j

    Jackie

    10/12/2020, 7:05 PM
    I think I might have fixed some bug on the SQL path and made it the same behavior as PQL
    👏 2
  • k

    Kishore G

    10/12/2020, 10:09 PM
    Any update here?
  • m

    Mayank

    10/12/2020, 10:09 PM
    Yes, the issue does not exist in latest code
  • k

    Kishore G

    10/12/2020, 10:09 PM
    Cool
  • k

    Kishore G

    10/12/2020, 10:10 PM
    Can we add a test case?
  • m

    Mayank

    10/12/2020, 10:10 PM
    Yes, either @User or I will do that
  • m

    Mayank

    10/12/2020, 10:10 PM
    Apparently there is already one. But it likely does not have complex predicates. We just need to add a query
  • s

    Sidd

    10/13/2020, 1:52 AM
    I will add tests tonight.
  • s

    Sidd

    10/13/2020, 2:06 AM
    I would like to get an opinion on a slightly related topic. Query rewrite code has grown in non-trivial manner and I believe it will continue to grow. Can we add a fast path query compilation flag to bypass query rewrite? On the SQL path l, there are few different things happening in compilation 1. Calcite parsing to SQLNode 2. SQLNode to PinotQuery 3. PinotQuery rewrite.. 4. PinotQuery to BrokerRequest We should get rid of 4 very soon. In addition to that we should make 3 optional. Enabled by default. We can't do much about 1 except tuning config and making changes to calcite. 2 may have some room.. Request compilation metric used to stay close to 1ms or 900us for PQL. For SQL, I have seen it go up to 5ms.
  • m

    Mayank

    10/13/2020, 2:07 AM
    Do you have the profile for 5ms?
  • m

    Mayank

    10/13/2020, 2:07 AM
    What part of it is coming from rewrite
  • s

    Sidd

    10/13/2020, 2:08 AM
    I can get the profile. It was an immediate thought after looking at the time and the code.
  • m

    Mayank

    10/13/2020, 2:09 AM
    Ok, let’s have that. In general, I’d like to avoid configs that require tuning, or setting to get around some problem, we should find a way to automatically do that inside the code
  • k

    Kishore G

    10/13/2020, 2:53 AM
    5ms is definitely a lot
  • j

    Jackie

    02/10/2022, 12:03 AM
    @User has left the channel