You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by Steven Jacobs <sj...@ucr.edu> on 2017/06/09 03:47:36 UTC

String to int conversion

Hi all,
Does SQLPP offer any way to convert strings to ints? I can't see anything
in the documentation. Twitter data gives timestamps as a string
representing the unix time in milliseconds, so we need some way to change
this to an int in order to use datetime_from_unix_time_in_ms

Steven

Re: String to int conversion

Posted by Steven Jacobs <sj...@ucr.edu>.
Looks like we have an issue for that part (ASTERIXDB-1070). I added an
issue for the documentation (
https://issues.apache.org/jira/browse/ASTERIXDB-1934)

Steven

On Fri, Jun 9, 2017 at 7:14 AM, Mike Carey <dt...@gmail.com> wrote:

> +1
>
> We should also add some functions that go between types w/o string-ifying
> (I feel like we're missing some of those paths based on vague memories from
> past use cases).
>
>
>
> On 6/8/17 9:32 PM, Yingyi Bu wrote:
>
>> I couldn't find the doc neither. Yes, we should add a section in builtin
>> functions called "constructor functions".
>>
>> Best,
>> Yingyi
>>
>> On Thu, Jun 8, 2017 at 9:03 PM, Steven Jacobs <sj...@ucr.edu> wrote:
>>
>> Thanks! Is this mentioned somewhere in the docs? If not we should probably
>>> add it.
>>> Steven
>>> On Thu, Jun 8, 2017 at 8:58 PM Yingyi Bu <bu...@gmail.com> wrote:
>>>
>>> Every type has a string constructor, e.g.,
>>>>
>>>> bigint("123")
>>>>
>>>> Best,
>>>> Yingyi
>>>>
>>>>
>>>> On Thu, Jun 8, 2017 at 8:47 PM, Steven Jacobs <sj...@ucr.edu> wrote:
>>>>
>>>> Hi all,
>>>>> Does SQLPP offer any way to convert strings to ints? I can't see
>>>>>
>>>> anything
>>>
>>>> in the documentation. Twitter data gives timestamps as a string
>>>>> representing the unix time in milliseconds, so we need some way to
>>>>>
>>>> change
>>>
>>>> this to an int in order to use datetime_from_unix_time_in_ms
>>>>>
>>>>> Steven
>>>>>
>>>>>
>

Re: String to int conversion

Posted by Mike Carey <dt...@gmail.com>.
+1

We should also add some functions that go between types w/o 
string-ifying (I feel like we're missing some of those paths based on 
vague memories from past use cases).


On 6/8/17 9:32 PM, Yingyi Bu wrote:
> I couldn't find the doc neither. Yes, we should add a section in builtin
> functions called "constructor functions".
>
> Best,
> Yingyi
>
> On Thu, Jun 8, 2017 at 9:03 PM, Steven Jacobs <sj...@ucr.edu> wrote:
>
>> Thanks! Is this mentioned somewhere in the docs? If not we should probably
>> add it.
>> Steven
>> On Thu, Jun 8, 2017 at 8:58 PM Yingyi Bu <bu...@gmail.com> wrote:
>>
>>> Every type has a string constructor, e.g.,
>>>
>>> bigint("123")
>>>
>>> Best,
>>> Yingyi
>>>
>>>
>>> On Thu, Jun 8, 2017 at 8:47 PM, Steven Jacobs <sj...@ucr.edu> wrote:
>>>
>>>> Hi all,
>>>> Does SQLPP offer any way to convert strings to ints? I can't see
>> anything
>>>> in the documentation. Twitter data gives timestamps as a string
>>>> representing the unix time in milliseconds, so we need some way to
>> change
>>>> this to an int in order to use datetime_from_unix_time_in_ms
>>>>
>>>> Steven
>>>>


Re: String to int conversion

Posted by Yingyi Bu <bu...@gmail.com>.
I couldn't find the doc neither. Yes, we should add a section in builtin
functions called "constructor functions".

Best,
Yingyi

On Thu, Jun 8, 2017 at 9:03 PM, Steven Jacobs <sj...@ucr.edu> wrote:

> Thanks! Is this mentioned somewhere in the docs? If not we should probably
> add it.
> Steven
> On Thu, Jun 8, 2017 at 8:58 PM Yingyi Bu <bu...@gmail.com> wrote:
>
> > Every type has a string constructor, e.g.,
> >
> > bigint("123")
> >
> > Best,
> > Yingyi
> >
> >
> > On Thu, Jun 8, 2017 at 8:47 PM, Steven Jacobs <sj...@ucr.edu> wrote:
> >
> > > Hi all,
> > > Does SQLPP offer any way to convert strings to ints? I can't see
> anything
> > > in the documentation. Twitter data gives timestamps as a string
> > > representing the unix time in milliseconds, so we need some way to
> change
> > > this to an int in order to use datetime_from_unix_time_in_ms
> > >
> > > Steven
> > >
> >
>

Re: String to int conversion

Posted by Steven Jacobs <sj...@ucr.edu>.
Thanks! Is this mentioned somewhere in the docs? If not we should probably
add it.
Steven
On Thu, Jun 8, 2017 at 8:58 PM Yingyi Bu <bu...@gmail.com> wrote:

> Every type has a string constructor, e.g.,
>
> bigint("123")
>
> Best,
> Yingyi
>
>
> On Thu, Jun 8, 2017 at 8:47 PM, Steven Jacobs <sj...@ucr.edu> wrote:
>
> > Hi all,
> > Does SQLPP offer any way to convert strings to ints? I can't see anything
> > in the documentation. Twitter data gives timestamps as a string
> > representing the unix time in milliseconds, so we need some way to change
> > this to an int in order to use datetime_from_unix_time_in_ms
> >
> > Steven
> >
>

Re: String to int conversion

Posted by Yingyi Bu <bu...@gmail.com>.
Every type has a string constructor, e.g.,

bigint("123")

Best,
Yingyi


On Thu, Jun 8, 2017 at 8:47 PM, Steven Jacobs <sj...@ucr.edu> wrote:

> Hi all,
> Does SQLPP offer any way to convert strings to ints? I can't see anything
> in the documentation. Twitter data gives timestamps as a string
> representing the unix time in milliseconds, so we need some way to change
> this to an int in order to use datetime_from_unix_time_in_ms
>
> Steven
>