npawar commented on issue #7262: URL: https://github.com/apache/pinot/issues/7262#issuecomment-898640282
> Oh one more point, > > what I also was not able to accomplish is using the default value for my date time field. I tried > > ``` > "transformFunction": "Groovy({mappingTime == -1 ? 0 : mappingTime}, mappingTime)" > ``` > > resulting in > > ``` > java.lang.IllegalStateException: Invalid segment start/end time: -292275055-05-16T16:47:04.192Z/-292275055-05-16T16:47:04.192Z (in millis: -9223372036854775808/-9223372036854775808) for time column: mappingTs, must be between: 1971-01-01T00:00:00.000Z/2071-01-01T00:00:00.000Z > ``` > > According to the docs, the default value for timestamp fields is `TIMESTAMP 0 (1970-01-01 00:00:00 UTC)` > > In my initial configuration I've set the dataType of the timestamp to LONG as per [docs](https://docs.pinot.apache.org/configuration-reference/schema#datetimefieldspec) > > > Data type of the date time column. Can be STRING, INT, LONG > > But in contrast I saw that there might be also `TIMESTAMP` as a valid data type as per the [github example](https://github.com/apache/pinot/blob/master/pinot-tools/src/main/resources/examples/batch/githubEvents/githubEvents_offline_complexTypeHandling_schema.json#L58) > > So I'm confused whats the proper data type. > > When I try TIMESTAMP I do get > > ``` > java.lang.IllegalStateException: Invalid segment start/end time: 1970-01-01T00:00:00.000Z/1970-01-01T00:00:00.000Z (in millis: 0/0) for time column: mappingTs, must be between: 1971-01-01T00:00:00.000Z/2071-01-01T00:00:00.000Z > ``` > > all the time. You should be able to use either of INT, LONG or TIMESTAMP. TIMESTAMP is a relatively new addition. We have a restriction in Pinot for time column range as rightly pointed out by the message `must be between: 1971-01-01T00:00:00.000Z/2071-01-01T00:00:00.000Z`. So the default value for TIMESTAMP should not be `0`. @Jackie-Jiang can you check regarding the `TIMESTAMP` default value? And also help update the docs to indicate that this data type can now be used for date time column? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org