You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "simicd (via GitHub)" <gi...@apache.org> on 2023/03/20 23:00:36 UTC

[GitHub] [arrow-datafusion-python] simicd commented on issue #291: make the method show() print the results

simicd commented on issue #291:
URL: https://github.com/apache/arrow-datafusion-python/issues/291#issuecomment-1477059926

   Hi @djouallah, thanks for reporting the issue and the feedback! I tried to reproduce the problem. When debugging in e.g. VS Code and run `ctx.sql("SELECT 42").show()` the result is not printed in the debug console but by default in the terminal. This is due to VS Code's debug settings:
   
   **Debug console**
   ![image](https://user-images.githubusercontent.com/10134699/226481590-7a1ec6a3-6623-43a9-a996-ef2cd7faf6ad.png)
   
   **Terminal**
   ![image](https://user-images.githubusercontent.com/10134699/226483524-4eeec0ae-2a25-4932-a584-7b74ad3746ca.png)
   
   
   
   I assume you'd like to show terminal outputs in the debug console. If that's the case you'd need to set the VS Code config to internal console in `launch.json` as follows:
   ```
   {
       // Use IntelliSense to learn about possible attributes.
       // Hover to view descriptions of existing attributes.
       // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Python: Debug",
               "type": "python",
               "request": "launch",
               "program": "${file}",
               "console": "internalConsole",
             }
       ]
   }
   ```
   
   Once that's set both `.show()` will be printed in the same console:
   ![image](https://user-images.githubusercontent.com/10134699/226482751-39241d83-93da-4f61-a520-45ac6fdf6e61.png)
   
   This is assuming that you're using VS Code, chances are that if you're using another editor you will have similar possibilty to configure the output. Hope that helps, please feel free to share additional context if this is not what you were looking for


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org