steampipe-postgres-fdw icon indicating copy to clipboard operation
steampipe-postgres-fdw copied to clipboard

unexpected behavior with a author_id = (select id from foo) query

Open kaidaguerre opened this issue 3 years ago • 3 comments

The join works, but the sub-select does not. Also interesting is that the log shows a ? as the value:

2021-03-23 23:07:21.363 EDT [12667] LOG:  statement: select id, text from twitter_user_tweet_timeline where author_id = (select '1318177503995985921')
2021-03-23T23:07:21.369-0400 [WARN]  plugin.steampipe-plugin-twitter.plugin: [WARN]  executeListCall we have single key column
2021-03-23T23:07:21.369-0400 [WARN]  plugin.steampipe-plugin-twitter.plugin: [WARN]  listUserTweetTimeline: authorID=?
~/src/steampipe-plugin-twitter $ steampipe query
Welcome to Steampipe v0.3.2
For more information, type .help
> select id, text from twitter_user_tweet_timeline where author_id = '1318177503995985921'
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                  | text                                                                                                                                                                      |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1373023688862408710 | New: Steampipe v0.3.0                                                                                                                                                     |
|                     |                                                                                                                                                                           |
|                     | - Query caching                                                                                                                                                           |
|                     | - Configuration settings                                                                                                                                                  |
|                     | - Improved quals for mind-blowing joins                                                                                                                                   |
|                     |                                                                                                                                                                           |
|                     | https://t.co/GsWqO3k6p7                                                                                                                                                   |
| 1354121537637511168 | RT @turbothq: Introducing Steampipe: 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                 |
|                     | Open source. Download at https://t.co/fsj9Fy23av https://t.co/6Ct3l8PZht                                                                                                  |
| 1373134228620214275 | 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                                                      |
|                     |                                                                                                                                                                           |
|                     | 60 seconds of awesome! Watch the Steampipe CLI demo: https://t.co/IPilF4u38R                                                                                              |
| 1374512803063623688 | @JensenKarp @CTCSquares One person's delicacy is another's tweet storm... See the world through our #rowscoloredglasses | https://t.co/FTuBWA9EPV https://t.co/4atmjhoJhM |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> 
> select id, text from twitter_user_tweet_timeline where author_id = any(array['1318177503995985921'])
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                  | text                                                                                                                                                                      |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1373023688862408710 | New: Steampipe v0.3.0                                                                                                                                                     |
|                     |                                                                                                                                                                           |
|                     | - Query caching                                                                                                                                                           |
|                     | - Configuration settings                                                                                                                                                  |
|                     | - Improved quals for mind-blowing joins                                                                                                                                   |
|                     |                                                                                                                                                                           |
|                     | https://t.co/GsWqO3k6p7                                                                                                                                                   |
| 1373134228620214275 | 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                                                      |
|                     |                                                                                                                                                                           |
|                     | 60 seconds of awesome! Watch the Steampipe CLI demo: https://t.co/IPilF4u38R                                                                                              |
| 1374512803063623688 | @JensenKarp @CTCSquares One person's delicacy is another's tweet storm... See the world through our #rowscoloredglasses | https://t.co/FTuBWA9EPV https://t.co/4atmjhoJhM |
| 1354121537637511168 | RT @turbothq: Introducing Steampipe: 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                 |
|                     | Open source. Download at https://t.co/fsj9Fy23av https://t.co/6Ct3l8PZht                                                                                                  |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> 
> select id, text from twitter_user_tweet_timeline where author_id = (select '1318177503995985921')
+----+------+
| id | text |
+----+------+
+----+------+
> 
> select id, text from twitter_user_tweet_timeline where author_id = (select id from twitter_user where username = 'steampipeio')
+----+------+
| id | text |
+----+------+
+----+------+
> 
> select t.id, t.text from twitter_user_tweet_timeline as t, twitter_user as u where t.author_id = u.id and u.username = 'steampipeio'
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                  | text                                                                                                                                                                      |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1373023688862408710 | New: Steampipe v0.3.0                                                                                                                                                     |
|                     |                                                                                                                                                                           |
|                     | - Query caching                                                                                                                                                           |
|                     | - Configuration settings                                                                                                                                                  |
|                     | - Improved quals for mind-blowing joins                                                                                                                                   |
|                     |                                                                                                                                                                           |
|                     | https://t.co/GsWqO3k6p7                                                                                                                                                   |
| 1354121537637511168 | RT @turbothq: Introducing Steampipe: 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                 |
|                     | Open source. Download at https://t.co/fsj9Fy23av https://t.co/6Ct3l8PZht                                                                                                  |
| 1373134228620214275 | 𝚜𝚎𝚕𝚎𝚌𝚝 * 𝚏𝚛𝚘𝚖 𝚌𝚕𝚘𝚞𝚍;                                                                                                                                                      |
|                     |                                                                                                                                                                           |
|                     | 60 seconds of awesome! Watch the Steampipe CLI demo: https://t.co/IPilF4u38R                                                                                              |
| 1374512803063623688 | @JensenKarp @CTCSquares One person's delicacy is another's tweet storm... See the world through our #rowscoloredglasses | https://t.co/FTuBWA9EPV https://t.co/4atmjhoJhM |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> 

kaidaguerre avatar Mar 24 '21 10:03 kaidaguerre