- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error while executing CTE query: Argument type mismatch
- Labels:
-
Apache Hive
Created on 11-24-2016 05:49 AM - edited 09-16-2022 03:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am facing an error while trying to write a CTE query in hive. Even though a column is defined with "Date", system is takin the input as "string".
Created 12-01-2016 03:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please re-upload the error screenshot? I cannot open it in your post.
I am also confused by your question. You mentioned that column d_rel_issd is defined as Date type, but what I can see here is that this column is just an alias of the case expression. The else clause of your case expression returns a string value. Could you please try to cast it to data and see whether it helps?
cast('9999-12-31' as date)
Created 12-01-2016 03:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please re-upload the error screenshot? I cannot open it in your post.
I am also confused by your question. You mentioned that column d_rel_issd is defined as Date type, but what I can see here is that this column is just an alias of the case expression. The else clause of your case expression returns a string value. Could you please try to cast it to data and see whether it helps?
cast('9999-12-31' as date)
Created 12-01-2016 11:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnx @yshi . Your solution worked 🙂
