Code Monkey home page Code Monkey logo

"SELECT cid,rid FROM seen WHERE uid=1 AND ts>0 LIMIT 3;" ERROR: Failed to execute query: SELECT cid,rid FROM seen WHERE uid=1 AND ts>0 LIMIT 3;, source: Failed to execute logical plan, source: Failure during query execution, source: Fail to crea te physical plan: type_coercion about greptimedb HOT 2 CLOSED

xxaier avatar xxaier commented on June 2, 2024
"SELECT cid,rid FROM seen WHERE uid=1 AND ts>0 LIMIT 3;" ERROR: Failed to execute query: SELECT cid,rid FROM seen WHERE uid=1 AND ts>0 LIMIT 3;, source: Failed to execute logical plan, source: Failure during query execution, source: Fail to crea te physical plan: type_coercion

from greptimedb.

Comments (2)

xxaier avatar xxaier commented on June 2, 2024

CAST转换貌似也不对,这个查询应该感觉不应该包含 1690252336408
English (USA): CAST's conversion seems wrong, this query should not be included 169025236408

image

SELECT cid,rid,CAST(ts as BIGINT) t FROM seen WHERE uid=1 AND ts>CAST(1690252336408 as timestamp) ORDER BY ts LIMIT 3;

Ruihang
SELECT cid,rid,CAST(ts as BIGINT) t FROM seen WHERE uid=1 AND ts>arrow_cast(1690252336408, 'Timestamp(Millisecond, None)') ORDER BY ts LIMIT 3;

xxai.art
我明白了,不过我感觉 CAST(ts as BIGINT) 和 CAST(bigint as TIMESTAMP) 是可逆操作比较符合直觉。 也就是 CAST(CAST(ts AS BIGINT) as TIMESTAMP) = ts
English (USA): I understand, but I feel that CAST(ts as BIGINT) and CAST(bigint as TIMESTAMP) are more intuitive than reversible operations. That is CAST(CAST(ts AS BIGINT) as TIMESTAMP) = ts

from greptimedb.

waynexia avatar waynexia commented on June 2, 2024

Submitted a doc PR to include this case GreptimeTeam/docs#500. Thanks for reporting

from greptimedb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.