Why some of the parameters are case sensitive whil...
# random
e
Why some of the parameters are case sensitive while some are not? It would be more convenient if we can standardize them.
m
Makes sense. Can you file a GH issue, cc : @Shen Yu
e
Will do!
s
Let's have a discussion before filing a GH issue. If needed we can open a GH issue to track the discussion for the record. Here is the reason for the case sensitive inconsistency. 1. We implemented how to parse the first parameter ('week') and made it case insensitive. 2. We use Java's TimeUnit Enum's Enum.valueOf to parse the second parameter ('MILLISECONDS'), which is case sensitive. @Eric Liu Is it okay if both parameters are case sensitive or you want to make the second parameter case insensitive?
(If a GH issue is filed, that's also fine, we can move the discussion there.)
e
It would be really great if we can make them both be case insensitive, which I think most dbs support, or make them both be case sensitive, but standardize them to be either both be uppercase or both be lowercase. What do you think?
2
m
My vote to make case insensitive if most dbs do that too.
s
Got it. Shall we make the feature request as: make Pinot SQL's TimeUnit Enum parsing case insensitive? The scope is not only the
datetrunc
but all the functions that take the TimeUnit Enum (e.g.
extract
,
datetimeconvert
). (I want to ensure we don't address the feature gaps in an adhoc way but a systematic way.)
e
That sounds great!
s
Created https://github.com/apache/pinot/issues/10749. Please post your comments there if any.
e
Thanks Shen!
a
May be late to the game but Most of the DBs do case insensitive today
👍 1