Re: Reconstruct object through partial select query

2019-05-13 Thread Shahar Cizer Kobrinsky
use the TaggedEventTypeInfo Would love to get feedback on that, whether that seems like the best solution or can it be more efficient. Thanks! Shahar On Mon, May 13, 2019 at 9:25 AM Shahar Cizer Kobrinsky < shahar.kobrin...@gmail.com> wrote: > Thanks for looking into it Hequn! > >

Re: Reconstruct object through partial select query

2019-05-13 Thread Shahar Cizer Kobrinsky
MapView[1] as an example of how to define a user-defined table > factory. > > Best, Hequn > > [1] > https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/dataview/MapView.scala > > On Sat, May 11, 2019 at 1:20

Re: Reconstruct object through partial select query

2019-05-10 Thread Shahar Cizer Kobrinsky
May 9, 2019 at 9:08 AM Shahar Cizer Kobrinsky < shahar.kobrin...@gmail.com> wrote: > Thanks Fabian, > > I'm looking into a way to enrich it without having to know the internal > fields of the original event type. > Right now what I managed to do is to map Car into a T

Re: Reconstruct object through partial select query

2019-05-09 Thread Shahar Cizer Kobrinsky
Thanks Fabian, I'm looking into a way to enrich it without having to know the internal fields of the original event type. Right now what I managed to do is to map Car into a TaggedEvent prior to the SQL query, tags being empty, then run the SQL query selecting *origin, enrich(.. ) as tags* Not sur

Re: Schema Evolution on Dynamic Schema

2019-04-08 Thread Shahar Cizer Kobrinsky
Re: Schema Evolution on Dynamic Schema To: Shahar Cizer Kobrinsky Cc: Rong Rong, user Hi Shahar, Sorry for the late response. The problem is not with the type of the retract stream, but with the GROUP BY aggregation operator. The optimizer is converting the plan into an aggregation operator that com

Re: Schema Evolution on Dynamic Schema

2019-03-28 Thread Shahar Cizer Kobrinsky
grate to a later Flink version. > Compatibility for bugfix releases (1.8.0 -> 1.8.1) is of course provided. > > Best, > Fabian > > [1] > https://ci.apache.org/projects/flink/flink-docs-release-1.7/dev/table/streaming/query_configuration.html#idle-state-retention-time >

Re: Calcite SQL Map to Pojo Map

2019-03-28 Thread Shahar Cizer Kobrinsky
type. On Thu, Mar 28, 2019 at 10:32 AM Shahar Cizer Kobrinsky < shahar.kobrin...@gmail.com> wrote: > Hey Rong, > > I don't think this is about a UDF, i reproduce the same exception with a > simple map['a','b'] where the Pojo has a Map property > btw

Re: Calcite SQL Map to Pojo Map

2019-03-28 Thread Shahar Cizer Kobrinsky
Hey Rong, I don't think this is about a UDF, i reproduce the same exception with a simple map['a','b'] where the Pojo has a Map property btw for the UDF i'm already doing it (clazz is based on the specific map im creating): @Override public TypeInformation getResultType(Class[] signature) { r

Re: Map UDF : The Nothing type cannot have a serializer

2019-03-22 Thread Shahar Cizer Kobrinsky
Thanks Rong, Yes for some reason i thought i need a table function, but scalar works! Yes the map constructor is what i started with but then figured it doesn't support conditional entries. On Thu, Mar 21, 2019 at 6:07 PM Rong Rong wrote: > Based on what I saw in the implementation, I think you

Re: Schema Evolution on Dynamic Schema

2019-03-19 Thread Shahar Cizer Kobrinsky
My bad. it actually did work with Select a, map['sumB', sum(b) ,'sumC' , sum(c) ) as metric_map group by a do you think thats OK as a workaround? main schema should be changed that way - only keys in the map On Tue, Mar 19, 2019 at 11:50 AM Shahar Cizer Kobrinsky < sha

Re: Schema Evolution on Dynamic Schema

2019-03-19 Thread Shahar Cizer Kobrinsky
result semantics. > I'd recommend to bootstrap the state of the new query from scatch. > > Best, Fabian > > > > Am Mo., 18. März 2019 um 20:02 Uhr schrieb Shahar Cizer Kobrinsky < > shahar.kobrin...@gmail.com>: > >> Or is it the SQL state that is incompati

Re: Schema Evolution on Dynamic Schema

2019-03-18 Thread Shahar Cizer Kobrinsky
Or is it the SQL state that is incompatible.. ? On Mon, Mar 18, 2019 at 11:44 AM Shahar Cizer Kobrinsky < shahar.kobrin...@gmail.com> wrote: > Thanks Guys, > > I actually got an error now adding some fields into the select statement: > > java.lang.RuntimeException: Error whi

Re: Schema Evolution on Dynamic Schema

2019-03-18 Thread Shahar Cizer Kobrinsky
Thanks Guys, I actually got an error now adding some fields into the select statement: java.lang.RuntimeException: Error while getting state at org.apache.flink.runtime.state.DefaultKeyedStateStore.getState(DefaultKeyedStateStore.java:62) at org.apache.flink.streaming.api.operators.StreamingRunti

Re: Schema Evolution on Dynamic Schema

2019-03-07 Thread Shahar Cizer Kobrinsky
Thanks for the response Rong. Would be happy to clarify more. So there are two possible changes that could happen: 1. There could be a change in the incoming source schema. Since there's a deserialization phase here (JSON -> Pojo) i expect a couple of options. Backward compatible changes

Re: Dynamically Generated Classes - Cannot load user class

2018-10-22 Thread Shahar Cizer Kobrinsky
operator fails? From: Hequn Cheng Sent: Monday, October 22, 2018 6:33:52 PM To: Shahar Cizer Kobrinsky Cc: user Subject: Re: Dynamically Generated Classes - Cannot load user class Hi shkob > i tried to use getRuntimeContext().getUserCodeClassLoader() as the loader

Re: Custom Trigger + SQL Pattern

2018-10-19 Thread Shahar Cizer Kobrinsky
se on either window end or a special "last" event, the > lastUDAF outputs multi last events. > After the window, we perform a splitUDTF to split the lastEvents to multi > single events. > > Best, Hequn > > > On Wed, Oct 17, 2018 at 12:38 AM Shahar Cizer Kobrinsky <

Re: Custom Trigger + SQL Pattern

2018-10-16 Thread Shahar Cizer Kobrinsky
Im wondering how does that work, it seems that a table function still takes a single row's values as an input, am i wrong (or at least that is how the examples show)? How would the SQL look like? On Fri, Oct 12, 2018 at 9:15 PM Hequn Cheng wrote: > Hi shkob1, > > > while one is time(session inac

Re: Fire and Purge with Idle State

2018-10-16 Thread Shahar Cizer Kobrinsky
Thanks! On Fri, Oct 12, 2018 at 9:29 PM Hequn Cheng wrote: > Hi shkob1, > > Currently, the idle state retention time is only used for unbounded > operators in sql/table-api. The unbounded operators include non-window > group by, non-window join, unbounded over, etc. The retention time affects >