airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-809) SqlAlchemy is_ ColumnOperator Causing Errors in MSSQL
Date Sun, 19 Feb 2017 09:03:44 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15873579#comment-15873579
] 

ASF subversion and git services commented on AIRFLOW-809:
---------------------------------------------------------

Commit 44fcabc36048cd6e80660fc023afce85e3d435a0 in incubator-airflow's branch refs/heads/master
from [~gritlogic]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=44fcabc ]

[AIRFLOW-809][AIRFLOW-1] Use __eq__ ColumnOperator When Testing Booleans

The .is_ ColumnOperator causes the SqlAlchemy's
MSSQL dialect to produce
IS 0 when given a value of False rather than a
value of None. The __eq__
ColumnOperator does this same test with the added
benefit that it will
modify the resulting expression from and == to a
IS NULL when the target
is None.

This change replaces all is_ ColumnOperators that
are doing boolean
comparisons and leaves all is_ ColumnOperators
that are checking for
None values.

Closes #2022 from gritlogic/AIRFLOW-809


> SqlAlchemy is_ ColumnOperator Causing Errors in MSSQL
> -----------------------------------------------------
>
>                 Key: AIRFLOW-809
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-809
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: models, scheduler
>         Environment: Distributor ID: Ubuntu
> Description:    Ubuntu 14.04.5 LTS
> Release:        14.04
> Codename:       trusty
> Backend: MSSQL
> Executor: LocalExecutor
>            Reporter: Chad T Henderson
>            Assignee: Chad T Henderson
>
> Starting the scheduler produces the following error, which I believe is caused by the
use of the _is ColumnOperator when checking the value of the external_trigger field on the
DagRun object.
> Error Text:
> sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [FreeTDS][SQL
Server]Incorrect syntax near '0'. (102) (SQLExecDirectW)") [SQL: 'SELECT TOP 1 dag_run.state
AS dag_run_state, dag_run.id AS dag_run_id, dag_run.dag_id AS dag_run_dag_id, dag_run.execution_date
AS dag_run_execution_date, dag_run.start_date AS dag_run_start_date, dag_run.end_date AS dag_run_end_date,
dag_run.run_id AS dag_run_run_id, dag_run.external_trigger AS dag_run_external_trigger, dag_run.conf
AS dag_run_conf \nFROM dag_run \nWHERE dag_run.dag_id = ? AND dag_run.external_trigger IS
0 ORDER BY dag_run.execution_date DESC'] [parameters: ('append_to_history',)]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message