You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Bin YANG <ya...@gmail.com> on 2008/03/19 08:23:34 UTC
How to specify a timestamp in HQL ?
Dear colleagues,
I want to specify a time in SELECT function in HQL?
I trys the following statements:
select * from table_web TIMESTAMP '2008/3/19' ;
select * from table_web TIMESTAMP '2008/3/19 15:10';
It tells that the format of the TIMESTAMP is incorrect, could you
please tell me the right format of the TIMESTAMP?
thanks a lot!
bin yang
--
Bin YANG
Department of Computer Science and Engineering
Fudan University
Shanghai, P. R. China
EMail: yangbinisme82@gmail.com
Re: How to specify a timestamp in HQL ?
Posted by Mafish Liu <ma...@gmail.com>.
Yang:
TimeStamp is a long value decided by hbase system automatically and is not
presented by a user-defined string format.
Best regards.
On Wed, Mar 19, 2008 at 3:23 PM, Bin YANG <ya...@gmail.com> wrote:
> Dear colleagues,
>
> I want to specify a time in SELECT function in HQL?
>
> I trys the following statements:
>
> select * from table_web TIMESTAMP '2008/3/19' ;
>
> select * from table_web TIMESTAMP '2008/3/19 15:10';
>
> It tells that the format of the TIMESTAMP is incorrect, could you
> please tell me the right format of the TIMESTAMP?
>
> thanks a lot!
>
> bin yang
>
> --
> Bin YANG
> Department of Computer Science and Engineering
> Fudan University
> Shanghai, P. R. China
> EMail: yangbinisme82@gmail.com
>
--
Mafish@gmail.com
Institute of Computing Technology, Chinese Academy of Sciences, Beijing.
Re: How to specify a timestamp in HQL ?
Posted by edward yoon <ed...@udanax.org>.
lad, please don't define it yourself.
On 3/20/08, Bryan Duxbury <br...@rapleaf.com> wrote:
> HQL is meant only for simple administrative use cases, so there
> aren't features for doing complex queries.
>
> -Bryan
>
> On Mar 19, 2008, at 7:24 PM, Bin YANG wrote:
>
> > It means that HQL can only support point query, but cannot support
> > range query, right?
> >
> > On Thu, Mar 20, 2008 at 1:08 AM, stack <st...@duboce.net> wrote:
> >> You can only specify an explicit time, not "greater than a specific
> >> timestamp". The timestamp format is that of
> >> System.currentTimeMillis().
> >> St.Ack
> >>
> >>
> >>
> >> Bin YANG wrote:
> >>> for example, I want to find the values after a specifi time, how
> >>> can I
> >>> write the HQL?
> >>>
> >>> And I wonder to know how to use the TIMESTAMP in SELECT clause?
> >>>
> >>> On Wed, Mar 19, 2008 at 10:15 PM, edward yoon <ed...@udanax.org>
> >>> wrote:
> >>>
> >>>> HQL will be moved to hrdf project.
> >>>> Use the Hbase pure client :
> >>>>
> >>>> obtainScanner(Text[] columns, Text startRow, long timestamp)
> >>>>
> >>>>
> >>>>
> >>>> On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
> >>>>> Dear colleagues,
> >>>>>
> >>>>> I want to specify a time in SELECT function in HQL?
> >>>>>
> >>>>> I trys the following statements:
> >>>>>
> >>>>> select * from table_web TIMESTAMP '2008/3/19' ;
> >>>>>
> >>>>> select * from table_web TIMESTAMP '2008/3/19 15:10';
> >>>>>
> >>>>> It tells that the format of the TIMESTAMP is incorrect, could you
> >>>>> please tell me the right format of the TIMESTAMP?
> >>>>>
> >>>>> thanks a lot!
> >>>>>
> >>>>> bin yang
> >>>>>
> >>>>> --
> >>>>> Bin YANG
> >>>>> Department of Computer Science and Engineering
> >>>>> Fudan University
> >>>>> Shanghai, P. R. China
> >>>>> EMail: yangbinisme82@gmail.com
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> B. Regards,
> >>>> Edward yoon @ NHN, corp.
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> > --
> > Bin YANG
> > Department of Computer Science and Engineering
> > Fudan University
> > Shanghai, P. R. China
> > EMail: yangbinisme82@gmail.com
>
>
--
B. Regards,
Edward yoon @ NHN, corp.
Re: How to specify a timestamp in HQL ?
Posted by Bryan Duxbury <br...@rapleaf.com>.
HQL is meant only for simple administrative use cases, so there
aren't features for doing complex queries.
-Bryan
On Mar 19, 2008, at 7:24 PM, Bin YANG wrote:
> It means that HQL can only support point query, but cannot support
> range query, right?
>
> On Thu, Mar 20, 2008 at 1:08 AM, stack <st...@duboce.net> wrote:
>> You can only specify an explicit time, not "greater than a specific
>> timestamp". The timestamp format is that of
>> System.currentTimeMillis().
>> St.Ack
>>
>>
>>
>> Bin YANG wrote:
>>> for example, I want to find the values after a specifi time, how
>>> can I
>>> write the HQL?
>>>
>>> And I wonder to know how to use the TIMESTAMP in SELECT clause?
>>>
>>> On Wed, Mar 19, 2008 at 10:15 PM, edward yoon <ed...@udanax.org>
>>> wrote:
>>>
>>>> HQL will be moved to hrdf project.
>>>> Use the Hbase pure client :
>>>>
>>>> obtainScanner(Text[] columns, Text startRow, long timestamp)
>>>>
>>>>
>>>>
>>>> On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
>>>>> Dear colleagues,
>>>>>
>>>>> I want to specify a time in SELECT function in HQL?
>>>>>
>>>>> I trys the following statements:
>>>>>
>>>>> select * from table_web TIMESTAMP '2008/3/19' ;
>>>>>
>>>>> select * from table_web TIMESTAMP '2008/3/19 15:10';
>>>>>
>>>>> It tells that the format of the TIMESTAMP is incorrect, could you
>>>>> please tell me the right format of the TIMESTAMP?
>>>>>
>>>>> thanks a lot!
>>>>>
>>>>> bin yang
>>>>>
>>>>> --
>>>>> Bin YANG
>>>>> Department of Computer Science and Engineering
>>>>> Fudan University
>>>>> Shanghai, P. R. China
>>>>> EMail: yangbinisme82@gmail.com
>>>>>
>>>>
>>>>
>>>> --
>>>> B. Regards,
>>>> Edward yoon @ NHN, corp.
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
> --
> Bin YANG
> Department of Computer Science and Engineering
> Fudan University
> Shanghai, P. R. China
> EMail: yangbinisme82@gmail.com
Re: How to specify a timestamp in HQL ?
Posted by Bin YANG <ya...@gmail.com>.
It means that HQL can only support point query, but cannot support
range query, right?
On Thu, Mar 20, 2008 at 1:08 AM, stack <st...@duboce.net> wrote:
> You can only specify an explicit time, not "greater than a specific
> timestamp". The timestamp format is that of System.currentTimeMillis().
> St.Ack
>
>
>
> Bin YANG wrote:
> > for example, I want to find the values after a specifi time, how can I
> > write the HQL?
> >
> > And I wonder to know how to use the TIMESTAMP in SELECT clause?
> >
> > On Wed, Mar 19, 2008 at 10:15 PM, edward yoon <ed...@udanax.org> wrote:
> >
> >> HQL will be moved to hrdf project.
> >> Use the Hbase pure client :
> >>
> >> obtainScanner(Text[] columns, Text startRow, long timestamp)
> >>
> >>
> >>
> >> On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
> >> > Dear colleagues,
> >> >
> >> > I want to specify a time in SELECT function in HQL?
> >> >
> >> > I trys the following statements:
> >> >
> >> > select * from table_web TIMESTAMP '2008/3/19' ;
> >> >
> >> > select * from table_web TIMESTAMP '2008/3/19 15:10';
> >> >
> >> > It tells that the format of the TIMESTAMP is incorrect, could you
> >> > please tell me the right format of the TIMESTAMP?
> >> >
> >> > thanks a lot!
> >> >
> >> > bin yang
> >> >
> >> > --
> >> > Bin YANG
> >> > Department of Computer Science and Engineering
> >> > Fudan University
> >> > Shanghai, P. R. China
> >> > EMail: yangbinisme82@gmail.com
> >> >
> >>
> >>
> >> --
> >> B. Regards,
> >> Edward yoon @ NHN, corp.
> >>
> >>
> >
> >
> >
> >
>
>
--
Bin YANG
Department of Computer Science and Engineering
Fudan University
Shanghai, P. R. China
EMail: yangbinisme82@gmail.com
Re: How to specify a timestamp in HQL ?
Posted by stack <st...@duboce.net>.
You can only specify an explicit time, not "greater than a specific
timestamp". The timestamp format is that of System.currentTimeMillis().
St.Ack
Bin YANG wrote:
> for example, I want to find the values after a specifi time, how can I
> write the HQL?
>
> And I wonder to know how to use the TIMESTAMP in SELECT clause?
>
> On Wed, Mar 19, 2008 at 10:15 PM, edward yoon <ed...@udanax.org> wrote:
>
>> HQL will be moved to hrdf project.
>> Use the Hbase pure client :
>>
>> obtainScanner(Text[] columns, Text startRow, long timestamp)
>>
>>
>>
>> On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
>> > Dear colleagues,
>> >
>> > I want to specify a time in SELECT function in HQL?
>> >
>> > I trys the following statements:
>> >
>> > select * from table_web TIMESTAMP '2008/3/19' ;
>> >
>> > select * from table_web TIMESTAMP '2008/3/19 15:10';
>> >
>> > It tells that the format of the TIMESTAMP is incorrect, could you
>> > please tell me the right format of the TIMESTAMP?
>> >
>> > thanks a lot!
>> >
>> > bin yang
>> >
>> > --
>> > Bin YANG
>> > Department of Computer Science and Engineering
>> > Fudan University
>> > Shanghai, P. R. China
>> > EMail: yangbinisme82@gmail.com
>> >
>>
>>
>> --
>> B. Regards,
>> Edward yoon @ NHN, corp.
>>
>>
>
>
>
>
Re: How to specify a timestamp in HQL ?
Posted by Bin YANG <ya...@gmail.com>.
for example, I want to find the values after a specifi time, how can I
write the HQL?
And I wonder to know how to use the TIMESTAMP in SELECT clause?
On Wed, Mar 19, 2008 at 10:15 PM, edward yoon <ed...@udanax.org> wrote:
> HQL will be moved to hrdf project.
> Use the Hbase pure client :
>
> obtainScanner(Text[] columns, Text startRow, long timestamp)
>
>
>
> On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
> > Dear colleagues,
> >
> > I want to specify a time in SELECT function in HQL?
> >
> > I trys the following statements:
> >
> > select * from table_web TIMESTAMP '2008/3/19' ;
> >
> > select * from table_web TIMESTAMP '2008/3/19 15:10';
> >
> > It tells that the format of the TIMESTAMP is incorrect, could you
> > please tell me the right format of the TIMESTAMP?
> >
> > thanks a lot!
> >
> > bin yang
> >
> > --
> > Bin YANG
> > Department of Computer Science and Engineering
> > Fudan University
> > Shanghai, P. R. China
> > EMail: yangbinisme82@gmail.com
> >
>
>
> --
> B. Regards,
> Edward yoon @ NHN, corp.
>
--
Bin YANG
Department of Computer Science and Engineering
Fudan University
Shanghai, P. R. China
EMail: yangbinisme82@gmail.com
Re: How to specify a timestamp in HQL ?
Posted by edward yoon <ed...@udanax.org>.
HQL will be moved to hrdf project.
Use the Hbase pure client :
obtainScanner(Text[] columns, Text startRow, long timestamp)
On 3/19/08, Bin YANG <ya...@gmail.com> wrote:
> Dear colleagues,
>
> I want to specify a time in SELECT function in HQL?
>
> I trys the following statements:
>
> select * from table_web TIMESTAMP '2008/3/19' ;
>
> select * from table_web TIMESTAMP '2008/3/19 15:10';
>
> It tells that the format of the TIMESTAMP is incorrect, could you
> please tell me the right format of the TIMESTAMP?
>
> thanks a lot!
>
> bin yang
>
> --
> Bin YANG
> Department of Computer Science and Engineering
> Fudan University
> Shanghai, P. R. China
> EMail: yangbinisme82@gmail.com
>
--
B. Regards,
Edward yoon @ NHN, corp.