Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON_EXTRACT does not support map type #419

Closed
taiyang-li opened this issue Apr 11, 2023 · 1 comment
Closed

JSON_EXTRACT does not support map type #419

taiyang-li opened this issue Apr 11, 2023 · 1 comment

Comments

@taiyang-li
Copy link

CREATE TEMPORARY VIEW ad
USING org.apache.spark.sql.parquet
OPTIONS (
  path "./ad"
) ;

select from_json(event_info['flows'],'array<map<string,string>>') from ad limit 10; 
Caused by: java.lang.RuntimeException: Function JSONExtract doesn't support the return type schema: Map(String, Nullable(String))
0. ./build_gcc/./contrib/llvm-project/libcxx/include/exception:134: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x19158b5a in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
1. ./build_gcc/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x12c708f5 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
2. ./build_gcc/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int, FormatStringHelperImpl<std::__1::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::type, std::__1::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::type>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) @ 0xbc40d3e in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
3. DB::JSONExtractTree<DB::SimdJSONParser>::build(char const*, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xc71885e in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
4. DB::JSONExtractTree<DB::SimdJSONParser>::build(char const*, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xc718595 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
5. DB::JSONExtractTree<DB::SimdJSONParser>::build(char const*, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xc718103 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
6. DB::JSONExtractTree<DB::SimdJSONParser>::build(char const*, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xc718595 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
7. DB::FunctionJSONHelpers::Executor<DB::NameJSONExtract, DB::JSONExtractImpl, DB::SimdJSONParser>::run(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) @ 0xc717092 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
8. DB::ExecutableFunctionJSON<DB::NameJSONExtract, DB::JSONExtractImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xc716c61 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
9. ./build_gcc/./src/Functions/IFunction.h:61: DB::IExecutableFunction::executeDryRunImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xbd082ea in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
10. ./build_gcc/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x140db551 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
11. ./build_gcc/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:115: DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x140dbed2 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
12. ./build_gcc/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x140dcf69 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
13. ./build_gcc/./src/Interpreters/ActionsDAG.cpp:0: DB::ActionsDAG::updateHeader(DB::Block) const @ 0x145780e9 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
14. ./build_gcc/./src/Processors/Transforms/ExpressionTransform.cpp:0: DB::ExpressionTransform::transformHeader(DB::Block, DB::ActionsDAG const&) @ 0x15de25e5 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
15. ./build_gcc/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::ExpressionStep::ExpressionStep(DB::DataStream const&, std::__1::shared_ptr<DB::ActionsDAG> const&) @ 0x15f0bef4 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
16. ./build_gcc/./build_gcc/utils/local-engine/proto/substrait/algebra.pb.h:32859: local_engine::SerializedPlanParser::parseOp(substrait::Rel const&, std::__1::list<substrait::Rel const*, std::__1::allocator<substrait::Rel const*> >&) @ 0xbc5ed16 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
17. ./build_gcc/./utils/local-engine/Parser/SerializedPlanParser.cpp:0: local_engine::SerializedPlanParser::parse(std::__1::unique_ptr<substrait::Plan, std::__1::default_delete<substrait::Plan> >) @ 0xbc5ccfe in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
18. ./build_gcc/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:40: local_engine::SerializedPlanParser::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xbc6c89c in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
19. ./build_gcc/./utils/local-engine/local_engine_jni.cpp:207: Java_io_glutenproject_vectorized_ExpressionEvaluatorJniWrapper_nativeCreateKernelWithIterator @ 0xc03dc56 in /data1/liyang/cppproject/kyli/ClickHouse/build_gcc/utils/local-engine/libch.so
@taiyang-li
Copy link
Author

taiyang-li commented Apr 11, 2023

fixed by ClickHouse#48629

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

No branches or pull requests

1 participant