Maybe "sal" is NOT NULL and Calcite is smart enough to realize it can
translate that to COUNT(*)?
Gian
On Thu, Feb 2, 2017 at 2:29 PM, Eli Levine wrote:
> Greetings! I have encountered what appears to be a bug in Calcite while
> working on the Pig adapter [1].
>
> This query:
>
> select deptno
Hey Calcites,
I'm hoping for some feedback on how to best handle Druid multi-value
columns in SQL.
Background: Druid has a "multi-value column" feature that lets you have
string columns with more than one value per row. Details and examples of
how this works are here:
http://druid.io/docs/latest/
mewhere.
Gian
On Wed, Feb 15, 2017 at 12:10 PM, Julian Hyde wrote:
> How about modeling them as a collection (ARRAY or MULTISET)? This document
> describes them pretty well: http://farrago.sourceforge.
> net/design/CollectionTypes.html <http://farrago.sourceforge.
> net/design/Co
I've run into SQL in the wild that did something like:
CAST(ts AS DATE) + EXTRACT(HOUR FROM ts) * INTERVAL '1' HOUR
Which the user expected to mean the same thing as:
FLOOR(ts TO HOUR)
I started writing a planner rule to make the former work, but ran into type
errors since Calcite treats
e argument to a timestamp before you add the
> interval. For example,
>
> DATE ‘2017-02-16' + INTERVAL ’25’ HOUR yields DATE ‘2017-02-17’
> CAST(DATE ‘2017-02-16’ AS TIMESTAMP) + INTERVAL ’25’ HOUR yields
> TIMESTAMP ‘2017-02-18 01:00:00’.
>
> Julian
>
>
>
>
( .. TO timeUnit) is non-standard, if that matters.
>
> Have you seen DateRangeRules (and DateRangeRulesTest)? The work you are
> doing would fit in perfectly.
>
> Julian
>
>
>
> > On Feb 16, 2017, at 1:28 PM, Gian Merlino wrote:
> >
> > Fair enough, so I guess th
clause should not affect the number of rows.
>
> Julian
>
>
>
> > On Feb 15, 2017, at 10:52 PM, Gian Merlino wrote:
> >
> > ARRAY doesn't sound right:
> >
> >> Arrays can be compared for exact match with = or <>:
> >> No other in
. So far I have it has been a
pleasure working with other folks in the Calcite community and I am glad to
be part of it.
Gian
On Fri, Feb 17, 2017 at 8:30 AM, Josh Elser wrote:
> Welcome, Gian!
>
>
> Julian Hyde wrote:
>
>> On behalf of the PMC I am delighted to announce G
PushProjector has some code like this in "convertProject":
if (
(projRefs.cardinality() == nChildFields)
&& (childPreserveExprs.size() == 0)) {
return null;
Which, if I am following right, means when there aren't any preserve-exprs,
we will only push a project past a fil
Is anyone out there using Avatica with servers (that don't share connection
state) behind load balancers? Is that a workable configuration? I'm
guessing it might be if sticky sessions are enabled on the load balancer.
What does the client do when the session switches to a new backend server?
I fou
Gian
On Thu, May 25, 2017 at 12:55 PM, James Taylor
wrote:
> If you're using Avatica in the context of Phoenix, you might be interested
> in PHOENIX-3654 which is about adding a load balancer to the Phoenix Query
> Server.
>
> Thanks,
> James
>
> On Thu, May 25
weren't planning
> on doing any client retries, but that's probably a good idea to add.
>
> James
>
> On Thu, May 25, 2017 at 1:28 PM, Gian Merlino wrote:
>
> > I'm asking in the context of Druid, which also uses Avatica. Although it
> > sou
al configuration that comes to mind is specifying the
> > "jdbc:phoenix:thin" jdbc url prefix
> >
> >
> > On 5/25/17 7:25 PM, Gian Merlino wrote:
> >>
> >> I was thinking that client retries are probably a bad thing, though,
> >> insofar as they ar
Hey Jack,
Based on the URL http://localhost:8082/druid/v2/sql it looks like you're
using the built in Druid SQL. It doesn't support authentication yet so you
could put anything in for user/password (it will be ignored). This will
change in the future, when there will be a server-side option to ena
SqlLine.begin(SqlLine.java:668)
> at sqlline.SqlLine.start(SqlLine.java:373)
> at sqlline.SqlLine.main(SqlLine.java:265)
>
>
>
>
>
> On Mon, Jun 26, 2017 at 3:04 PM, Gian Merlino wrote:
>
> > Hey Jack,
> >
> > Based on the URL http://loca
We have a similar problem in the Druid community. PR review backlogs are
long and not all committers help out equally. We're grateful when anyone
does show an interest in developing the Druid community rather than just
using Druid or contributing patches. But that interest in the community is
not u
Druid uses Calcite for SQL parsing and planning. The code is all in
https://github.com/druid-io/druid/tree/master/sql/src/main/java/io/druid/sql
if you want to take a look. The user-facing docs are at
http://druid.io/docs/latest/querying/sql.html if you want to see how users
interact with it.
The
I built a version of Druid using an artifact I built from the
calcite-1.14.0 tag in git (7426eef84) and our SQL test suite passed. So,
+1! (non-binding)
Gian
On Wed, Sep 27, 2017 at 4:25 PM, Michael Mior wrote:
> Thanks for the comments. Will make note of the history change for after the
> rele
Hi Calcites,
In Druid SQL we have a connection time zone concept; see the mentions of
"sqlTimeZone" here: http://druid.io/docs/latest/querying/sql.html. It
affects the time zone of any operation involving timestamps, including the
interpretation of literals, the behavior of functions like FLOOR an
Hi Calcites,
I would like to raise the idea of adding druid-sql (
http://search.maven.org/#artifactdetails%7Cio.druid%7Cdruid-sql%7C0.11.0%7Cjar)
as a dependency in Calcite's Druid adapter. It should reduce the size of
calcite-druid substantially, since it would mostly just be calling into
druid-s
Welcome to Calcite!!
To start go to File > Open... and open up Calcite's "pom.xml" file. When
IntelliJ asks if you want to open it as a project or a file, say you want a
project. Also say yes when it asks if you want a new window. Then,
IntelliJ's Maven project importer should handle the rest.
I
othetical case you mentioned is also worth considering, to
> ease up the development process, we can consider moving calcite-druid as a
> module in druid, so that we make release of both druid-sql and
> calcite-adapter together.
>
> On Wed, 7 Feb 2018 at 09:02 Gian Merlino wrote:
>
> the execution part and result serde which pulls in lots of druid
> > dependencies can reside in separate module and calcite druid-adapter need
> > not depend on that module.
> >
> > I think, the hypothetical case you mentioned is also worth considering,
> to
> > ease up
ill be the
> transition. You will need to convince the Hive developers that the move is
> worthwhile. (It will help if you can point to some quick benefits to making
> the transition.)
>
> Julian
>
>
> > On Feb 7, 2018, at 2:59 PM, Gian Merlino wrote:
> >
> > I
In Druid I was hoping to eventually deal with this using FIRST and LAST
aggregators. So the original query would be:
SELECT a, FIRST(b), FIRST(c) FROM T GROUP BY a
However, we have only implemented FIRST and LAST for numeric types, not for
strings or arrays yet. And we also haven't wired it int
Hi Gelbana,
My understanding is that the planner rules are not meant to change row
types or query behavior. They are just meant to transform into something
that is equivalent, but hopefully better in some way (lower cost, proper
calling convention, etc).
What you can do is have your SQLiQuery's d
Hey Calcites,
I'm working on embedding Calcite into Druid (http://druid.io/,
https://github.com/druid-io/druid/pull/3682) and am running into a problem
that is making me wonder if the approach I'm using makes sense.
Consider the expression EXTRACT(YEAR FROM __time). Calcite has a standard
convert
e.
>
> As long as you build the valuable stuff into planner rules, new relational
> operators (if necessary) and use the schema SPI, you should be able to
> change packaging in the future.
>
> Julian
>
>
>
>
> > On Nov 17, 2016, at 1:59 PM, Gian Merlino wrote:
&
Prepare that
> works for your environment, one with an explicit convertletTable rather
> than just using the default.
>
> Julian
>
>
> > On Nov 17, 2016, at 5:01 PM, Gian Merlino wrote:
> >
> > Hey Julian,
> >
> > If the convertlets were customizable with
nd will commit shortly.
>
> Julian
>
> > On Nov 23, 2016, at 12:32 PM, Gian Merlino wrote:
> >
> > Do you know examples of projects that use Planner or PlannerImpl
> currently
> > (from "outside")? As far as I can tell, within Calcite itself it's o
re you sorting on columns that do not appear in the final result?
>
> Julian
>
>
> > On Nov 28, 2016, at 10:45 AM, Gian Merlino wrote:
> >
> > I traveled a bit down the Frameworks/Planner road and got most of my
> tests
> > passing, but ran into s
With Tableau you can use a TDC file to tweak the SQL generation. If you set
CAP_QUERY_GROUP_BY_ALIAS and CAP_QUERY_GROUP_BY_DEGREE to "no" then Tableau
will avoid using aliases and ordinals for GROUP BY. See
http://kb.tableau.com/articles/knowledgebase/customizing-odbc-connections
for more info.
T
.programs(Programs.ofRules(myRules))
.executor(new RexExecutorImpl(Schemas.createDataContext(null)))
.context(Contexts.EMPTY_CONTEXT)
.build();
return Frameworks.getPlanner(frameworkConfig);
Gian
On Sat, Dec 3, 2016 at 5:53 PM, Gian Merlino wrote:
> Sure, I added
d collation
> as a trait, and that made subsets non-disjoint (a RelNode can be sorted on
> (x, y), and also on (x), and also on (), and also on (z)) so we made
> RelSubset just a view onto a RelSet, filtering the list of RelNodes
> according to the ones that have (“subsume”) the desir
n-disjoint (a RelNode can be sorted
> on
> >> (x, y), and also on (x), and also on (), and also on (z)) so we made
> >> RelSubset just a view onto a RelSet, filtering the list of RelNodes
> >> according to the ones that have (“subsume”) the desired traits.
> >>
BI
>
> On Wed, Dec 14, 2016 at 9:00 PM, Gian Merlino wrote:
>
> > With Tableau you can use a TDC file to tweak the SQL generation. If you
> set
> > CAP_QUERY_GROUP_BY_ALIAS and CAP_QUERY_GROUP_BY_DEGREE to "no" then
> Tableau
> > will avoid using aliases
Fwiw, Druid has a built-in set of Calcite rules now, and it does support
pushing down order by and limit. It can even re-order the grouping
dimensions for better performance, and choose timeseries, topN, or groupBy
as appropriate. Depending on what you're trying to do, this may work for
you. The co
ork right now, and that’s not bad per se, but it will be
> bad if one of the copies of the code starts to fall behind in functionality.
>
> Julian
>
>
> > On Dec 19, 2016, at 10:57 AM, Gian Merlino wrote:
> >
> > Fwiw, Druid has a built-in set of Calcite rules now
This was totally user error, I was ignoring "fields" and "collation" of the
RelRoot. Passing "collation" to planner.transform stopped it from removing
the sort.
Gian
On Wed, Dec 14, 2016 at 3:21 PM, Gian Merlino wrote:
> I don't think so, since my test
Date dimension tables don't work well with Druid. Druid works best if you
store the timestamp in Druid's native timestamp column and then use Druid's
native time functions to do date filtering and grouping.
Instead of:
select "datasource"."username_0" as "c0", "dimdate"."Date" as "c1",
count("dat
Do you have any docs or examples or suggestions around how that could be
done? It does sound like it'd be useful but I don't know where to start.
Gian
On Mon, Jan 23, 2017 at 12:19 PM, Julian Hyde wrote:
>
> > On Jan 23, 2017, at 12:14 PM, Gian Merlino wrote:
> >
It pains me to admit that the reason Druid still uses Guava 16 is that we still
support Hadoop 2, which relies on APIs that have been removed in newer versions
of Guava. From time to time it is proposed that the project drops support for
Hadoop 2 in order to be free to move up Guava versions, an
de for those APIs.)
>
> I am frustrated that the Hadoop folks get locked into a particular version of
> Guava (and JDK… don’t get me started on that one) and in Calcite I would like
> to do the opposite.
>
> Julian
>
>
> > On Dec 8, 2022, at 9:24 AM, Gian Merlino wrote
will be needed to main.yml (GitHub CI), comments in
> gradle.properties, and history.md (release notes for the upcoming
> release).
>
> Julian
>
> On Fri, Dec 9, 2022 at 12:30 PM Gian Merlino wrote:
> >
> > If Calcite ends up dropping the minimum to 16, that would c
:08 Julian Hyde wrote:
> The bug is now fixed. (I started from your PR, but I had to do quite a lot of
> extra work. Despite what I said earlier, there were several places where
> Calcite was using APIs added between Guava 16 and 19.)
>
> > On Dec 9, 2022, at 1:30 PM, Gian Merli
cally and continue to make progress integrating
this new version into Druid.
On 2023/01/04 06:15:00 Gian Merlino wrote:
> Thank you! I've built a copy of main and have started working on integrating
> it into Druid. I'll let the group know if anything interesting comes up.
> Th
Some more detail:
- the PR for CALCITE-5477 is https://github.com/apache/calcite/pull/3249
- the PR for CALCITE-5479 is https://github.com/apache/calcite/pull/3030
I've just pushed up some updates to reflect the new approach we discussed for
guava backwards-compat in CALCITE-5477, and to sync up
I committed the patch for CALCITE-5477. I would appreciate a review on
CALCITE-5479, if someone has a chance.
On 2023/06/07 09:53:08 Gian Merlino wrote:
> Some more detail:
>
> - the PR for CALCITE-5477 is https://github.com/apache/calcite/pull/3249
> - the PR for CALCITE-5
gt;>> could we review this pr, so that it could be merged in 1.35. then
> >> the
> >>>>> 1.35
> >>>>>> will almost have the full spark collection function.
> >>>>>> I would very appreciate a review
When testing this with Apache Druid we found a problem: the change in
CALCITE-5747 broke a few of our test cases due to this piece:
https://github.com/apache/calcite/pull/3245/files#diff-e873041549333502af52ece8a1b34301ae5a059ff4719e9bddbaef48929e7047L7338-L7341
Essentially, FLOOR and CEIL no lo
I'm looking at adding system fields to certain tables in Druid: they should
be referenceable by name but shouldn't show up through star-expansion. For
example, we'd like to expose the name of the data file currently being read
as "__filename".
I'm trying to figure out if this is something we can d
ded
> in the expansion of ‘*’ or ‘alias.*’ would be useful. It would be fairly easy
> to implement because it only affects star expansion (and therefore only
> affects the validator and sql-to-rel-converter, not the planner).
>
> Julian
>
>
> > On Oct 27, 2023, at 12
Gian Merlino created CALCITE-4121:
-
Summary: Avatica misplaces properties from URL while connecting
Key: CALCITE-4121
URL: https://issues.apache.org/jira/browse/CALCITE-4121
Project: Calcite
Gian Merlino created CALCITE-1658:
-
Summary: DateRangeRules issues
Key: CALCITE-1658
URL: https://issues.apache.org/jira/browse/CALCITE-1658
Project: Calcite
Issue Type: Bug
Gian Merlino created CALCITE-1719:
-
Summary: SortCollapseRule for collapsing nested sorts
Key: CALCITE-1719
URL: https://issues.apache.org/jira/browse/CALCITE-1719
Project: Calcite
Issue
Gian Merlino created CALCITE-1799:
-
Summary: OR IN Subquery conversion wrong
Key: CALCITE-1799
URL: https://issues.apache.org/jira/browse/CALCITE-1799
Project: Calcite
Issue Type: Bug
Gian Merlino created CALCITE-1873:
-
Summary: Validator errors when grouping by ordinals that refer to
aliases
Key: CALCITE-1873
URL: https://issues.apache.org/jira/browse/CALCITE-1873
Project
Gian Merlino created CALCITE-1874:
-
Summary: Configurable SqlToRelConverter.Config in Frameworks
Key: CALCITE-1874
URL: https://issues.apache.org/jira/browse/CALCITE-1874
Project: Calcite
Gian Merlino created CALCITE-1910:
-
Summary: NPE on filtered aggregators using "IN"
Key: CALCITE-1910
URL: https://issues.apache.org/jira/browse/CALCITE-1910
Project: Calcite
Issue
Gian Merlino created CALCITE-2007:
-
Summary: RexSimplify incorrectly simplifies AND bounds
Key: CALCITE-2007
URL: https://issues.apache.org/jira/browse/CALCITE-2007
Project: Calcite
Issue
Gian Merlino created CALCITE-2008:
-
Summary: Fix braces in TRIM signature
Key: CALCITE-2008
URL: https://issues.apache.org/jira/browse/CALCITE-2008
Project: Calcite
Issue Type: Bug
Gian Merlino created CALCITE-2635:
-
Summary: getMonotonocity is slow on wide tables
Key: CALCITE-2635
URL: https://issues.apache.org/jira/browse/CALCITE-2635
Project: Calcite
Issue Type
Gian Merlino created CALCITE-3178:
-
Summary: RexSimplify.simplifyOrTerms slow with large OR filters
Key: CALCITE-3178
URL: https://issues.apache.org/jira/browse/CALCITE-3178
Project: Calcite
Gian Merlino created CALCITE-1347:
-
Summary: Druid adapter column detection misses strings
Key: CALCITE-1347
URL: https://issues.apache.org/jira/browse/CALCITE-1347
Project: Calcite
Issue
Gian Merlino created CALCITE-1404:
-
Summary: BindableAggregate not respecting filterArg
Key: CALCITE-1404
URL: https://issues.apache.org/jira/browse/CALCITE-1404
Project: Calcite
Issue Type
Gian Merlino created CALCITE-1436:
-
Summary: AggregateNode NPE for aggregators other than SUM/COUNT
Key: CALCITE-1436
URL: https://issues.apache.org/jira/browse/CALCITE-1436
Project: Calcite
Gian Merlino created CALCITE-1437:
-
Summary: AggregateNode NPE for aggregators other than SUM/COUNT
Key: CALCITE-1437
URL: https://issues.apache.org/jira/browse/CALCITE-1437
Project: Calcite
Gian Merlino created CALCITE-1479:
-
Summary: AssertionError in ReduceExpressionsRule on multi-column
IN subquery
Key: CALCITE-1479
URL: https://issues.apache.org/jira/browse/CALCITE-1479
Project
Gian Merlino created CALCITE-1488:
-
Summary: ValuesReduceRule doesn't propagate rowType on Project of
empty Values
Key: CALCITE-1488
URL: https://issues.apache.org/jira/browse/CALCITE-1488
Pr
Gian Merlino created CALCITE-5428:
-
Summary: Reduce minimum Guava version to 16.0.1.
Key: CALCITE-5428
URL: https://issues.apache.org/jira/browse/CALCITE-5428
Project: Calcite
Issue Type
Gian Merlino created CALCITE-5477:
-
Summary: Prefer Util.checkArgument over Preconditions.checkArgument
Key: CALCITE-5477
URL: https://issues.apache.org/jira/browse/CALCITE-5477
Project: Calcite
Gian Merlino created CALCITE-5478:
-
Summary: Use highest input precision for datetimes in
SqlTypeFactoryImpl.leastRestrictive
Key: CALCITE-5478
URL: https://issues.apache.org/jira/browse/CALCITE-5478
Gian Merlino created CALCITE-5479:
-
Summary: Restore consistent handling of iFormalOperand in sequence
checkers
Key: CALCITE-5479
URL: https://issues.apache.org/jira/browse/CALCITE-5479
Project
Gian Merlino created CALCITE-5865:
-
Summary: ClassCastException with FLOOR and CEIL on conformances
that are not builtin
Key: CALCITE-5865
URL: https://issues.apache.org/jira/browse/CALCITE-5865
Gian Merlino created CALCITE-6581:
-
Summary: Incorrect INTERVAL math for WEEK and QUARTER
Key: CALCITE-6581
URL: https://issues.apache.org/jira/browse/CALCITE-6581
Project: Calcite
Issue
75 matches
Mail list logo