You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "dd-willgan (via GitHub)" <gi...@apache.org> on 2023/11/17 05:07:23 UTC

[I] [minor] /tableConfigs/validate can't convert default timestamp null value to LONG [pinot]

dd-willgan opened a new issue, #12020:
URL: https://github.com/apache/pinot/issues/12020

   Calling /tableConfigs/validate will convert a timestamp field to the following
   
   ```
   "dateTimeFieldSpecs": [
   	{
   		"format": "1:MILLISECONDS:EPOCH",
   		"sampleValue": null,
   		"granularity": "1:MILLISECONDS",
   		"singleValueField": true,
   		"name": "created_at_epoch_ms",
   		"maxLength": 512,
   		"dataType": "LONG",
   		"transformFunction": null,
   		"defaultNullValue": -9223372036854775808,
   		"virtualColumnProvider": null,
   		"defaultNullValueString": "-9223372036854775808"
   	}
   ]
   ```
   
   However, if this config is fed to /tableConfigs/validate again, the following error will be thrown
   
   ```
   exception: Cannot convert value: \'-9223372036854776000\' to type: LONG
   ```


-- 
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-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [minor] /tableConfigs/validate can't convert default timestamp null value to LONG [pinot]

Posted by "dd-willgan (via GitHub)" <gi...@apache.org>.
dd-willgan commented on issue #12020:
URL: https://github.com/apache/pinot/issues/12020#issuecomment-1830874444

   Thanks @Jackie-Jiang that makes sense. The JSON sent to validate API originally is
   
   ```
   {
     "format": "1:MILLISECONDS:EPOCH",
     "granularity": "1:MILLISECONDS",
     "name": "created_at_epoch_ms",
     "dataType": "LONG"
   }
   ```


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [minor] /tableConfigs/validate can't convert default timestamp null value to LONG [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #12020:
URL: https://github.com/apache/pinot/issues/12020#issuecomment-1821812557

   Seems like a problem of JSON precision loss, where `-9223372036854775808` is read as `double` thus converted to `-9223372036854776000`.
   Do you send the exactly same JSON to the validate API?


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [minor] /tableConfigs/validate can't convert default timestamp null value to LONG [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #12020:
URL: https://github.com/apache/pinot/issues/12020#issuecomment-1839783910

   Did some research and find this as a known issue in Swagger and there is no plan to fix it: https://github.com/swagger-api/swagger-ui/issues/2030
   If you use Swagger to query Pinot, the result might also lose precision. If you try with command line you should be able to see the correct values returned


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [minor] /tableConfigs/validate can't convert default timestamp null value to LONG [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #12020:
URL: https://github.com/apache/pinot/issues/12020#issuecomment-1839788153

   To add more context, then validating this field:
   ```
   {
     "format": "1:MILLISECONDS:EPOCH",
     "granularity": "1:MILLISECONDS",
     "name": "ts",
     "dataType": "LONG"
   }
   ```
   
   Swagger will show the response as:
   ```
   {
     "format": "1:MILLISECONDS:EPOCH",
     "granularity": "1:MILLISECONDS",
     "sampleValue": null,
     "singleValueField": true,
     "notNull": false,
     "dataType": "LONG",
     "maxLength": 512,
     "virtualColumnProvider": null,
     "defaultNullValue": -9223372036854776000,
     "defaultNullValueString": "-9223372036854775808",
     "transformFunction": null,
     "name": "ts"
   }
   ```
   
   Note that the precision loss already happens here.
   
   I tried using the following json as input and it works without throwing exception, but of course the response still lose precision:
   ```
   {
     "format": "1:MILLISECONDS:EPOCH",
     "granularity": "1:MILLISECONDS",
     "dataType": "LONG",
     "defaultNullValue": -9223372036854775808
     "name": "ts"
   }
   ```


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org