Skip to content

[Bug] Java Python Api SELECT LAST 语句 结果 字段类型均为 TEXT #9229

@zhengshubin

Description

@zhengshubin

Search before asking

  • I searched in the issues and found nothing similar.

Version

IOTDB 1.0.1
JAVA API 1.0.1
python api 1.0.1

Describe the bug and provide the minimal reproduce step

JAVA API:
SessionDataSet sessionDataSet = session.executeLastDataQuery(Arrays.asList("a.str", "a.int"));
RowRecord rowRecord=null;
while (sessionDataSet.hasNext()) {
rowRecord=sessionDataSet.next();
List fields = rowRecord.getFields();
for (Field field : fields) {
TSDataType dataType = field.getDataType();
Object objectValue = field.getObjectValue(dataType);
System.out.println(objectValue);
System.out.println(dataType); //always TEXT
PYTHON API:
sql = """

SELECT   LAST
    str_value,    
   int_value
FROM a

"""
result = session.execute_statement(sql)
while result.has_next():
row_record = result.next()
fields = row_record.get_fields()
output=[ field.get_data_type() for field in fields]
print(output) //always TEXT

如果用 SELECT last_value(xx) 语句 结果 能正确输出对应DataType

What did you expect to see?

使用 SELECT LAST 语句 结果能正确获取对应的数据类型,而不是全都为TEXT.

What did you see instead?

全都为TEXT

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions