InvisibleProgrammer commented on PR #6813: URL: https://github.com/apache/hive/pull/6813#issuecomment-5870396369
There are two questions that I want to bring up: Firstly, I couldn't make the tests running on my computer. With our private discussion, I was able to run the test with adding the content of this other change: https://github.com/apache/hive/pull/6797. I wonder, would it worth merge those PRs as one? The other PR is a one liner that also helps running the test case for this one. Secondly, I was curious about logging so I created a test case that simulates a typical user error when they accidentally just pick a wrong column writing their select statement: ``` create table geohash_wrong(name string); insert into geohash_wrong(name) values ('Joe'), ('Jack'), ('Jill'); select ST_GeoHash(ST_Point(name, name), 10) as geohash from geohash_wrong; ``` I was wondered how the logs look like. Do they have a single log entry? No log entry at all and just null values in the result set? Multiple log entries, one for each failure? With this test, I expected the execution stopping at the ST_Point function calls. The output was what I expected. But the log is not. Output: ``` POSTHOOK: query: select ST_GeoHash(ST_Point(name, name), 10) as geohash from geohash_wrong POSTHOOK: type: QUERY POSTHOOK: Input: default@geohash_wrong #### A masked pattern was here #### NULL NULL NULL ``` Log: ``` 2026-09-28T05:56:43,907 ERROR [e0c7c9aa-d722-4880-8124-07b523932ee5 main] esri.ST_GeoHash: Invalid arguments - one or more arguments are null. 2026-09-28T05:56:43,907 ERROR [e0c7c9aa-d722-4880-8124-07b523932ee5 main] esri.ST_GeoHash: Invalid arguments - one or more arguments are null. 2026-09-28T05:56:43,907 ERROR [e0c7c9aa-d722-4880-8124-07b523932ee5 main] esri.ST_GeoHash: Invalid arguments - one or more arguments are null. ``` As you can see the select result contains NULL values only. As it expected. no error log entry from ST_GeoHash (actually no log entry at all). I assumed a log entry about the failure at parsing ST_Point as Jack is not a valid geometric coordinate. No log entry for ST_Point at all. But got 3 error log entries for ST_GeoHash. My problem is with this approach that I fear what happens if a user runs a query with a similar mistake but the table contains 1M rows. I'm pretty sure their log file would explode. My suggestion is to reconsider the logging strategy and just return with null values in similar cases. -- 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]
