cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Issue with auto complete in the datarbicks notebook

leahli
New Contributor II

I'm using sql to run a lot of queries in the notebook. Since this week it started to pop up with the Suggested code every time I made an adjustment to the code and my cursor keeps changing between the green and red highlighted lines (previously it only suggested code in the grey font size, and it wouldn't interrupt my coding process. Now it just became very annoying, even when I deleted the cell, it will come back immediately and highlighted in red. I cannot make adjustments at once I have to click accept or rejected multiple times. The same thing happens to my coworkers. 

1 ACCEPTED SOLUTION

Accepted Solutions

ivanvyd
New Contributor III

@leahlithe green and red changes with Accept and Reject are consistent with Genie Codeโ€™s inline edit or Quick Fix interface. Standard autocomplete produces the grey suggestions you saw before and accepts them with Tab or Enter.

Open your profile menu and go to Settings -> Developer. Keep Autocomplete as you type enabled if you still want the grey suggestions. If your workspace shows a setting for automatic inline Quick Fix, disable that setting.

Databricks treats autocomplete, inline suggestions, and automatic Quick Fix as separate prefeerences. Disabling standard autocomplete may therefore have no effect on the red and green proposals.

ivanvyd_0-1788461095243.png

P.s. a rejected suggestion should close, and honeslty I could not find a documented feature that recreates deleted cells. Test the behavior in a new SQL notebook. If it continues, ask your workspace administrator whether a Genie code or editor preference changed. Since your colleagues began seeing it during the same week, this may be a shared workspace change or smth.

Ivan Vydrin
Lead Software & AI Engineer ยท Tech Fabric LLC

View solution in original post

2 REPLIES 2

ivanvyd
New Contributor III

@leahlithe green and red changes with Accept and Reject are consistent with Genie Codeโ€™s inline edit or Quick Fix interface. Standard autocomplete produces the grey suggestions you saw before and accepts them with Tab or Enter.

Open your profile menu and go to Settings -> Developer. Keep Autocomplete as you type enabled if you still want the grey suggestions. If your workspace shows a setting for automatic inline Quick Fix, disable that setting.

Databricks treats autocomplete, inline suggestions, and automatic Quick Fix as separate prefeerences. Disabling standard autocomplete may therefore have no effect on the red and green proposals.

ivanvyd_0-1788461095243.png

P.s. a rejected suggestion should close, and honeslty I could not find a documented feature that recreates deleted cells. Test the behavior in a new SQL notebook. If it continues, ask your workspace administrator whether a Genie code or editor preference changed. Since your colleagues began seeing it during the same week, this may be a shared workspace change or smth.

Ivan Vydrin
Lead Software & AI Engineer ยท Tech Fabric LLC

data_pulse
New Contributor II

@leahli 
I was facing similar issue before with red/green diff appearing frequently. These are related to Genie Code Quick fix, not the normal grey autocomplete suggestions.

With Settings โ†’ Developer โ†’ Genie Code Quick Fix = On, a failed SQL statement can produce the red/green suggested correction. If the same invalid SQL is run again, the suggestion can appear again.

After turning Genie Code Quick Fix = Off, the SQL error appears normally, but the red/green diff no longer shows.

So if you want to keep normal autocomplete but stop these inline red/green fixes, disable Genie Code Quick Fix.

If the suggestions are reappearing even without re-running the failed cell, that may be a separate editor issue worth reporting.

This also mentioned in current Databricks docs: Quick Fix automatically proposes single-line fixes after code errors using a red/green diff, while normal autocomplete is a separate inline suggestion flow accepted with Tab.