You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "GoGoWen (via GitHub)" <gi...@apache.org> on 2023/12/04 13:12:51 UTC

[I] [Bug] Spark Connector Read DateV2 and DatetimeV2 column with filter will get wrong result [doris]

GoGoWen opened a new issue, #27973:
URL: https://github.com/apache/doris/issues/27973

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   branch: 1.2.8
   
   ### What's Wrong?
   
   1, create table like below:
   CREATE TABLE `minutely_kc_ad_effects_new_v2_test_datev2` (
     `pin_id` bigint(20) NOT NULL,
     `date` date NOT NULL,
     `date_time` datetime NOT NULL,
     `ad_plan_id` bigint(20) NOT NULL,
     `ad_group_id` bigint(20) NOT NULL,
     `loc` int(11) NOT NULL,
     `impressions` bigint(20) SUM NULL DEFAULT "0" COMMENT '用户总展现',
     `clicks` bigint(20) SUM NULL DEFAULT "0" COMMENT '用户总点击',
     `cost` bigint(20) SUM NULL DEFAULT "0" COMMENT '用户总消费'
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `date`, `date_time`, `ad_plan_id`, `ad_group_id`, `loc`)
   COMMENT 'OLAP'
   PARTITION BY RANGE(`date`)
   (PARTITION p202203 VALUES [('2022-03-01'), ('2022-04-01')),
   PARTITION p202204 VALUES [('2022-04-01'), ('2022-05-01')),
   PARTITION p202205 VALUES [('2022-05-01'), ('2022-06-01')),
   PARTITION p202206 VALUES [('2022-06-01'), ('2022-07-01')),
   PARTITION p202303 VALUES [('2023-03-01'), ('2023-04-01')),
   PARTITION p202304 VALUES [('2023-04-01'), ('2023-05-01')),
   PARTITION p202305 VALUES [('2023-05-01'), ('2023-06-01')),
   PARTITION p202306 VALUES [('2023-06-01'), ('2023-07-01')))
   DISTRIBUTED BY HASH(`pin_id`) BUCKETS 16
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2",
   "disable_auto_compaction" = "false"
   );
   
   2, insert data into table like below:
   +--------+------------+---------------------+------------+-------------+------+-------------+--------+------+
   | pin_id | date       | date_time           | ad_plan_id | ad_group_id | loc  | impressions | clicks | cost |
   +--------+------------+---------------------+------------+-------------+------+-------------+--------+------+
   |      1 | 2023-03-10 | 2023-03-10 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   |      1 | 2023-03-11 | 2023-03-11 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   |      1 | 2022-03-10 | 2022-03-10 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   |      1 | 2022-03-11 | 2022-03-11 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   +--------+------------+---------------------+------------+-------------+------+-------------+--------+------+
   
   3, read the table with spark 3.2 like below:
   spark.read.format("doris").option("doris.table.identifier", "db.minutely_kc_ad_effects_new_v2_test_datev2").option("doris.fenodes", "11.91.xxx.xxx:8030").option("user", "root").option("password", "").load().where("date >= '2023-03-10'").show
   
   will get error following error:
   1, if spark.sql.constraintPropagation.enabled is true in spark3.2, we will get error like "isnotnull  function not found" 
   2, if spark.sql.constraintPropagation.enabled is false than, we will get wrong result or nothing will get.
   
   
   ### What You Expected?
   
   |      1 | 2023-03-10 | 2023-03-10 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   |      1 | 2023-03-11 | 2023-03-11 00:00:00 |          1 |           1 |    1 |           1 |      1 |    1 |
   
   
   ### How to Reproduce?
   
   refer to what's wrong
   
   ### Anything Else?
   
   no
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] Spark Connector Read DateV2 and DatetimeV2 column with filter will get wrong result [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #27973:
URL: https://github.com/apache/doris/issues/27973#issuecomment-3287229201

   We're closing this issue because it hasn't been updated in a while.
   If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] Spark Connector Read DateV2 and DatetimeV2 column with filter will get wrong result [doris]

Posted by "milton4code (via GitHub)" <gi...@apache.org>.
milton4code commented on issue #27973:
URL: https://github.com/apache/doris/issues/27973#issuecomment-1841984786

   I met this problem , I upgraded my  spark-doris-connector,then it worked.
    <dependency>
       <groupId>org.apache.doris</groupId>
       <artifactId>spark-doris-connector-3.2_2.12</artifactId>
       <version>1.3.0</version>
     </dependency>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] Spark Connector Read DateV2 and DatetimeV2 column with filter will get wrong result [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #27973: [Bug] Spark Connector Read DateV2 and DatetimeV2 column with filter will get wrong result
URL: https://github.com/apache/doris/issues/27973


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org