Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: inspera/blackbricks
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.1
Choose a base ref
...
head repository: inspera/blackbricks
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.5
Choose a head ref
  • 13 commits
  • 6 files changed
  • 3 contributors

Commits on Dec 9, 2022

  1. chore(deps): bump certifi from 2022.6.15.1 to 2022.12.7

    Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.6.15.1 to 2022.12.7.
    - [Release notes](https://github.com/certifi/python-certifi/releases)
    - [Commits](certifi/python-certifi@2022.06.15.1...2022.12.07)
    
    ---
    updated-dependencies:
    - dependency-name: certifi
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 9, 2022
    Configuration menu
    Copy the full SHA
    f4c2f9f View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Bugix in _format_sql_cell in handling # MAGIC %sql

    This bugfix fixes the issue when %sql is not on a separate line.
    OLD:
    - Resulting SQL cell is wrong, when %sql is not on a separate line
      - %sql is followed by SPACE/TAB + "first line of the SQL query"
      - Example:
        - %sql SELECT current_date
    - Sometimes an additional (empty) line is added after %sql. But not always!
    OLD:
    - Resulting SQL cell is correct, when %sql is not on a separate line
      - Example:
        - %sql SELECT current_date
      - it doesn't matter if a SPACE or TAB follows %sql
    - exactly 1 additional (empty) line is added after %sql. Always!
    - in addition the list magics[] has been removed from the code. It's not used.
    
    Signed-off-by: Dejan.Hrubenja<dejan.hrubenja@mercedes-benz.com>
    de-hru authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    8d8df37 View commit details
    Browse the repository at this point in the history
  2. Test cases for SQL formatting added

    Added test cases to test some weird cases, when:
    - MAGIC %sql is not on a separate line (Databricks allows this)
    - MAGIC %sql is followed by 0/1/multiple NewLines
    
    The result has to be deterministic always:
    - If Databricks accepts (the first line of) the SQL query behind "# MAGIC %sql", we have to accept this too!
    - It doesn't matter if %sql is followed by:
      - SPACE
      - TAB
      - exactly 1 NewLine
      - multiple NewLines
    ...
    The result has to be deterministic!
     - 1st line: # MAGIC %sql
     - 2nd line: # 
     - 3rd line: # First-line-of-sqlparse-Output
     - ...
    
    Signed-off-by: Dejan.Hrubenja<dejan.hrubenja@mercedes-benz.com>
    de-hru authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    f0d20da View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2023

  1. Merge pull request #30 from inspera/dependabot/pip/certifi-2022.12.7

    chore(deps): bump certifi from 2022.6.15.1 to 2022.12.7
    bsamseth authored Jan 10, 2023
    Configuration menu
    Copy the full SHA
    fac0d53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c5c0378 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. normalize newlines and edit test notebook

    I'd like to move towards having the same SQL formatting applied by blackbricks as what you get by using "Format SQL" in
    the Databricks notebook UI. It removes any leading or trailing newlines, which this commit now ensures. It keeps your
    fix for the actual bug where blackbricks would drop code on the same line as the %sql.
    
    I've edited the test notebook too, as it is meant to hold pre-formatted code. The test checks that blackbricks does
    _not_ alter this file. While what @de-hru added are valid and good test cases, something else is required to add test
    with notebooks that _should_ change. Blackbricks has a longstanding need for a better testing harness, but thats a
    separate issue which shouldn't be addressed as part of #32.
    bsamseth authored and de-hru committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    5487953 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Merge pull request #32 from mercedes-benz/fix-handling-of-magic-sql-i…

    …n-sql-cells
    
    Fix handling of magic sql in sql cells
    bsamseth authored Jan 31, 2023
    Configuration menu
    Copy the full SHA
    e98aa91 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4c4381 View commit details
    Browse the repository at this point in the history
  3. fix: avoid failing on quoted cell dividers

    This fixes a bug where any code with the `# COMMAND ------` cell divisor
    comment would cause parse errors or unwanted cell splits.
    
    Example:
    
    ```python
    print("""\n# COMMAND ----------""")
    ````
    
    This would fail on versions <=1.0.3
    
    Now only lines containing only this cell divisor (disregarding trailing
    whitespace) will be treated as cell divisors.
    bsamseth committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    f343636 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #33 from inspera/improved-cell-detection

    fix: avoid failing on quoted cell dividers
    bsamseth authored Jan 31, 2023
    Configuration menu
    Copy the full SHA
    b993ef9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e99e854 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. fix(deps): bump oauthlib from 3.2.1 to 3.2.2 (#35)

    Bumps [oauthlib](https://github.com/oauthlib/oauthlib) from 3.2.1 to 3.2.2.
    - [Release notes](https://github.com/oauthlib/oauthlib/releases)
    - [Changelog](https://github.com/oauthlib/oauthlib/blob/master/CHANGELOG.rst)
    - [Commits](oauthlib/oauthlib@v3.2.1...v3.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: oauthlib
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 7, 2023
    Configuration menu
    Copy the full SHA
    b5cb6ad View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5cd9989 View commit details
    Browse the repository at this point in the history
Loading