Re: [VOTE] Release Apache Calcite 1.34.0 (release candidate 0)

2023-03-13 Thread Scott Reynolds
+1 (non-binding) * Downloaded * checked LICENSE, NOTICE, README * compiled and ran tests on MacOS * reviewed release notes * Ran Twilio's internal test suite Twilio's internal test suite is affected by CALCITE-5510 -- Order by using literals in RelToSqlConverter -- but happy to make this

Re: Output column names of Calc discarded by VolcanoPlanner in Calcite 2.22+

2023-02-03 Thread Scott Reynolds
Could you explain more how this affects Beam? Can Beam capture the row type from the logical plan and pass it through to the output phase? In my company's project, that is what we did. The project crafts the logical plan, grabs the output type, executes the planner and passes the resulting

[jira] [Created] (CALCITE-5391) JoinOnUniqueToSemiJoinRule removes a Projections aliases

2022-11-18 Thread Scott Reynolds (Jira)
Scott Reynolds created CALCITE-5391: --- Summary: JoinOnUniqueToSemiJoinRule removes a Projections aliases Key: CALCITE-5391 URL: https://issues.apache.org/jira/browse/CALCITE-5391 Project: Calcite

[jira] [Created] (CALCITE-5226) Resolve security Vuln in Commons-DBCP

2022-08-03 Thread Scott Reynolds (Jira)
Scott Reynolds created CALCITE-5226: --- Summary: Resolve security Vuln in Commons-DBCP Key: CALCITE-5226 URL: https://issues.apache.org/jira/browse/CALCITE-5226 Project: Calcite Issue Type

[jira] [Created] (CALCITE-5025) Update commons-io:commons-io Directory Travesal vulnerabliltiy

2022-02-26 Thread Scott Reynolds (Jira)
Scott Reynolds created CALCITE-5025: --- Summary: Update commons-io:commons-io Directory Travesal vulnerabliltiy Key: CALCITE-5025 URL: https://issues.apache.org/jira/browse/CALCITE-5025 Project

Re: dynamic reflective schema

2022-02-22 Thread Scott Reynolds
Whenever I see "at Baz.bind(Unknown Source)" I am reminded how important it is, when debugging, to set the System Property calcite.debug = true

Re: Pushing filters with unsafe operations (CAST/DIVISION) below inner joins

2022-02-17 Thread Scott Reynolds
Is it feasible to prevent the filter push down in cases like this ( detect potential division by zero) ? What other exceptions that could happen? Should it only push down some filters and preserve the complex filter above the join? Regarding a Jira ticket, generating an exception when it should

Re: Apache Calcite - Generated code

2022-01-07 Thread Scott Reynolds
I am going to attempt to answer a few of your questions. The Enumberable implementation generates java code as a String. There is a Java Property caching per unique Java Code String and therefore, when the same Java Code is generated the same compiled byte code will be used. Where the Property is

Re: [DISCUSS] SBOM (Software Bill of Materials)

2021-12-30 Thread Scott Reynolds
When I was dealing with Log4j, I discovered uzaygezen-core is pretty old and pulls in log4j1.x: https://mvnrepository.com/artifact/com.google.uzaygezen/uzaygezen-core/0.2 But doesn't actually use log4j ( https://github.com/aioaneid/uzaygezen/search?q=log4j). For our project, I excluded log4j1.x

Materialized View and Lattice Suggester help

2021-08-10 Thread Scott Reynolds
Hi Calcite devs, Today our team deploys a Calcite service that uses Daily OLAP Cube tables and fine grain Fact tables. Daily OLAP Cube tables are used to vastly improve latency when querying for a wide date range but comes with a restriction – the date range *must* be UTC day granularity. When a

Re: [DISCUSS] New RexNode: RexListCmp

2020-07-21 Thread Scott Reynolds
I wanted to reply and share our recent requirement for handling SQL like the following `error_code IN (3002, 3030)' and the challenges we faced. For our implementation on top of Apache Kudu, each disjunction creates a `Scanner' – a resource we need to limit as it represents a denial of service

Re: RelMetadataQuery.getRowCount stackoverflow

2020-04-20 Thread Scott Reynolds
I have had this happen numerous times when writing new planner rules. Most of the time my rule is missing some boolean logic to prevent itself from transforming the call. This results in the rule continuously transforming it's previous transformations. I can usually see this happening when I add

Re: "lazy" optmization?

2020-03-07 Thread Scott Reynolds
Can this be achieved with EnumerableNestedBatchJoin? Would need to make the JdbcFilterRule and it's relation handle Correlation Variables so they can push down the filter's into the JDBC and Elastic Search RPCs. The EnumerableNestedBatchJoinRule [1] pushes a filter relation on top of the right

Re: Why can't RexLiteral.getValue2() get a double/float value?

2020-03-05 Thread Scott Reynolds
Use a switch Statement on literal.getTypeName(). Then for each SqlTypeName, call literal.getValueAs() with the appropriate java class type. Been meaning to update the Cassandra Adapter for this as well:

Increasing number of concurrent queries

2020-03-04 Thread Scott Reynolds
List, Our team's current application runs a thread pool for handling queries. Each time a query comes it it is placed in the run queue and executed outside of the HTTP RPC thread. This allows us to handle N concurrent queries where N is the size of the thread pool. I would like to change this to

Question about SortJoinTransposeRule and Inner Joins

2019-11-25 Thread Scott Reynolds
The performance of our queries are dependent on our ability to push the filter and sort into the RPC layer. Today the planner's SortJoinTransposeRule pushes the sort through

[jira] [Created] (CALCITE-3508) Strengthen JOINs when Filter enforces the nullable side(s) to non-nullable

2019-11-15 Thread Scott Reynolds (Jira)
Scott Reynolds created CALCITE-3508: --- Summary: Strengthen JOINs when Filter enforces the nullable side(s) to non-nullable Key: CALCITE-3508 URL: https://issues.apache.org/jira/browse/CALCITE-3508

Re: Query Compilation happening more often then expected

2019-09-18 Thread Scott Reynolds
Hi all, I have submitted my pull request in github and wrote up a design document as a comment on CALCITE-963 My implementation deviates

Query Compilation happening more often then expected

2019-09-13 Thread Scott Reynolds
Hi, Spent a bunch of time researching and staring at code today to understand the code compilation path within Calcite. I started down this path because we noticed whenever we changed the `startDate` or `endDate` for the query it went through compilation process again. We expected it to use the

percentile_cont function -- can't get my query to parse

2019-09-13 Thread Scott Reynolds
Sorry for such a super lame message, spent way to much time trying to get it to work. This query throws a parse error: select dataset, percentile_cont (0.25) WITHIN GROUP (order by rpc_time DESC) OVER(PARTITION BY dataset) as percentile_25 from QueryLogs; Fails with: Encountered