BindableTableScan and RelMdColumnUniqueness

2025-04-03 Thread Ian Bertolacci
handler for BindableTableScan in this pathway (which is through CalcitePrepareImpl) If this is not a configuration issue, I will file a bug JIRA -Ian Bertolacci

[jira] [Comment Edited] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-04-02 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940409#comment-17940409 ] Ian Bertolacci edited comment on CALCITE-6882 at 4/2/25 5:0

[jira] [Comment Edited] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-04-02 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940409#comment-17940409 ] Ian Bertolacci edited comment on CALCITE-6882 at 4/2/25 5:0

[jira] [Commented] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-04-02 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940409#comment-17940409 ] Ian Bertolacci commented on CALCITE-6882: - > It returns true for column

[jira] [Updated] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-04-01 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-6882: Description: There is some overly conservative logic in determining uniqueness of

[jira] [Comment Edited] (CALCITE-5212) Attempting to create a Decimal with scale specified but precision not specified results in Decimal with scale 0

2025-03-19 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936895#comment-17936895 ] Ian Bertolacci edited comment on CALCITE-5212 at 3/19/25 5:2

[jira] [Commented] (CALCITE-5212) Attempting to create a Decimal with scale specified but precision not specified results in Decimal with scale 0

2025-03-19 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936895#comment-17936895 ] Ian Bertolacci commented on CALCITE-5212: - This has popped up again.

RE: Re: Is it possible to have type system with scale that is precision agnostic?

2025-03-17 Thread Ian Bertolacci
Looks like I’ve already encountered this before: https://issues.apache.org/jira/browse/CALCITE-5212 It seems like with this fix we could have precision agnostic type systems.

[jira] [Comment Edited] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-17 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936244#comment-17936244 ] Ian Bertolacci edited comment on CALCITE-6882 at 3/17/25 8:2

RE: Re: Is it possible to have type system with scale that is precision agnostic?

2025-03-17 Thread Ian Bertolacci
I think there’s still the issue of exposing that to the type system. Theres a lot of logic all over the place that computes the precision/scale of expressions, and when these values hit the max, things start to get weird. -Ian

Re: Is it possible to have type system with scale that is precision agnostic?

2025-03-17 Thread Ian Bertolacci
Thinking about it some more, it may be more accurate to ask if it is possible to have an infinite max scale/precision. We may care about the type’s scale and/or precision, but we do not necessarily need or want to define an upper bound on what they can be. -Ian

Is it possible to have type system with scale that is precision agnostic?

2025-03-17 Thread Ian Bertolacci
I’ve got a good one for y’all today. In our engine, we don’t care about precision, but we *do* care about scale. This is because we have mechanisms for handling arbitrarily wide decimals, but we at least require that all decimals in a column have the same scale. It is possible for us to express t

[jira] [Commented] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-17 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936244#comment-17936244 ] Ian Bertolacci commented on CALCITE-6882: - Close, but the query shoul

Re: Questions about RelMdColumnUniqueness

2025-03-11 Thread Ian Bertolacci
Filed https://issues.apache.org/jira/browse/CALCITE-6882 Included a few demonstrations of the weirdness. I still think that *both* predicate pullup/refinement and analysis of the join are wrong, since any unique columns will cause a keyset of non-unique columns to become unique as a whole when th

[jira] [Commented] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-11 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934047#comment-17934047 ] Ian Bertolacci commented on CALCITE-6882: - Some pertinant exerpts from

[jira] [Created] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-11 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6882: --- Summary: RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join Key: CALCITE-6882 URL: https://issues.apache.org

[jira] [Created] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-10 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6882: --- Summary: RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join Key: CALCITE-6882 URL: https://issues.apache.org

[jira] [Commented] (CALCITE-3428) Refine RelMdColumnUniqueness for Filter by considering constant columns

2025-03-10 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934042#comment-17934042 ] Ian Bertolacci commented on CALCITE-3428: - [~julianhyde] We opened CAL

[jira] [Updated] (CALCITE-6882) RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

2025-03-10 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-6882: Description: There is some overly conservative logic in determining uniqueness of

Re: Questions about RelMdColumnUniqueness

2025-03-07 Thread Ian Bertolacci
That example makes sense but isn’t directly related to the issue here. In this example: `select T1.id, count(*) from T1 inner join T2 on T1.foreignKey = T2.ID where T2.foo = 1234 group by T1.id` AggregateRemoveRule wants to know if `T1.id` after the filter is unique. The answer should be “yes” b

Re: Questions about RelMdColumnUniqueness

2025-03-07 Thread Ian Bertolacci
Two comments: First: on our side, we’d like to know if *removing* the use of this predicate pullup information would have *negative* consequences for correctness. If it does not impact correctness: we can override the behavior to not consider this information, and move forwards. Second: a collea

Re: Questions about RelMdColumnUniqueness

2025-03-07 Thread Ian Bertolacci
Ah, the chained provider helps. Thanks! -Ian

Re: Questions about RelMdColumnUniqueness

2025-03-07 Thread Ian Bertolacci
Related: I have absolutely no idea how to make a minor override to RelMdColumnUniqueness without modifying the class itself. I really don’t understand how all this bespoke reflection works, or how to augment the behavior of existing handlers. Is there any documentation, guides, or examples that

Questions about RelMdColumnUniqueness

2025-03-07 Thread Ian Bertolacci
union the parameter columns with the result of decorateWithConstantColumnsFromPredicates, so I imagine this impacts other RelNode types and optimizations. Is my understanding of this correct? Thanks! -Ian Bertolacci [1] https://issues.apache.org/jira/browse/CALCITE-3428?focusedCommentId=17933163

[jira] [Commented] (CALCITE-3428) Refine RelMdColumnUniqueness for Filter by considering constant columns

2025-03-06 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933163#comment-17933163 ] Ian Bertolacci commented on CALCITE-3428: - Sorry to ping a 4 year old th

Re: RelFieldTrimmer not optimally trimming after filters under joins?

2025-03-04 Thread Ian Bertolacci
I just hacked together an override where it will build a redundant project on each side if necessary. That should eliminate any overhead of invoking any planners or rules. (For our needs, additional projects have not performance implications) -Ian From: Ian Bertolacci Reply-To: &quo

Re: RelFieldTrimmer not optimally trimming after filters under joins?

2025-03-04 Thread Ian Bertolacci
ry node in the tree before trimming, and then clean up with ProjectRemoveRule. On Tue, Mar 4, 2025 at 1:33 PM Ian Bertolacci wrote: > I’m looking at using RelFieldTrimmer, and I’m noticing that if a side of a > join has unnecessary fields after a filter, there is no trim-fields project > on

RelFieldTrimmer not optimally trimming after filters under joins?

2025-03-04 Thread Ian Bertolacci
I’m looking at using RelFieldTrimmer, and I’m noticing that if a side of a join has unnecessary fields after a filter, there is no trim-fields project on that side to reduce the width of the row. Is this expected, or is there a configuration or pre-processing step that I am missing? For example

Re: Understanding Statistic unique keys

2025-02-28 Thread Ian Bertolacci
leBitSet columns) { for (ImmutableBitSet key : keysCopy) { if (columns.contains(key)) { return true; } } return false; } If any key combination includes any of the key combinations of the list, then it is a key. On Fri, Feb 28,

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

[jira] [Commented] (CALCITE-6626) SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods.

2024-10-16 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890222#comment-17890222 ] Ian Bertolacci commented on CALCITE-6626: - Ah, I must have missed that

[jira] [Commented] (CALCITE-6626) SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods.

2024-10-15 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889734#comment-17889734 ] Ian Bertolacci commented on CALCITE-6626: - Ya, I was gonna grep for `Logic

[jira] [Created] (CALCITE-6626) SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods.

2024-10-14 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6626: --- Summary: SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods. Key: CALCITE-6626 URL: https://issues.apache.org/jira/browse/CALCITE-6626

[jira] [Created] (CALCITE-6626) SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods.

2024-10-14 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6626: --- Summary: SqlToRelConverter mixes uses of configured RelBuilder and Logical.create methods. Key: CALCITE-6626 URL: https://issues.apache.org/jira/browse/CALCITE-6626

Tutorials/Documentation on Schemas and Catalogs?

2024-09-23 Thread Ian Bertolacci
Howdy, I want to know more about Calcite’s schemas and catalogs. Obviously I’m do some schema stuff right to use Calcite, but I feel like I could be doing a lot more. Do we have any thorough documents or tutorials on this subject? I feel like most of the stuff I see creates schemas mostly as boile

[jira] [Commented] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-09-18 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882758#comment-17882758 ] Ian Bertolacci commented on CALCITE-6554: - Happy to help! > nested cor

[jira] [Commented] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-30 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878187#comment-17878187 ] Ian Bertolacci commented on CALCITE-6554: - [Done](https://github.com/ap

[jira] [Comment Edited] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-30 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878187#comment-17878187 ] Ian Bertolacci edited comment on CALCITE-6554 at 8/30/24 4:3

[jira] [Commented] (CALCITE-6508) Parse error when using scalar sub-query as operand to Array constructor function

2024-08-29 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877899#comment-17877899 ] Ian Bertolacci commented on CALCITE-6508: - Happy to help! Its nice to fin

[jira] [Commented] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877516#comment-17877516 ] Ian Bertolacci commented on CALCITE-6554: - Tested and it seems to work: h

[jira] [Commented] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877507#comment-17877507 ] Ian Bertolacci commented on CALCITE-6554: - I do wonder if this is correct

[jira] [Commented] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877496#comment-17877496 ] Ian Bertolacci commented on CALCITE-6554: - [~libenchao] Would it make s

[jira] [Comment Edited] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877496#comment-17877496 ] Ian Bertolacci edited comment on CALCITE-6554 at 8/28/24 6:4

[jira] [Assigned] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci reassigned CALCITE-6554: --- Assignee: Ian Bertolacci > nested correlated sub-query in aggregation does

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-28 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877494#comment-17877494 ] Ian Bertolacci commented on CALCITE-5213: - It looks like there is stil

[jira] [Created] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6554: --- Summary: nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection Key: CALCITE-6554 URL: https://issues.apache.org/jira

[jira] [Created] (CALCITE-6554) nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection

2024-08-28 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6554: --- Summary: nested correlated sub-query in aggregation does not have inner correlation variable bound to inner projection Key: CALCITE-6554 URL: https://issues.apache.org/jira

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877197#comment-17877197 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/27/24 10:5

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877197#comment-17877197 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/27/24 10:1

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877089#comment-17877089 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/27/24 10:1

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877197#comment-17877197 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/27/24 10:1

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877197#comment-17877197 ] Ian Bertolacci commented on CALCITE-5213: - I figured out the discrepancy

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877089#comment-17877089 ] Ian Bertolacci commented on CALCITE-5213: - Hm. Something strange is goin

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-27 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877089#comment-17877089 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/27/24 4:0

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876842#comment-17876842 ] Ian Bertolacci commented on CALCITE-5213: - [~libenchao] Looks like tha

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876837#comment-17876837 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/26/24 9:1

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876837#comment-17876837 ] Ian Bertolacci commented on CALCITE-5213: - [~libenchao] I now realize

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876825#comment-17876825 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/26/24 7:0

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876828#comment-17876828 ] Ian Bertolacci commented on CALCITE-5213: - It also appears that

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876825#comment-17876825 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/26/24 7:0

RE: Direction on CALCITE-5213, nested correlated subquery conversion

2024-08-26 Thread Ian Bertolacci
6825 On 2024/08/20 16:22:34 Ian Bertolacci wrote: > Hello, JIRA CALCITE-5213 has been open for a while now and still seems to be > an issue. > I’ve included small example which demonstrates the issue. > I’m hoping someone can figure out what might be happening here (hopefully I

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876825#comment-17876825 ] Ian Bertolacci commented on CALCITE-5213: - So I was able to quickly com

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876789#comment-17876789 ] Ian Bertolacci commented on CALCITE-5213: - Ya we've been looking at

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-20 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875243#comment-17875243 ] Ian Bertolacci commented on CALCITE-5213: - I was hoping from something

[jira] [Updated] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-20 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-5213: Affects Version/s: 1.37.0 > PROJECT_TO_SUBQUERY producing Incorrect tree from nes

Direction on CALCITE-5213, nested correlated subquery conversion

2024-08-20 Thread Ian Bertolacci
Hello, JIRA CALCITE-5213 has been open for a while now and still seems to be an issue. I’ve included small example which demonstrates the issue. I’m hoping someone can figure out what might be happening here (hopefully I’m just doing something wrong) and see if there are possible solutions. Thank

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-20 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875234#comment-17875234 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/20/24 4:1

[jira] [Comment Edited] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-20 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875234#comment-17875234 ] Ian Bertolacci edited comment on CALCITE-5213 at 8/20/24 4:1

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-20 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875234#comment-17875234 ] Ian Bertolacci commented on CALCITE-5213: - Here is some replication cod

[jira] [Commented] (CALCITE-6508) Parse error when using scalar sub-query as operand to Array constructor function

2024-08-14 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873653#comment-17873653 ] Ian Bertolacci commented on CALCITE-6508: - Thats fair. Do you think the ch

[jira] [Commented] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872160#comment-17872160 ] Ian Bertolacci commented on CALCITE-6508: - PR up. > Parse error whe

[jira] [Commented] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872146#comment-17872146 ] Ian Bertolacci commented on CALCITE-6508: - Yes. > Parse error whe

[jira] [Assigned] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci reassigned CALCITE-6508: --- Assignee: Ian Bertolacci > Parse error when using scalar sub-query as operant

[jira] [Commented] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872144#comment-17872144 ] Ian Bertolacci commented on CALCITE-6508: - We extended the parser to

[jira] [Comment Edited] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872144#comment-17872144 ] Ian Bertolacci edited comment on CALCITE-6508 at 8/8/24 10:0

[jira] [Updated] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-5213: Affects Version/s: 1.36.0 > PROJECT_TO_SUBQUERY producing Incorrect tree from nes

[jira] [Commented] (CALCITE-5213) PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.

2024-08-08 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872090#comment-17872090 ] Ian Bertolacci commented on CALCITE-5213: - [~libenchao] this does not ap

[jira] [Commented] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-08-01 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870298#comment-17870298 ] Ian Bertolacci commented on CALCITE-6504: - A colleague pointed out

[jira] [Created] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-07-31 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6508: --- Summary: Parse error when using scalar sub-query as operant to Array constructor function Key: CALCITE-6508 URL: https://issues.apache.org/jira/browse/CALCITE-6508

[jira] [Created] (CALCITE-6508) Parse error when using scalar sub-query as operant to Array constructor function

2024-07-31 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6508: --- Summary: Parse error when using scalar sub-query as operant to Array constructor function Key: CALCITE-6508 URL: https://issues.apache.org/jira/browse/CALCITE-6508

[jira] [Comment Edited] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869048#comment-17869048 ] Ian Bertolacci edited comment on CALCITE-6504 at 7/26/24 11:3

[jira] [Commented] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869048#comment-17869048 ] Ian Bertolacci commented on CALCITE-6504: - Some light math and playing ar

[jira] [Commented] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869038#comment-17869038 ] Ian Bertolacci commented on CALCITE-6504: - We're currently investi

[jira] [Comment Edited] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869038#comment-17869038 ] Ian Bertolacci edited comment on CALCITE-6504 at 7/26/24 10:1

[jira] [Updated] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-6504: Description: JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect

[jira] [Created] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6504: --- Summary: JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join Key: CALCITE-6504 URL: https

[jira] [Updated] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Bertolacci updated CALCITE-6504: Description: JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect

[jira] [Created] (CALCITE-6504) JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join

2024-07-26 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6504: --- Summary: JOIN_SUB_QUERY_TO_CORRELATE/Join SubQueryRemoveRule produces incorrect tree when using correlated sub-query in on clause of equi-join Key: CALCITE-6504 URL: https

[jira] [Created] (CALCITE-6499) Deep Clone SqlNodes

2024-07-24 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6499: --- Summary: Deep Clone SqlNodes Key: CALCITE-6499 URL: https://issues.apache.org/jira/browse/CALCITE-6499 Project: Calcite Issue Type: Improvement

[jira] [Created] (CALCITE-6499) Deep Clone SqlNodes

2024-07-24 Thread Ian Bertolacci (Jira)
Ian Bertolacci created CALCITE-6499: --- Summary: Deep Clone SqlNodes Key: CALCITE-6499 URL: https://issues.apache.org/jira/browse/CALCITE-6499 Project: Calcite Issue Type: Improvement

Preserving alias/Frames in RelBuilder when extending RelBuilder?

2024-06-20 Thread Ian Bertolacci
see what the top Frame’s alias is without modifying the core RelBuilder code? Thanks! -Ian Bertolacci

RE: Re: Existing rules for duplication of filter conditions above joins which should not be pushed down by FilterIntoJoinRule ?

2023-09-27 Thread Ian Bertolacci
om.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14534098 > > On Tue, Sep 26, 2023 at 10:10 PM Ian Bertolacci > mailto:ia...@workday.com.inva>lid> wrote: > > > > Hi, > > I was wondering if there exist any rules to duplicate filters which ex

Existing rules for duplication of filter conditions above joins which should not be pushed down by FilterIntoJoinRule ?

2023-09-26 Thread Ian Bertolacci
Hi, I was wondering if there exist any rules to duplicate filters which exist above the join, whose effect is dependent on the result of the join and therefore cannot be *pushed* below a join, but could be *duplicated* below the join. For example: `select … from A LEFT join B on … where B.field

RE: Re: Filter push-down below join not occurring for custom UDF

2023-08-30 Thread Ian Bertolacci
2 for how to activate it, the rest 15 to 23 on > > how to read the output): > > https://www.slideshare.net/StamatisZampetakis/debugging-planning-issues-using-calcites-builtin-loggers > > . > > > > Hth, > > Alessandro > > > > > > > > On Wed,

RE: Re: Filter push-down below join not occurring for custom UDF

2023-08-30 Thread Ian Bertolacci
> > . > > > > Hth, > > Alessandro > > > > > > > > On Wed, 30 Aug 2023 at 04:14, Ian Bertolacci > > mailto:ia...@workday.com.inva>lid> wrote: > > > > > Hello, > > > We have defined some extra comparison functions for

Filter push-down below join not occurring for custom UDF

2023-08-29 Thread Ian Bertolacci
Hello, We have defined some extra comparison functions for our users. However, we’ve noticed that filter push-down (using ` CoreRules.FILTER_INTO_JOIN`) does not occur when the operands to the functions come from the opposite side of an outer join (i.e. from the right side of a left outer join,

Why is Filter's condition required to be flat?

2023-08-09 Thread Ian Bertolacci
Hello, I’m curious about why Filter requires that the condition be a flattened tree? We have some transformations which occasionally result in non-flat trees, which causes issues for us in testing. I know we can avoid this by constructing expressions using RelBuilder or the RexUtil.composeConjun

[jira] [Commented] (CALCITE-5722) Sarg.isComplementedPoints fails with anti-points which are equal under `compareTo` but not `equals`

2023-05-25 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726356#comment-17726356 ] Ian Bertolacci commented on CALCITE-5722: - It also has the effect that {{

[jira] [Comment Edited] (CALCITE-5722) Sarg.isComplementedPoints fails with anti-points which are equal under `compareTo` but not `equals`

2023-05-25 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726339#comment-17726339 ] Ian Bertolacci edited comment on CALCITE-5722 at 5/25/23 6:2

[jira] [Comment Edited] (CALCITE-5722) Sarg.isComplementedPoints fails with anti-points which are equal under `compareTo` but not `equals`

2023-05-25 Thread Ian Bertolacci (Jira)
[ https://issues.apache.org/jira/browse/CALCITE-5722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726339#comment-17726339 ] Ian Bertolacci edited comment on CALCITE-5722 at 5/25/23 6:2

  1   2   3   >