Re: -jdk10 for Calcite on Jenkins (Re: Calcite-Master - Build # 246 - Still Failing)

2018-04-12 Thread Kevin Risden
I just put up a PR to fix the remaining JDK 10 failures for CALCITE-2238
and CALCITE-2239 related to the Pig and Spark modules. I am working on a PR
for CALCITE-2237 to enable JDK 10 on Travis CI as well.

Kevin Risden

On Mon, Apr 9, 2018 at 6:40 PM, Kevin Risden  wrote:

> Also https://issues.apache.org/jira/browse/CALCITE-2063 has some linked
> tickets for Pig/Spark to try to get JDK 10 to completely pass.
>
> Kevin Risden
>
> On Mon, Apr 9, 2018 at 6:38 PM, Kevin Risden  wrote:
>
>> https://issues.apache.org/jira/browse/CALCITE-2237
>>
>> I had created CALCITE-2237 to address this. There is a PR waiting for
>> review :)
>>
>> Kevin Risden
>>
>> On Mon, Apr 9, 2018 at 5:28 PM, Josh Elser  wrote:
>>
>>> I've disabled JDK10 builds for Calcite as these appear to be broken
>>> around maven-surefire-plugin.
>>>
>>> https://builds.apache.org/job/Calcite-Master/247/jdk=JDK%201
>>> 0%20(latest),label_exp=ubuntu&&!cloud-slave&&!H31/console
>>>
>>> Trying to get the matrix job up and healthy again for Calcite.
>>>
>>> On 4/9/18 2:18 PM, Apache Jenkins Server wrote:
>>>
 The Apache Jenkins build system has built Calcite-Master (build #246)

 Status: Still Failing

 Check console output at https://builds.apache.org/job/
 Calcite-Master/246/ to view the results.


>>
>


Re: Supporting named row construction in Calcite SQL

2018-04-12 Thread Michael Mior
FYI, I talked to Julian earlier this week and he will be adding Beam to the
powered by page since he has a doc for generating the image with the logos.

--
Michael Mior
mm...@apache.org

2018-04-12 4:06 GMT-04:00 Shuyi Chen :

> @Andrew, great to see BEAM is also using Calcite streaming SQL. Maybe you
> can help adding an entry in the Calcite powered_by page
>  for BEAM  by editing
> site/_docs/powered_by.md
>  1aa810bc92051b46555ee4caf24bd6c3>.
> Also,
> can you explain a bit more on how you plan to use streaming SQL to
> transform
> arbitrary JSON objects with and w/o the AS STRUCT syntax?
> For adding DDL in BEAM, please take a look at the server module and the
> TYPE DDL (https://issues.apache.org/jira/browse/CALCITE-2045) I am adding.
> Let me know if you have any comments and need any help.
>
> @Rong, I think it's better to conform with the ROW SQL standard, and add
> new grammar to handle named struct construction.
> This should work with the TYPE DDL, and we should be able to CAST the
> created STRUCT as a custom type defined using DDL.
>
> @Julian, thanks for the suggestions. I think the AS STRUCT addition should
> do it.
>
> Shuyi
>
> On Mon, Apr 9, 2018 at 4:36 AM, Julian Hyde 
> wrote:
>
> > For what it’s worth, ROW is standard SQL. If it does what you need, we
> > should use it.
> >
> > Reading your case quickly, I perceived that you needed a concise way to
> > assign field names, and AS STRUCT seemed to do that.
> >
> > But staying within the standard is always preferred. BigQuery isn’t
> always
> > good at that.
> >
> > Julian
> >
> > > On Apr 5, 2018, at 10:18, Rong Rong  wrote:
> > >
> > > Thanks for the fantastic proposal @shuyi. I think the STRUCT idea is
> > great
> > > considering ROW is not standard SQL either. As a user of calcite I
> have a
> > > couple questions.
> > >
> > > Since ROW constructor is so similar with STRUCT, would it be a good
> idea
> > to
> > > consolidate the two syntax? Or have a clear distinction between?
> > >
> > > Whats the relationship going forward with DDL, for example
> CALCITE-2045.
> > > DDL seems more flexible in terms of defining the structure not just on
> > > field names but also field types. Maybe @andrew can share more on the
> use
> > > cases on calcite on beam steaming integration?
> > >
> > > Thanks,
> > > Rong
> > >
> > >
> > > On Thu, Apr 5, 2018, 10:05 AM Andrew Pilloud
>  > >
> > > wrote:
> > >
> > >> As a user of Calcite working on adding streaming SQL to Apache Beam
> this
> > >> sounds like a fantastic proposal. Our initial goal is to be able to
> run
> > SQL
> > >> queries that transform arbitrary JSON objects. Without this syntax
> > objects
> > >> must be flattened when they pass through the transform. Is this
> > something
> > >> that might make it into 1.17?
> > >>
> > >> We have also had some discussion about adding DDL to Beam so a user
> can
> > >> describe the schema of a stream of JSON in pure SQL. Our current
> though
> > is
> > >> to use Big Query compatible STRUCT and ARRAY syntax. Big Query is a
> > popular
> > >> sink for our users. Syntax compatible with Big Query would be a big
> plus
> > >> for us.
> > >>
> > >> Andrew
> > >>
> > >>> On Thu, Apr 5, 2018 at 12:43 AM Shuyi Chen 
> wrote:
> > >>>
> > >>> @Michael, @Albert, yes, I dont think it is SQL standard. But I think
> > it's
> > >>> very useful in the context of streaming SQL, e.g. Flink SQL, where
> the
> > >>> sinks can be a database or endpoints with defined protobuf/thrift
> > schema.
> > >>> They usually have complex structure. Supporting complex structure in
> > SQL
> > >>> output will make it much easier to write to different sinks with
> > >> predefined
> > >>> schemas in a unified way,
> > >>>
> > >>> @julian, that's great suggestion, I think instead of extending the
> ROW
> > >>> constructor, which is not SQL standard, adding a new extension might
> be
> > >> the
> > >>> right way to go. Looking at the STRUCT big query syntax, we can
> > implement
> > >>> something like the following:
> > >>>
> > >>> SELECT STRUCT(a as first_name, b as last_name, STRUCT(c as zip code,
> d
> > as
> > >>> street, e as state) as address) as record FROM example_table
> > >>>
> > >>> On Wed, Apr 4, 2018 at 5:51 PM, Julian Hyde 
> > >>> wrote:
> > >>>
> >  If I recall correctly, Google BigQuery has SELECT AS STRUCT. It’s
> not
> >  standard, but if it does what you need we could consider adopting
> that
> >  syntax.
> > 
> >  Julian
> > 
> > > On Apr 4, 2018, at 10:23 AM, Albert  wrote:
> > >
> > > if it is not SQL standard, it's just a matter of categorizing it to
> > >>> some
> > > dialect ?
> > >
> > >> On Wed, Apr 4, 2018 at 10:19 AM, Michael Mior  >
> 

[jira] [Created] (CALCITE-2251) Support AS STRUCT syntax to create named STRUCT in SQL similar to Google BigQuery

2018-04-12 Thread Shuyi Chen (JIRA)
Shuyi Chen created CALCITE-2251:
---

 Summary: Support AS STRUCT syntax to create named STRUCT in SQL 
similar to Google BigQuery
 Key: CALCITE-2251
 URL: https://issues.apache.org/jira/browse/CALCITE-2251
 Project: Calcite
  Issue Type: New Feature
  Components: core
Reporter: Shuyi Chen
Assignee: Shuyi Chen


See [Google BigQuery 
grammar|https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax].

We want to support something like the following:
{code:java}
SELECT STRUCT(a as first_name, b as last_name, STRUCT(c as zip code, d as
street, e as state) as address) as record FROM example_table
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)