Skip to content

[Bug]: pub+fulltext index,can not use select * from where match() against() #21836

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkg/sql/plan/apply_indices_fulltext.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,17 @@ func (builder *QueryBuilder) applyJoinFullTextIndices(nodeID int32, projNode *pl
var last_node_id int32
var last_ftnode_pkcol *Expr

srcTblSchema := scanNode.ObjRef.SchemaName
if len(scanNode.ObjRef.SubscriptionName) > 0 {
srcTblSchema = scanNode.ObjRef.SubscriptionName
}

for i := 0; i < len(ft_filters); i++ {
ftidxscan := ft_filters[i]
idxdef := indexDefs[i]
idxtblname := fmt.Sprintf("`%s`.`%s`", scanNode.ObjRef.SchemaName, idxdef.IndexTableName)
srctblname := fmt.Sprintf("`%s`.`%s`", scanNode.ObjRef.SchemaName, scanNode.TableDef.Name)

idxtblname := fmt.Sprintf("`%s`.`%s`", srcTblSchema, idxdef.IndexTableName)
srctblname := fmt.Sprintf("`%s`.`%s`", srcTblSchema, scanNode.TableDef.Name)
fn := ftidxscan.GetF()
pattern := fn.Args[0].GetLit().GetSval()
mode := fn.Args[1].GetLit().GetI64Val()
Expand Down
Loading