Skip to content

Fix behavioural differences due to return type and handle constant string literal inputs differently for COALESCE function #12500

Fix behavioural differences due to return type and handle constant string literal inputs differently for COALESCE function

Fix behavioural differences due to return type and handle constant string literal inputs differently for COALESCE function #12500

Workflow file for this run

name: Python Tests
on: [push, pull_request]
jobs:
run-babelfish-python-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
id: checkout
- name: Install Dependencies
id: install-dependencies
if: always()
uses: ./.github/composite-actions/install-dependencies
- name: Build Modified Postgres
id: build-modified-postgres
if: always() && steps.install-dependencies.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
- name: Compile ANTLR
id: compile-antlr
if: always() && steps.build-modified-postgres.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
- name: Build Extensions
id: build-extensions
if: always() && steps.compile-antlr.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
- name: Install Extensions
id: install-extensions
if: always() && steps.build-extensions.outcome == 'success'
uses: ./.github/composite-actions/install-extensions
- name: Install Python
id: install-python
if: always() && steps.install-extensions.outcome == 'success'
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Configure Python Environment
id: configure-python-environment
if: always() && steps.install-python.outcome == 'success'
run: |
cd ~
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
cd ~/work/babelfish_extensions/babelfish_extensions/test/python
mkdir sqltoolsservice
cd sqltoolsservice
wget https://github.com/microsoft/sqltoolsservice/releases/download/4.4.0.12/Microsoft.SqlTools.ServiceLayer-rhel-x64-net6.0.tar.gz && tar -xzvf Microsoft.SqlTools.ServiceLayer-rhel-x64-net6.0.tar.gz
cd ../
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 python3-dev
pip3 install pyodbc==4.0.35 pymssql pytest pytest-xdist
- name: Run Python Tests
if: always() && steps.configure-python-environment.outcome == 'success'
run: |
cd test/python
compareWithFile=true \
driver=pyodbc \
runInParallel=false \
testName=all \
provider="ODBC Driver 17 for SQL Server" \
fileGenerator_URL=localhost \
fileGenerator_port=1433 \
fileGenerator_databaseName=master \
fileGenerator_user=jdbc_user \
fileGenerator_password=12345678 \
pytest -s --tb=long -q .