Re: Data formatting...

2020-06-11 Thread Alex Ott
Ok, PR for parsing change is sent:
https://github.com/apache/zeppelin/pull/3799

On Tue, Jun 9, 2020 at 8:24 AM Alex Ott  wrote:

> Thank you Jeff!
>
> I'll create a ticket, implement it & then rebase my changes on top of it -
> it will simplify the code of my PR as well
>
> On Tue, Jun 9, 2020 at 12:44 AM Jeff Zhang  wrote:
>
>> Hi Alex,
>>
>> The parsing logic is here, agree that we should put them into
>> paragraph local properties and improve the parsing logic.
>>
>>
>> https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphTextParser.java
>>
>> Alex Ott  于2020年6月9日周二 上午12:45写道:
>>
>> > Hi all
>> >
>> > related question. I was thinking, maybe I over-complicate the
>> > implementation, and maybe I should use something like this instead:
>> >
>> > %cassandra(locale=ruRU, timeFormat="E, d MMM yy", floatPrecision = 5,
>> > outputFormat=cql)
>> >
>> > but it's parsed into
>> >
>> > 'd MMM yy"': 'd MMM yy"', 'floatPrecision': '5', 'timeFormat': '"E',
>> > 'locale': 'ruRU', 'outputFormat': 'cql'
>> >
>> > Who can point me where the parsing of the local context happens? Maybe
>> it
>> > makes sense to add support for quoted values?
>> >
>> > On Mon, Jun 8, 2020 at 9:49 AM Alex Ott  wrote:
>> >
>> > > Hi all
>> > >
>> > > Yesterday I submitted the PR for Cassandra interpreter that introduces
>> > the
>> > > options for customization of formatting of numbers & time-related
>> types:
>> > > https://github.com/apache/zeppelin/pull/3790
>> > >
>> > > And now I'm thinking that such customizations could be useful in other
>> > > interpreters as well, like, JDBC, z.show implementations in Spark &
>> > Flink,
>> > > etc.
>> > > Theoretically, it would be possible to extract this formatting code &
>> > > share between interpreters.  What do you think?
>> > >
>> > > --
>> > > With best wishes,Alex Ott
>> > > http://alexott.net/
>> > > Twitter: alexott_en (English), alexott (Russian)
>> > >
>> >
>> >
>> > --
>> > With best wishes,Alex Ott
>> > http://alexott.net/
>> > Twitter: alexott_en (English), alexott (Russian)
>> >
>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>
>
> --
> With best wishes,Alex Ott
> http://alexott.net/
> Twitter: alexott_en (English), alexott (Russian)
>


-- 
With best wishes,Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)


Re: Data formatting...

2020-06-09 Thread Alex Ott
Thank you Jeff!

I'll create a ticket, implement it & then rebase my changes on top of it -
it will simplify the code of my PR as well

On Tue, Jun 9, 2020 at 12:44 AM Jeff Zhang  wrote:

> Hi Alex,
>
> The parsing logic is here, agree that we should put them into
> paragraph local properties and improve the parsing logic.
>
>
> https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphTextParser.java
>
> Alex Ott  于2020年6月9日周二 上午12:45写道:
>
> > Hi all
> >
> > related question. I was thinking, maybe I over-complicate the
> > implementation, and maybe I should use something like this instead:
> >
> > %cassandra(locale=ruRU, timeFormat="E, d MMM yy", floatPrecision = 5,
> > outputFormat=cql)
> >
> > but it's parsed into
> >
> > 'd MMM yy"': 'd MMM yy"', 'floatPrecision': '5', 'timeFormat': '"E',
> > 'locale': 'ruRU', 'outputFormat': 'cql'
> >
> > Who can point me where the parsing of the local context happens? Maybe it
> > makes sense to add support for quoted values?
> >
> > On Mon, Jun 8, 2020 at 9:49 AM Alex Ott  wrote:
> >
> > > Hi all
> > >
> > > Yesterday I submitted the PR for Cassandra interpreter that introduces
> > the
> > > options for customization of formatting of numbers & time-related
> types:
> > > https://github.com/apache/zeppelin/pull/3790
> > >
> > > And now I'm thinking that such customizations could be useful in other
> > > interpreters as well, like, JDBC, z.show implementations in Spark &
> > Flink,
> > > etc.
> > > Theoretically, it would be possible to extract this formatting code &
> > > share between interpreters.  What do you think?
> > >
> > > --
> > > With best wishes,Alex Ott
> > > http://alexott.net/
> > > Twitter: alexott_en (English), alexott (Russian)
> > >
> >
> >
> > --
> > With best wishes,Alex Ott
> > http://alexott.net/
> > Twitter: alexott_en (English), alexott (Russian)
> >
>
>
> --
> Best Regards
>
> Jeff Zhang
>


-- 
With best wishes,Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)


Re: Data formatting...

2020-06-08 Thread Jeff Zhang
Hi Alex,

The parsing logic is here, agree that we should put them into
paragraph local properties and improve the parsing logic.

https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphTextParser.java

Alex Ott  于2020年6月9日周二 上午12:45写道:

> Hi all
>
> related question. I was thinking, maybe I over-complicate the
> implementation, and maybe I should use something like this instead:
>
> %cassandra(locale=ruRU, timeFormat="E, d MMM yy", floatPrecision = 5,
> outputFormat=cql)
>
> but it's parsed into
>
> 'd MMM yy"': 'd MMM yy"', 'floatPrecision': '5', 'timeFormat': '"E',
> 'locale': 'ruRU', 'outputFormat': 'cql'
>
> Who can point me where the parsing of the local context happens? Maybe it
> makes sense to add support for quoted values?
>
> On Mon, Jun 8, 2020 at 9:49 AM Alex Ott  wrote:
>
> > Hi all
> >
> > Yesterday I submitted the PR for Cassandra interpreter that introduces
> the
> > options for customization of formatting of numbers & time-related types:
> > https://github.com/apache/zeppelin/pull/3790
> >
> > And now I'm thinking that such customizations could be useful in other
> > interpreters as well, like, JDBC, z.show implementations in Spark &
> Flink,
> > etc.
> > Theoretically, it would be possible to extract this formatting code &
> > share between interpreters.  What do you think?
> >
> > --
> > With best wishes,Alex Ott
> > http://alexott.net/
> > Twitter: alexott_en (English), alexott (Russian)
> >
>
>
> --
> With best wishes,Alex Ott
> http://alexott.net/
> Twitter: alexott_en (English), alexott (Russian)
>


-- 
Best Regards

Jeff Zhang


Re: Data formatting...

2020-06-08 Thread Alex Ott
Hi all

related question. I was thinking, maybe I over-complicate the
implementation, and maybe I should use something like this instead:

%cassandra(locale=ruRU, timeFormat="E, d MMM yy", floatPrecision = 5,
outputFormat=cql)

but it's parsed into

'd MMM yy"': 'd MMM yy"', 'floatPrecision': '5', 'timeFormat': '"E',
'locale': 'ruRU', 'outputFormat': 'cql'

Who can point me where the parsing of the local context happens? Maybe it
makes sense to add support for quoted values?

On Mon, Jun 8, 2020 at 9:49 AM Alex Ott  wrote:

> Hi all
>
> Yesterday I submitted the PR for Cassandra interpreter that introduces the
> options for customization of formatting of numbers & time-related types:
> https://github.com/apache/zeppelin/pull/3790
>
> And now I'm thinking that such customizations could be useful in other
> interpreters as well, like, JDBC, z.show implementations in Spark & Flink,
> etc.
> Theoretically, it would be possible to extract this formatting code &
> share between interpreters.  What do you think?
>
> --
> With best wishes,Alex Ott
> http://alexott.net/
> Twitter: alexott_en (English), alexott (Russian)
>


-- 
With best wishes,Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)


Data formatting...

2020-06-08 Thread Alex Ott
Hi all

Yesterday I submitted the PR for Cassandra interpreter that introduces the
options for customization of formatting of numbers & time-related types:
https://github.com/apache/zeppelin/pull/3790

And now I'm thinking that such customizations could be useful in other
interpreters as well, like, JDBC, z.show implementations in Spark & Flink,
etc.
Theoretically, it would be possible to extract this formatting code & share
between interpreters.  What do you think?

-- 
With best wishes,Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)