[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-14 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
+1 by inspection


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-14 Thread cestella
Github user cestella commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
Nope, I like it.  +1 from me by inspection

On Wed, Dec 14, 2016 at 2:59 PM, JJ Meyer  wrote:

> @cestella  @ottobackwards
>  is there anything else you all would
> like to see on this one?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> 
,
> or mute the thread
> 

> .
>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-14 Thread jjmeyer0
Github user jjmeyer0 commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
@cestella @ottobackwards is there anything else you all would like to see 
on this one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread cestella
Github user cestella commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
@jjmeyer0 I think that's fine; mimicking java is probably the right move 
here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread jjmeyer0
Github user jjmeyer0 commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
and I'll add some tests that specifically test expected type of these 
number literals.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread jjmeyer0
Github user jjmeyer0 commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
@cestella I thought about the case where a number such as '12345678910' 
should be considered a long or not. The biggest reason why I chose not to go 
this way, was because we were basing many things on the way Java does things, 
and Java would throw a compile time error if this example was not followed by 
any l/L. Also, I had some concerns in a scenario where two integers were added, 
a long was automatically created from them, and then passed to a function that 
only accepts integers. In this case a very interesting error may occur, and 
confuse end users. Not sure if any of those are valid, but that was my thought 
process. What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
OK - thanks for explaining



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread cestella
Github user cestella commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
@ottobackwards  Yep, the `TO_$TYPE` stellar functions should work with 
inputs that are strings or numbers of other types.  To wit,
* `TO_FLOAT('1231')` should yield a float (`1231.0f`) from the input string
* `TO_FLOAT('12.31')` should yield a float(`12.31f`) from the input string
* `TO_FLOAT(1231)` should yield a float (`1231.0f`) from the input int
* `TO_FLOAT(12.31)` should yield a float(`12.31f`) from the input double


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
@cestella  - should I be able to do TO_FLOAT(field) when the field is a 
string and could be 1231 or 12.31?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread cestella
Github user cestella commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
I think it should work as follows for literals:
* `1234` should be an int
* `1234.0` should be a double
* `1234L` should be a long
* `1234f` should be a float

My only question is whether `12345678910` should be a long.  My instinct is 
that it should probably *should*, but I'd like feedback on that assertion.

Numbers coming in via the parser or as a result of a Stellar function are 
the types that the function or parser creates them as.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-metron issue #392: METRON-616: Added support for float and long li...

2016-12-09 Thread ottobackwards
Github user ottobackwards commented on the issue:

https://github.com/apache/incubator-metron/pull/392
  
So - the case I am thinking of is a stellar transform on an incoming string 
field that contains a number, but that number will not be marked - so only 
doubles would work unless I'm mistaken.  I am not sure that requiring the 
fields to be marked up works so well when you don't have control of the sources.

By specifying TO_ are you explicitly saying you want it treated at a 
string of number marked as type?   Why impose the restriction of having to have 
the string marked?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---