Skip to content

[doc]The DDL and DQL column names in the context do not match#1190

Merged
wuchong merged 2 commits into
apache:mainfrom
ZmmBigdata:pr-branch-2
Jun 29, 2025
Merged

[doc]The DDL and DQL column names in the context do not match#1190
wuchong merged 2 commits into
apache:mainfrom
ZmmBigdata:pr-branch-2

Conversation

@ZmmBigdata
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #xxx

What is the purpose of the change:
Fix the issue of mismatched DDL and DQL column names in the context, ensuring that the query statement is consistent with the table structure definition.

Brief change log

Please describe the changes:
https://alibaba.github.io/fluss-docs/docs/table-design/table-types/log-table/
The DDL and DQL column names in the context do not match:

  1. Added a 'timestamp' column in the DDL definition to ensure that the table structure includes a timestamp field.
  2. Modified the 'SELECT' statement to explicitly specify the column names for the query:
    -Original statement: SELECT * FROM log_table WHERE timestamp>'2023-01-01';
    -New statement: SELECT order_i, item_id FROM log_table WHERE timestamp>'2023-01-01';
  3. Optimized the description of query columns, clearly stating that only the 'order_id', 'item_id', and 'timestamp' columns are accessed, and other columns (such as' address' and 'amount') will be automatically pruned by the database and will not participate in storage and reading.
    1750813668440
    1750813681293

API and Format

Does this change affect API or storage format:


  • 本次修改仅调整了 SQL 查询语句和表结构定义,不影响对外 API 或数据存储格式。

Documentation

Does this change introduce a new feature:


  • 本次修改是对现有功能的修复和优化,无需新增文档。


```sql
SELECT id, name FROM log_table WHERE timestamp > '2023-01-01';
SELECT order_id, item_id FROM log_table WHERE timestamp > '2023-01-01';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the filter condition also doesn't work, because the '2023-01-01' is not a timestamp type. Could you also replace this with other meaningful condition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the filter condition also doesn't work, because the '2023-01-01' is not a timestamp type. Could you also replace this with other meaningful condition?

Wait a moment, look look

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timestamp field name has been changed to dt

@wuchong wuchong merged commit da6a2a4 into apache:main Jun 29, 2025
3 checks passed
wuchong pushed a commit that referenced this pull request Jun 30, 2025
@ZmmBigdata ZmmBigdata deleted the pr-branch-2 branch July 15, 2025 04:59
polyzos pushed a commit to polyzos/fluss that referenced this pull request Aug 30, 2025
polyzos pushed a commit to HZY-Wade/fluss that referenced this pull request Aug 31, 2025
Ugbot pushed a commit to Ugbot/fluss that referenced this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants