String comparison bug

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

String comparison bug

Post by flp » Sat Oct 25, 2014 12:57 am

Code: Select all

last_name = STATEMAP({expressions = ['name', ['__last_1.name', 'last_name']]}, improve_result_presentation)
[...]
goals_shot_result_selection = SELECT({predicate = 'name = last_name'}, goals_shot_result)
Wenn I try to compare two strings in a predicate, I will get a crazy result. Unfortunately, I can't tell anything about the exception because I don't see anything useful of it:

Code: Select all

long error code without the possibility to see the exception
java.lang.ClassCastException
If I remove the string comparison part, it works fine.

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: String comparison bug

Post by Marco Grawunder » Mon Oct 27, 2014 9:51 am

When using nexmark

Code: Select all

#PARSER PQL
#ADDQUERY
last_name = STATEMAP({EXPRESSIONS = ['name',['__last_1.name','last_name']]}, nexmark:person)

out = SELECT({PREDICATE = 'name = last_name'}, last_name)
everythings works fine for me.

Could you please make a bug report. I think the problem is somewhere else. Do you process name or last_name inbetween the two expressions?

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: String comparison bug

Post by flp » Mon Oct 27, 2014 1:15 pm

I can't do that, because Odysseus does not report the bug. I just found it in the console.

But you are right, with another dataset it works properly.

I looked into the file, but I couldn't find anything crazy.

I did this computation in between:
goals_shot_result = COALESCE({predicate='ball_hit_timestamp - last_ball_hit_timestamp <= 1 && name = last_name', AGGREGATIONS=[['first','ball_hit_timestamp','ball_hit_timestamp'], ['first','last_ball_hit_timestamp','last_ball_hit_timestamp'], ['first','name', 'name'], ['first','last_name', 'last_name'], ['first','player_id','player_id'], ['first','team_id','team_id'], ['first','sens_x','sens_x'], ['first','sens_y','sens_y']]}, improve_time_representation)

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: String comparison bug

Post by Marco Grawunder » Mon Oct 27, 2014 2:17 pm

You can send a bug report also via Help/Send Bug Report.

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: String comparison bug

Post by flp » Mon Oct 27, 2014 4:59 pm

Ah, I didn't know that. I reported it

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: String comparison bug

Post by Marco Grawunder » Mon Oct 27, 2014 5:22 pm

I found your Bug Report, but I can find no such exception ... Did you start the query?

Before you send next report and before a new try: Please clear error log window. The are many old error messages ;-)

(Error Log View: Delete Error Log)

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: String comparison bug

Post by flp » Mon Oct 27, 2014 6:45 pm

I sent a new one. It seems like it doesn't send this information.

I have attended a screen of the odysseus window
Attachments
odysseus.JPG
odysseus.JPG (66.43 KiB) Viewed 952 times

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: String comparison bug

Post by Marco Grawunder » Mon Oct 27, 2014 7:59 pm

oooh :-/ This is not good. Someone prints the message of the exception without the stacktrace :-(

If I remember it right, the query is working until the SELECT?

Could you please add a file sink after the select and store the data to a file and provide it to us?

CSVFILESINK({
filename = 'output.csv',
options = [['csv.writemetadata', 'true']],
sink = 'output'
},select)

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: String comparison bug

Post by flp » Mon Oct 27, 2014 8:55 pm

Odysseus says that there is a syntax error in your code, but I couldn't find it.
Attachments
bug.JPG
bug.JPG (34.58 KiB) Viewed 937 times

User avatar
Michael Brand
Posts: 12
Joined: Tue Jul 29, 2014 9:56 am
Location: Oldenburg, Germany
Contact:

Re: String comparison bug

Post by Michael Brand » Tue Oct 28, 2014 9:16 am

You need to write
out = CSVFILESINK(....)
Just like any other operator ;)
Greetings
Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest