Marco Ndoping
12/07/2022, 4:22 AMSELECT ToDateTime(1639137263000, 'yyyy-MM-dd') AS dateTimeString FROM ignoreMe and SELECT FromDateTime('2019-08-07', 'yyyy-MM-dd') AS epochMillis FROM ignoreMe in Pinot's multi stage engine from the Pinot UI. Here's the error message:
{
"message": "SQLParsingError\njava.lang.RuntimeException Error composing query plan for: SELECT FromDateTime('2019-08-07', 'yyyy-MM-dd') AS epochMillis\nFROM ignoreMe\n\tat org.apache.pinot.query.QueryEnvironment.planQuery(QueryEnvironment.java:137)\n\tat org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:153)\n\tat org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:128)\n...\nCaused by: java.lang.IllegalArgumentException: Could not find schema for table: 'ignoreMe'. This is likely indicative of some kind of corruption and should not happen! If you are running this via the a test environment, check to make sure you're specifying the correct tables.\n\tat org.apache.pinot.query.catalog.PinotCatalog.getTable(PinotCatalog.java:68)\n\tat org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable(SimpleCalciteSchema.java:126)\n\tat org.apache.calcite.jdbc.CalciteSchema.getTable(CalciteSchema.java:295)\n\tat org.apache.calcite.sql.validate.EmptyScope.resolve_(EmptyScope.java:145)",
"errorCode": 150
}
Is this a known issue? Can you please investigate and confirm whether we need to create an issue here?Mayank
Rong R
12/07/2022, 3:40 PMMarco Ndoping
12/07/2022, 4:06 PMSELECT ToDateTime(some_date_column, 'yyyy-MM-dd') FROM tbl and it failed as well in the v2 engine when input is a column but works in v1.Rong R
12/07/2022, 4:07 PMMarco Ndoping
12/07/2022, 4:08 PMRong R
12/07/2022, 4:10 PMRong R
12/07/2022, 4:10 PMMarco Ndoping
12/07/2022, 4:16 PMselect cast(some_date_comlum) from tbl in v2 but works in v1.
From line 1, column 26 to line 1, column 29: Unknown identifier 'LONG''\n\tat org.apache.pinot.query.QueryEnvironment.planQuery(QueryEnvironment.java:135)\n\tat org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:153)\n\tat org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:128)\n\tat org.apache.pinot.broker.requesthandler.BrokerRequestHandler.handleRequest(BrokerRequestHandler.java:47)\n...\nCaused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 26 to line 1, column 29: Unknown identifier 'LONG'\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)\n...\nCaused by: org.apache.calcite.sql.validate.SqlValidatorException: Unknown identifier 'LONG'\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)",Rong R
12/07/2022, 4:17 PMCAST col as BIGINT --> LONG is the java type, SQL type name is BIGINTMarco Ndoping
12/07/2022, 4:27 PMRong R
12/07/2022, 4:33 PMRong R
12/07/2022, 4:37 PMToDateTime(CAST col as BIGINT, CAST 'yyyy-MM-dd' AS VARCHAR) --> making the static constant CHAR to a VARCHARMarco Ndoping
12/07/2022, 4:44 PMRong R
12/07/2022, 4:45 PMRong R
12/07/2022, 4:45 PMMarco Ndoping
12/07/2022, 4:47 PMRong R
12/07/2022, 4:48 PMMarco Ndoping
12/07/2022, 4:49 PMRong R
12/07/2022, 9:44 PMtoDateTime instead of ToDateTimeRong R
12/07/2022, 9:44 PMMarco Ndoping
12/07/2022, 10:32 PMRong R
12/07/2022, 10:32 PMMarco Ndoping
12/07/2022, 10:35 PM