kumarUjjawal commented on issue #22254: URL: https://github.com/apache/datafusion/issues/22254#issuecomment-4479449160
DuckDB intentionally implements Python-style negative indexing: arr[-1] = last element, arr[-k] = k-th from end, out-of-bounds → NULL. PG returns NULL for negative subscripts (no from-end semantics). DuckDB documents this through examples (['a','b','c'][-1] → 'c'). We can get consensus about which engine to follow for this. -- 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]
