hello, after following the steps in to load my dat...
# troubleshooting
x
hello, after following the steps in to load my data here https://docs.pinot.apache.org/integrations/presto i get this error:
Copy code
Query 20210731_123555_00024_7fd9g failed: Query SELECT count(*) FROM events WHERE (time > 1622085300) encountered exception {"message":"PQLParsingError:\norg.apache.pinot.sql.parsers.SqlCompilationException: Caught exception while parsing query: SELECT count(*) FROM events WHERE (time > 1622085300)\n\tat org.apache.pinot.sql.parsers.CalciteSqlParser.compileCalciteSqlToPinotQuery(CalciteSqlParser.java:324)\n\tat org.apache.pinot.sql.parsers.CalciteSqlParser.compileToPinotQuery(CalciteSqlParser.java:108)\n\tat org.apache.pinot.sql.parsers.CalciteSqlCompiler.compileToBrokerRequest(CalciteSqlCompiler.java:35)\n\tat org.apache.pinot.core.requesthandler.PinotQueryParserFactory.parseSQLQuery(PinotQueryParserFactory.java:46)\n\tat org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleSQLRequest(BaseBrokerRequestHandler.java:212)\n\tat org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleRequest(BaseBrokerRequestHandler.java:194)\n\tat org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleRequest(BaseBrokerRequestHandler.java:99)\n\tat org.apache.pinot.broker.api.resources.PinotClientRequest.processSqlQueryPost(PinotClientRequest.java:175)\n\tat jdk.internal.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)","errorCode":150} with pinot query "SELECT count(*) FROM events WHERE (time > 1622085300)"
in pinot, time schema is like such:
Copy code
"dateTimeFieldSpecs": [{
     "name": "time",
     "dataType": "LONG",
     "format" : "1:SECONDS:EPOCH",
     "granularity": "15:MINUTES"
   }]
and when i run the supposedly erroneous query in pinot
Copy code
SELECT count(*) FROM events WHERE (time > 1622085300)
there are no issues.
Copy code
explain select count(*) from events where time = 1622085300;

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 - Output[_col0] => [count:bigint]
         Estimates: {rows: ? (?), cpu: ?, memory: 0.00, network: ?}
         _col0 := count
     - RemoteStreamingExchange[GATHER] => [count:bigint]
             Estimates: {rows: ? (?), cpu: ?, memory: 0.00, network: ?}
         - TableScan[TableHandle {connectorId='pinot_quickstart', connectorHandle='PinotTableHandle{connectorId=pinot_quickstart, schemaName=default, tableName=events, isQueryShort=Optional[true], expectedColumnHandles=Optional[[Pino
                 Estimates: {rows: ? (?), cpu: ?, memory: 0.00, network: 0.00}
                 count := PinotColumnHandle{columnName=count, dataType=bigint, type=DERIVED}
k
I believe time is a reserved keyword can you try escaping it with double quotes in the query i.e as “time” and see if it works ?
👍 1
x
yep it works. thank you!
k
👍