Jihoon Son created TAJO-1610:
--------------------------------

             Summary: Cannot find column when the same name is used for table 
and database
                 Key: TAJO-1610
                 URL: https://issues.apache.org/jira/browse/TAJO-1610
             Project: Tajo
          Issue Type: Bug
          Components: planner/optimizer
            Reporter: Jihoon Son
             Fix For: 0.11.0


See the title.
You can reproduce as follows:
{noformat}
tweets> CREATE EXTERNAL TABLE tweets (   coordinates TEXT,   favorited BOOL,   
truncated BOOL,   created_at TIMESTAMP,   id_str TEXT,   /*entrities RECORD (   
  urls ARRAY<TEXT>   )*/   in_reply_to_user_id_str TEXT,   contributors TEXT,   
text TEXT,   metadata RECORD (     iso_language_code TEXT,     result_type TEXT 
  ),   retweet_count INTEGER,   in_reply_to_status_id_str TEXT,   id TEXT,   
geo TEXT,   retweeted BOOL,   in_reply_to_user_id TEXT,   place TEXT,   user 
RECORD (     profile_sidebar_fill_color TEXT,     profile_sidebar_border_color 
TEXT,     profile_background_tile TEXT,     name TEXT,     profile_image_url 
TEXT,     created_at TIMESTAMP,     location TEXT,     follow_request_sent 
TEXT,     profile_link_color TEXT,     is_translator BOOL,     id_str TEXT,     
/*     entities RECORD (       url RECORD (       ),       description RECORD ( 
      )     ), */     default_profile BOOL,     contributors_enabled BOOL,     
favourites_count INTEGER,     url TEXT,     profile_image_url_https TEXT,     
utc_offset INTEGER,     id BIGINT,     profile_use_background_image BOOL,     
listed_count INTEGER,     profile_text_color TEXT,     lang TEXT,     
followers_count INTEGER,     protected BOOL,     notifications TEXT,     
profile_background_image_url_https TEXT,     profile_background_color TEXT,     
verified TEXT,     geo_enabled TEXT,     time_zone TEXT,     description TEXT,  
   default_profile_image TEXT,     profile_background_image_url TEXT,     
statuses_count INTEGER,     friends_count INTEGER,     following TEXT,     
show_all_inline_media BOOL,     screen_name TEXT   ),   in_reply_to_screen_name 
TEXT,   source TEXT,   in_reply_to_status_id TEXT ) USING JSON LOCATION 
'file://.../Projects/twitter_201407221120.log';
OK
tweets> \d
tweets
tweets> \d tweets

table name: tweets.tweets
table path: file://.../Projects/twitter_201407221120.log
store type: json
number of rows: unknown
volume: 151.2 MB
Options: 
        'text.serde'='org.apache.tajo.storage.json.JsonLineSerDe'

schema: 
coordinates     TEXT
favorited       BOOLEAN
truncated       BOOLEAN
created_at      TIMESTAMP
id_str  TEXT
in_reply_to_user_id_str TEXT
contributors    TEXT
text    TEXT
metadata        RECORD (iso_language_code TEXT, result_type TEXT)
retweet_count   INT4
in_reply_to_status_id_str       TEXT
id      TEXT
geo     TEXT
retweeted       BOOLEAN
in_reply_to_user_id     TEXT
place   TEXT
user    RECORD (profile_sidebar_fill_color TEXT, profile_sidebar_border_color 
TEXT, profile_background_tile TEXT, name TEXT, profile_image_url TEXT, 
created_at TIMESTAMP, location TEXT, follow_request_sent TEXT, 
profile_link_color TEXT, is_translator BOOLEAN, id_str TEXT, default_profile 
BOOLEAN, contributors_enabled BOOLEAN, favourites_count INT4, url TEXT, 
profile_image_url_https TEXT, utc_offset INT4, id INT8, 
profile_use_background_image BOOLEAN, listed_count INT4, profile_text_color 
TEXT, lang TEXT, followers_count INT4, protected BOOLEAN, notifications TEXT, 
profile_background_image_url_https TEXT, profile_background_color TEXT, 
verified TEXT, geo_enabled TEXT, time_zone TEXT, description TEXT, 
default_profile_image TEXT, profile_background_image_url TEXT, statuses_count 
INT4, friends_count INT4, following TEXT, show_all_inline_media BOOLEAN, 
screen_name TEXT)
in_reply_to_screen_name TEXT
source  TEXT
in_reply_to_status_id   TEXT


tweets> select "text" from tweets limit 10;
ERROR: column "tweets.tweets.text" does not exist
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to