somu-imply opened a new pull request, #15972:
URL: https://github.com/apache/druid/pull/15972

   I have been able to replicate this case in MSQ insert only, trying to add a 
test case. But overall the issue is this. When data is ingested using the 
following
   ```
   insert into mytest
   select
     time_parse("time") as __time,
     cityName
   from table(
     extern(
       '{"type": "s3", "prefixes": 
["s3://imply-eng-datasets/qa/IngestionTest/wikipedia/files/wikiticker-2015-09-12-sampled.json.gz"]}',
       '{"type": "json"}',
       '[{"name": "time", "type": "string"}, {"name": "channel", "type": 
"string"}, {"name": "cityName", "type": "string"}, {"name": "comment", "type": 
"string"}, {"name": "countryIsoCode", "type": "string"}, {"name": 
"countryName", "type": "string"}, {"name": "isAnonymous", "type": "string"}, 
{"name": "isMinor", "type": "string"}, {"name": "isNew", "type": "string"}, 
{"name": "isRobot", "type": "string"}, {"name": "isUnpatrolled", "type": 
"string"}, {"name": "metroCode", "type": "string"}, {"name": "namespace", 
"type": "string"}, {"name": "page", "type": "string"}, {"name": 
"regionIsoCode", "type": "string"}, {"name": "regionName", "type": "string"}, 
{"name": "user", "type": "string"}, {"name": "delta", "type": "long"}, {"name": 
"added", "type": "long"}, {"name": "deleted", "type": "long"}]'
     )
   )
   where countryName in ('Japan')
   partitioned by YEAR
   clustered by __time
   
   insert into mytest
   select
     time_parse("time") as __time,
     added
   from table(
     extern(
       '{"type": "s3", "prefixes": 
["s3://imply-eng-datasets/qa/IngestionTest/wikipedia/files/wikiticker-2015-09-12-sampled.json.gz"]}',
       '{"type": "json"}',
       '[{"name": "time", "type": "string"}, {"name": "channel", "type": 
"string"}, {"name": "cityName", "type": "string"}, {"name": "comment", "type": 
"string"}, {"name": "countryIsoCode", "type": "string"}, {"name": 
"countryName", "type": "string"}, {"name": "isAnonymous", "type": "string"}, 
{"name": "isMinor", "type": "string"}, {"name": "isNew", "type": "string"}, 
{"name": "isRobot", "type": "string"}, {"name": "isUnpatrolled", "type": 
"string"}, {"name": "metroCode", "type": "string"}, {"name": "namespace", 
"type": "string"}, {"name": "page", "type": "string"}, {"name": 
"regionIsoCode", "type": "string"}, {"name": "regionName", "type": "string"}, 
{"name": "user", "type": "string"}, {"name": "delta", "type": "long"}, {"name": 
"added", "type": "long"}, {"name": "deleted", "type": "long"}]'
     )
   )
   where countryName in ('Japan')
   partitioned by YEAR
   clustered by __time
   ```
   Running a query like this below would throw an NPE.
   ```
   select earliest(added) from mytest
   
   
   Error: RUNTIME_FAILURE (OPERATOR)
   Cannot read field "lhs" because "inPair" is null
   java.lang.NullPointerException
   ```
   We missed a null check in numeric earliest and latest aggs. After adding it 
back, these test cases pass
   
   ![Screen Shot 2024-02-26 at 2 39 00 
PM](https://github.com/apache/druid/assets/93540295/2a576b7e-1cc3-4da8-9737-889b28c51b91)
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to