[ https://issues.apache.org/jira/browse/AIRFLOW-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060117#comment-16060117
]
ASF subversion and git services commented on AIRFLOW-809:
---------------------------------------------------------
Commit 9a53e66390670c7a9e4206f0a3ef4a19c1baae72 in incubator-airflow's branch refs/heads/v1-8-test
from [~gritlogic]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=9a53e66 ]
[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
> Fix For: 1.9.0, 1.8.2
>
>
> 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.4.14#64029)
|