Re: Understanding Statistic unique keys

2025-02-28 Thread Steven Phillips
I think so: /** Returns a list of unique keys, or null if no key exist. */ is the javadoc for getKeys(). Maybe the javadoc could be improved to make that clear, that if there is no unique key, it must return null, not an empty BitSet. On Fri, Feb 28, 2025 at 2:54 PM Ian Bertolacci wrote: > Than

Re: Understanding Statistic unique keys

2025-02-28 Thread Ian Bertolacci
Thanks! One thing I’ve noticed (in my short time using this) is that if I provide the a list with the empty set, it seems to consider *all* columns as unique. I observe this AggregateRemoveRule, where no matter what field I used to group by it removes the aggregate if the aggregations allow it. I

Re: Understanding Statistic unique keys

2025-02-28 Thread Steven Phillips
Yes, your understanding is correct. See the code for the isKey() method: @Override public boolean isKey(ImmutableBitSet columns) { for (ImmutableBitSet key : keysCopy) {

Understanding Statistic unique keys

2025-02-28 Thread Ian Bertolacci
Howdy, From Statistic.getKeys: Returns a list of unique keys, or null if no key exist. I’m not understanding why this is a list of bitsets. Is the idea that each entry in the list is a bitset of keys which are unique when used together? For example, lets say I have this table: C0 | C1 | C2 0 | 2

Re: Question about scale after parsing day/time intervals to RexLiteral

2025-02-28 Thread Mihai Budiu
Indeed, the "Default" precision of 3 seems to be hardwired in several places in Calcite for TIMESTAMPs and INTERVALs (and maybe for TIME intervals too). I have filed a related issue about the JavaTypeFactory: https://issues.apache.org/jira/browse/CALCITE-6752 See a list of related issues in the

Question about scale after parsing day/time intervals to RexLiteral

2025-02-28 Thread Mark Lewis
Using Calcite to parse an SQL interval day seems to always result in a RexLiteral with a scale of 6, but with the value a millisecond representation of the interval. This is because SqlLiteral.getValueAs() always returns milliseconds, and the default fractional second precision is 6. The resulti

Re: [ANNOUNCE] New committer: Fanyuan Qiu

2025-02-28 Thread Zhe Hu
Congratulations! Replied Message | From | Sergey Nuyanzin | | Date | 02/28/2025 14:57 | | To | dev | | Subject | Re: [ANNOUNCE] New committer: Fanyuan Qiu | Congratulations On Fri, Feb 28, 2025, 07:15 Hongyu Guo wrote: > Congratulations! > > On Fri, Feb 28, 2025 at 12:14 AM Michael Mi

Re: [ANNOUNCE] New committer: Fanyuan Qiu

2025-02-28 Thread Hongyu Guo
Congratulations! On Fri, Feb 28, 2025 at 12:14 AM Michael Mior wrote: > Congratulations Fanyuan! > > -- > Michael Mior > mm...@apache.org > > > > On Wed, Feb 26, 2025 at 2:40 PM Stamatis Zampetakis > wrote: > > > Apache Calcite's Project Management Committee (PMC) has invited Fanyuan > Qiu > >

[jira] [Created] (CALCITE-6869) Added instructions for the alias loss problem in ProjectRemoveRule

2025-02-28 Thread Zhen Chen (Jira)
Zhen Chen created CALCITE-6869: -- Summary: Added instructions for the alias loss problem in ProjectRemoveRule Key: CALCITE-6869 URL: https://issues.apache.org/jira/browse/CALCITE-6869 Project: Calcite